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

개발자 설명서 · v1.0
https://www.fusionai.tvUse GET /v1/models for currently published API models, supported video operations and account pricing. Only models explicitly published for the API can be called.
로 로그인합니다 FusionAI 계정. 액세스 권한이 승인되면 자신의 API 키.
개발자 콘솔에 로그인하고 사용 사례를 설명합니다.
승인 후 로 시작하는 키를 만듭니다 sk-fusion-.
요청 헤더에 베어러 토큰을 보냅니다.
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 카탈로그. 가용성은 웹사이트 작업 공간과 무관합니다.
gpt-image-2이미지 생성 및 편집
gemini-3-pro-image이미지 생성 및 편집
gpt-image-2.5-flare이미지 생성 및 편집
gemini-3.1-flash-image이미지 생성 및 편집
gpt-image-2.5-sunburst이미지 생성 및 편집
gemini-3.1-flash-lite-image이미지 생성 및 편집
midjourney이미지 생성
/v1/modelscurl "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"] }
}
]
}모든 모델 인터페이스는 동일하게 사용합니다 API 키 인증.
Authorization: Bearer sk-fusion-xxxxxxxxxxxxxxxxxxxxxxxx키는 개발자 계정에 바인딩됩니다. 비활성화된 키, 비활성화된 계정 또는 승인되지 않은 계정 반환 401 invalid_api_key. 테스트, 프로덕션 및 다양한 워크로드를 위해 별도의 키를 유지합니다. 기존 계정 한도는 5개의 활성 키입니다.
에 대한 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 |
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"
}'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..." }]
}하나 이상의 참조 이미지와 선택적 마스크를 업로드합니다.
/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"이미지를 사용하십시오 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" }]
}프롬프트를 제출하고 작업 상태를 폴링합니다. 각 성공적인 작업은 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" }
]
}네이티브를 사용하십시오 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"
}]
}요청은 해당 설정과 플랫폼에 구성된 CNY 가격을 사용하여 청구됩니다.
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. |
audio | boolean | Default false. true requires supportsAudio and uses the separate quality:audio price. |
reference_images | string[] | 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"}'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"
}
]
}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.
2xx가 아닌 응답은 JSON 오류 개체를 반환합니다.
| http | 유형 | 의미 | 추천 |
|---|---|---|---|
| 401 | invalid_api_key | 유효하지 않거나 비활성화된 키 또는 사용할 수 없는 계정 | 권한 헤더 및 계정 상태를 확인합니다 |
| 402 | insufficient_balance | 계정 잔액이 부족합니다 | 재시도하기 전에 자금을 추가하십시오 |
| 403 | model_not_allowed | 모델이 게시되지 않았거나 프로토콜이 일치하지 않습니다 | 모델 카탈로그를 다시 쿼리합니다 |
| 403 | model_not_priced | 이 사양에는 구성된 가격이 없습니다 | 사양을 변경하거나 관리자에게 문의하십시오 |
| 405 | method_not_allowed | HTTP 메소드가 지원되지 않습니다 | 문서화된 HTTP 메서드를 사용합니다 |
| 502 | upstream_unavailable | 모델 서비스를 일시적으로 사용할 수 없습니다 | 지수 백오프로 다시 시도하십시오 |
| 503 | provider_not_configured | 공급자 구성을 사용할 수 없습니다 | 플랫폼 관리자에게 문의하십시오 |
오류 응답 예
{
"error": {
"code": 402,
"type": "insufficient_balance",
"status": "INSUFFICIENT_BALANCE",
"message": "Insufficient account balance"
}
}