개발자 설명서 · v1.0

FusionAI Open APIImage and video generation, ready to integrate

One API key for published image and video models. Generate images, edit references and submit asynchronous video tasks with account-specific pricing.
API 기본 URLhttps://www.fusionai.tv
HTTPS

Use GET /v1/models for currently published API models, supported video operations and account pricing. Only models explicitly published for the API can be called.

01

빠른 시작#

로 로그인합니다 FusionAI 계정. 액세스 권한이 승인되면 자신의 API 키.

1

액세스를 신청합니다

개발자 콘솔에 로그인하고 사용 사례를 설명합니다.

2

키를 만듭니다

승인 후 로 시작하는 키를 만듭니다 sk-fusion-.

3

귀하의 서버에서 전화하십시오

요청 헤더에 베어러 토큰을 보냅니다.

Prefer a ready-to-run client? Explore FusionAI Skills: image generation, reference editing and tested product-photo workflows.

일반 요청 협약

수송HTTPS 전용
인증Authorization: Bearer $FUSIONAI_API_KEY
JSON 요청Content-Type: application/json
파일 업로드multipart/form-data, 권장 최대 요청 크기 100 MB
시간 초과이미지 생성은 몇 분 정도 걸릴 수 있습니다. 가정의 제 일 10-Minute 클라이언트 시간 초과를 권장합니다.
추적 요청...하면할수록 X-Request-Id 응답 헤더는 요청을 식별하고 문제를 해결하는 데 도움이 됩니다.
API 키는 생성 시에만 표시됩니다. 서버 환경 변수 또는 비밀 관리자에 저장합니다. 브라우저 코드, 모바일 패키지 또는 공용 저장소에 포함하지 마십시오.
02

API로 사용할 수 있는 모델#

현재 에 게시된 모델 오픈 API 카탈로그. 가용성은 웹사이트 작업 공간과 무관합니다.

OpenAi 이미지

GPT Image 2

gpt-image-2

이미지 생성 및 편집

쌍둥이자리 생성 콘텐츠

Gemini 3 Pro Image

gemini-3-pro-image

이미지 생성 및 편집

OpenAi 이미지

GPT Image 2.5 Flare

gpt-image-2.5-flare

이미지 생성 및 편집

쌍둥이자리 생성 콘텐츠

Gemini 3.1 Flash Image

gemini-3.1-flash-image

이미지 생성 및 편집

OpenAi 이미지

GPT Image 2.5 Sunburst

gpt-image-2.5-sunburst

이미지 생성 및 편집

쌍둥이자리 생성 콘텐츠

Gemini 3.1 Flash Lite Image

gemini-3.1-flash-lite-image

이미지 생성 및 편집

중간 여행 비동기

Midjourney

midjourney

이미지 생성

모델 나열

어려운 공을 받아치기/v1/models
curl "https://www.fusionai.tv/v1/models" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY"

응답 예

{
  "object": "list",
  "data": [
    {
      "id": "gpt-image-2",
      "object": "model",
      "display_name": "GPT Image 2",
      "protocol": "openai-images",
      "capabilities": { "resolutions": ["1K", "2K", "4K"] }
    }
  ]
}
03

API 키 인증#

모든 모델 인터페이스는 동일하게 사용합니다 API 키 인증.

Authorization: Bearer sk-fusion-xxxxxxxxxxxxxxxxxxxxxxxx

키는 개발자 계정에 바인딩됩니다. 비활성화된 키, 비활성화된 계정 또는 승인되지 않은 계정 반환 401 invalid_api_key. 테스트, 프로덕션 및 다양한 워크로드를 위해 별도의 키를 유지합니다. 기존 계정 한도는 5개의 활성 키입니다.

04

GPT Image 2 패밀리 · 이미지 생성#

에 대한 JSON 요청을 사용합니다 GPT Image 2, GPT Image 2.5 Flare 과 GPT Image 2.5 Sunburst.

우편/v1/images/generations

요청 필드

분야유형필수기술
model끈예gpt-image-2、gpt-image-2.5-flare 또는 gpt-image-2.5-sunburst
prompt끈예이미지 설명 또는 편집 지침
n정수아니현재 권장: 1
size끈아니auto 또는 WIDTHxHEIGHT, 예를 들어 2048x2048
quality끈아니auto、low、medium、high; GPT Image 2.5 또한 지원합니다 xhigh (추가로 높음), max (최대)
resolution끈추천청구 및 공급자 키 라우팅 해결 방법: 1K、2K、4K. 생략하면 에서 추론하십시오 size; auto사용 1K
output_format끈아니고정 값: png
response_format끈아니b64_json 또는 url
사용자 정의 너비와 높이는 3840 의 배수여야 합니다 16. 종횡비는 3:1. 총 픽셀 수는 655,360 과 8,294,400.

컬 예

curl "https://www.fusionai.tv/v1/images/generations" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A premium skincare bottle on white marble, studio lighting",
    "n": 1,
    "size": "2048x2048",
    "resolution": "2K",
    "quality": "high",
    "output_format": "png",
    "response_format": "b64_json"
  }'

Node.js 예제

const response = await fetch('https://www.fusionai.tv/v1/images/generations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.FUSIONAI_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ model: 'gpt-image-2', prompt: 'A product poster', size: '1024x1024', resolution: '1K', response_format: 'b64_json' })
});
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
console.log(result.data[0].b64_json);

응답 예

{
  "created": 1786400000,
  "data": [{ "b64_json": "iVBORw0KGgoAAA..." }]
}
05

GPT Image 2 패밀리 · 이미지 편집#

하나 이상의 참조 이미지와 선택적 마스크를 업로드합니다.

우편/v1/images/editsmultipart/form-data
분야유형필수기술
model끈예gpt-image-2、gpt-image-2.5-flare 또는 gpt-image-2.5-sunburst
prompt끈예편집 지침
image[]파일예참조 이미지; 여러 파일에 대해 필드를 반복합니다. 최대 4개를 권장합니다.
mask파일아니png 마스크; 투명 영역 편집할 영역을 표시합니다.
size끈아니auto 또는 사용자 정의 너비 및 높이
resolution끈추천1K、2K 또는 4K, 청구 및 키 라우팅에 사용됩니다
quality끈아니auto、low、medium、high; GPT Image 2.5 또한 지원합니다 xhigh (추가로 높음), max (최대)
response_format끈아니b64_json 또는 url
curl "https://www.fusionai.tv/v1/images/edits" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY" \
  -F "model=gpt-image-2" \
  -F "prompt=Replace the background with a minimal luxury showroom" \
  -F "image[]=@product.png" \
  -F "mask=@mask.png" \
  -F "size=2048x2048" \
  -F "resolution=2K" \
  -F "quality=high" \
  -F "response_format=b64_json"
06

Grok Image 2 · 생성 및 편집#

이미지를 사용하십시오 API 텍스트에서 이미지까지의 JSON 형식 및 액세스 가능한 이미지 URL을 사용한 참조 편집.

우편/v1/images/generations응용 프로그램/JSON

이미지에서 이미지로

분야유형필수기술
model끈예고정 값: grok-imagine-image-quality
prompt끈예주제, 설정, 구성, 조명 및 스타일을 설명합니다.
n정수아니에서 출력 카운트 1 ...에 10
aspect_ratio끈아니1:1、16:9、9:16、4:3、3:4
resolution끈아니1k 또는 2k
response_format끈아니url 또는 b64_json
curl "https://www.fusionai.tv/v1/images/generations" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image-quality",
    "prompt": "A luxury perfume campaign, dramatic studio light",
    "n": 1,
    "aspect_ratio": "4:3",
    "resolution": "2k",
    "response_format": "url"
  }'
우편/v1/images/edits응용 프로그램/JSON

참조 이미지 편집

에 참조 이미지를 배치합니다 images 배열. 이미지는 액세스 가능한 HTTPS URL이어야 합니다. 최대 4개를 권장합니다.

curl "https://www.fusionai.tv/v1/images/edits" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image-quality",
    "prompt": "Keep the product unchanged and replace the background with a luxury showroom",
    "images": [
      { "type": "image_url", "url": "https://example.com/product.png" }
    ],
    "n": 1,
    "resolution": "2k",
    "response_format": "url"
  }'

URL 응답 예

{
  "created": 1786400000,
  "data": [{ "url": "https://example.com/generated-image.png" }]
}
07

Midjourney · 비동기 이미지 생성#

프롬프트를 제출하고 작업 상태를 폴링합니다. 각 성공적인 작업은 4개의 후보 이미지를 반환합니다.

우편/v1/midjourney/imagine응용 프로그램/JSON
분야유형필수기술
model끈아니고정 값: midjourney; 생략 시 자동으로 사용됩니다
prompt끈예이미지 설명, 최대 6,000 문자. 기존 --ar 로 재정의됩니다 aspect_ratio.
aspect_ratio끈아니1:1、16:9、9:16、4:3、3:4、3:2、2:3; 기본값: 1:1
curl "https://www.fusionai.tv/v1/midjourney/imagine" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "midjourney",
    "prompt": "A futuristic fashion campaign in Shanghai, cinematic lighting",
    "aspect_ratio": "3:2"
  }'

제출 응답(http 202)

{
  "id": "req_7f2b1d6f03c84d679bfe2a8c",
  "object": "image.generation.task",
  "model": "midjourney",
  "status": "queued",
  "progress": 0,
  "created_at": "2026-09-17T06:30:00.000Z"
}
어려운 공을 받아치기/v1/midjourney/tasks/{task_id}

매번 폴링하세요 3–5 초. status 아마도 queued、processing、succeeded 또는 failed. 작업이 실패하면 예약된 요금이 환불됩니다.

curl "https://www.fusionai.tv/v1/midjourney/tasks/req_7f2b1d6f03c84d679bfe2a8c" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY"

성공적인 응답

{
  "id": "req_7f2b1d6f03c84d679bfe2a8c",
  "object": "image.generation.task",
  "model": "midjourney",
  "status": "succeeded",
  "progress": 100,
  "data": [
    { "url": "https://example.com/candidate-1.png" },
    { "url": "https://example.com/candidate-2.png" },
    { "url": "https://example.com/candidate-3.png" },
    { "url": "https://example.com/candidate-4.png" }
  ]
}
현재 Midjourney API 참조 이미지, 편집 또는 마스크 없이 텍스트 간에만 제공합니다. 작업을 생성한 계정에 속하는 키로 작업을 폴링합니다.
08

Gemini 이미지 생성 및 편집#

네이티브를 사용하십시오 generateContent 요청 형식. 텍스트 및 참조는 에 제공됩니다 parts。

우편/v1beta/models/{model}:generateContent
분야유형필수기술
model통로예콘솔 카탈로그의 Gemini 모델 ID입니다
contents배심원의 소집예대화 내용, 일반적으로 user 역할
parts[].text끈예생성 또는 편집 지침
parts[].inlineData목적아니가 있는 참조 이미지 mimeType 및 원시 base64 data
generationConfig.responseModalities배심원의 소집예이미지 생성의 경우 를 사용합니다 ["IMAGE"]
generationConfig.imageConfig.aspectRatio끈아니1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9、21:9
generationConfig.imageConfig.imageSize끈아니선택한 모델에서 지원하는 크기를 사용합니다. 512、1K、2K 또는 4K

이미지에서 이미지로

curl "https://www.fusionai.tv/v1beta/models/gemini-3.1-flash-image:generateContent" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"role":"user","parts":[{"text":"Generate a cinematic product poster"}]}],
    "generationConfig": {
      "responseModalities": ["IMAGE"],
      "imageConfig": {"aspectRatio":"16:9","imageSize":"1K"}
    }
  }'

참조 이미지를 포함합니다

{
  "contents": [{
    "role": "user",
    "parts": [
      { "text": "Keep the product unchanged and replace the background" },
      { "inlineData": { "mimeType": "image/png", "data": "BASE64_WITHOUT_DATA_URL_PREFIX" } }
    ]
  }],
  "generationConfig": {
    "responseModalities": ["IMAGE"],
    "imageConfig": { "aspectRatio": "1:1", "imageSize": "2K" }
  }
}

응답 예

{
  "candidates": [{
    "content": {
      "role": "model",
      "parts": [{ "inlineData": { "mimeType": "image/png", "data": "iVBORw0KGgoAAA..." } }]
    },
    "finishReason": "STOP"
  }]
}
09

청구 및 요청 기록#

요청은 해당 설정과 플랫폼에 구성된 CNY 가격을 사용하여 청구됩니다.

  • 예상 요금은 공급자 요청 전에 예약됩니다. 계정 잔액이 부족하면 생성이 제출되지 않습니다.
  • 공급자 연결이 실패하거나 2xx가 아닌 응답을 반환하거나 비동기 작업이 결국 실패하면 예약된 요금이 반환됩니다.
  • 콘솔에 요청 ID, 모델, 상태, 기간, 요금 및 잔액 항목이 표시됩니다.
  • 동기 요청 매개변수는 수정된 형태로 저장됩니다. Midjourney 작업은 결과를 다시 검색할 수 있도록 최종 후보 URL을 캐시합니다.
09

Video generation · asynchronous tasks#

One API key, a published video catalog and account-specific per-second pricing.

우편/v1/videos
Parameter유형기술
model끈Required. Use a published video model ID from /v1/models; do not assume every workbench model is available.
prompt끈Required. Describe the subject, action, setting and camera movement. Follow the returned prompt limits.
mode끈text_to_video (default), image_to_video, first_last_frame or reference_images. Check capabilities.operations for supported modes.
seconds정수Output duration. Use durationsByQuality[quality] or durations for the selected operation; defaults to defaultDuration.
quality끈Use an exact value from the selected operation qualities; defaults to defaultQuality.
aspect_ratio끈An enabled aspect ratio; defaults to defaultRatio.
audiobooleanDefault false. true requires supportsAudio and uses the separate quality:audio price.
reference_imagesstring[]Public HTTPS image URLs in order. Text: none; image: at least one; first/last: exactly two, first then last. Other limits follow the selected operation. Local files and Base64 are not accepted.

First call GET /v1/models. Replace PUBLISHED_VIDEO_MODEL_ID with a returned model whose protocol is video-async. Leaving optional parameters out uses that model’s defaults.

curl "https://www.fusionai.tv/v1/videos" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: product-video-001" \
  -d '{"model":"PUBLISHED_VIDEO_MODEL_ID","prompt":"A slow camera orbit around a ceramic cup in warm studio light","mode":"text_to_video"}'

Idempotent submission

Use a unique Idempotency-Key for each new video. Retrying the same key with the same normalized parameters returns the existing task without another charge. Changed parameters return 409. If a request times out or needs_attention is true, reuse the key and contact support with the task ID; do not create a new paid request.

{
  "id": "vid_TASK_ID",
  "object": "video.generation.task",
  "model": "PUBLISHED_VIDEO_MODEL_ID",
  "status": "processing",
  "created_at": "2026-11-24T00:00:00.000Z"
}
어려운 공을 받아치기/v1/videos/{task_id}
curl "https://www.fusionai.tv/v1/videos/vid_TASK_ID" \
  -H "Authorization: Bearer $FUSIONAI_API_KEY"

Poll about every 10 seconds. Pending tasks return HTTP 202 (queued or processing); terminal tasks return HTTP 200 (completed or failed). Tasks can only be queried by their owning API account. Model unpublishing does not prevent retrieval of an existing task.

{
  "id": "vid_TASK_ID",
  "object": "video.generation.task",
  "model": "PUBLISHED_VIDEO_MODEL_ID",
  "status": "completed",
  "data": [
    {
      "url": "https://fusionaitv.oss-cn-hongkong.aliyuncs.com/open-api/example/video.mp4"
    }
  ]
}

Billing, results and failures

The selected quality:silent or quality:audio unit price × output seconds is reserved from the separate API wallet on submission, with the account discount or model-specific rate applied. Confirmed generation failures are refunded once. Status checks do not charge generation fees. Transient query or storage failures remain processing and are retried; they do not trigger a new generation. Completed videos are stored in FusionAI international OSS before the result URL is returned.

This API currently supports text and image reference inputs. Reference video/audio, video editing, extensions, callbacks and multipart uploads are not part of this endpoint. Unsupported parameters are rejected before billing.
10

오류 및 재시도#

2xx가 아닌 응답은 JSON 오류 개체를 반환합니다.

http유형의미추천
401invalid_api_key유효하지 않거나 비활성화된 키 또는 사용할 수 없는 계정권한 헤더 및 계정 상태를 확인합니다
402insufficient_balance계정 잔액이 부족합니다재시도하기 전에 자금을 추가하십시오
403model_not_allowed모델이 게시되지 않았거나 프로토콜이 일치하지 않습니다모델 카탈로그를 다시 쿼리합니다
403model_not_priced이 사양에는 구성된 가격이 없습니다사양을 변경하거나 관리자에게 문의하십시오
405method_not_allowedHTTP 메소드가 지원되지 않습니다문서화된 HTTP 메서드를 사용합니다
502upstream_unavailable모델 서비스를 일시적으로 사용할 수 없습니다지수 백오프로 다시 시도하십시오
503provider_not_configured공급자 구성을 사용할 수 없습니다플랫폼 관리자에게 문의하십시오

오류 응답 예

{
  "error": {
    "code": 402,
    "type": "insufficient_balance",
    "status": "INSUFFICIENT_BALANCE",
    "message": "Insufficient account balance"
  }
}
다음과 같은 지수 백오프를 사용하여 네트워크 장애 및 5xx 응답을 제한된 횟수로 재시도하십시오. 2, 4 과 8 초. 다음과 같은 계정 또는 청구 오류를 자동으로 다시 시도하지 마십시오. 401, 402 또는 403.