Seedream 5.0 API
ByteDance Seedream 5.0 모델의 완전한 API 참조 문서입니다.
모델 변형
이 API는 두 가지 모델 변형을 지원합니다:
빠른 비교
지원되는 화면 비율
16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16
Seedream 5.0 (텍스트-이미지 생성)
엔드포인트 {#}
POST /api/v1/image/task
요청 파라미터
필수 파라미터
참고: width:height 비율은 다음 중 하나여야 합니다: 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1
요청 예시
const response = await fetch('https://api.flaq.ai/api/v1/image/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'seedream-v5.0',
prompt: 'A futuristic cityscape at night with neon lights',
width: 16,
height: 9,
resolution: '2k'
})
});
const { data } = await response.json();
const taskId = data.task_id;
const pollResponse = await fetch(
`https://api.flaq.ai/api/v1/image/${taskId}`,
{
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}
);
const result = await pollResponse.json();
console.log(result.data.task_result.images[0].url);
Seedream 5.0 Edit (이미지 편집)
엔드포인트
POST /api/v1/image/task
요청 파라미터
필수 파라미터
선택 사항
단일 이미지 편집 예시
{
model_name: 'seedream-v5.0-edit',
image_url_list: ['https://example.com/photo.jpg'],
prompt: 'Add dramatic lighting and enhance the colors',
width: 16,
height: 9,
resolution: '2k'
}
다중 이미지 합성 예시
{
model_name: 'seedream-v5.0-edit',
image_url_list: [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg'
],
prompt: 'Blend these images into a cohesive composition',
width: 16,
height: 9,
resolution: '2k'
}
응답 형식
초기 응답
{
"code": 0,
"data": {
"task_id": "{task_id}",
"task_status": "submitted",
"response_url": "https://api.flaq.ai/api/v1/image/{task_id}"
},
"message": "success"
}
폴링 응답
GET /api/v1/image/{task_id} 를 통해 상태를 확인합니다:
{
"code": 0,
"data": {
"task_id": "{task_id}",
"task_status": "succeed",
"task_status_msg": null,
"response_url": "https://api.flaq.ai/api/v1/image/{task_id}",
"task_result": {
"credit": 0.0997,
"images": [
{
"url": "https://example.com/generated-image.jpeg"
}
]
}
},
"message": "success"
}
상태 값
submitted: 작업이 접수되었습니다
processing: 이미지 생성 진행 중
succeed: 이미지 생성 완료
failed: 이미지 생성 실패
처리 시간
일반적인 처리 시간: 해상도와 복잡도에 따라 15-60초 소요됩니다.
권장 사항
- 상세한 프롬프트: 더 구체적인 프롬프트를 사용하면 더 나은 결과를 얻을 수 있습니다
- 해상도 선택: 빠른 처리를 위해
2k를, 인쇄 품질 출력을 위해 4k를 사용하세요
- 화면 비율: 생성 전에 목적에 맞는 비율을 선택하세요
- 이미지 편집 품질: 편집 시 고해상도의 조명이 잘 된 원본 이미지를 사용하세요