seedream-5.0-lite/image-to-image
seedream-5.0-lite/image-to-image
صورةByteDanceSeedream 5.0 Liteimage-to-image
字节最新一代的图像生成模型
المصادقة
- Base URL
https://api.dreamtoai.com- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- اسم النموذج (model)
seedream-5.0-lite/image-to-image
بروتوكول التكامل
لماذا تختار هذا البروتوكول
适合需要提交任务并轮询状态的图像、视频、音频生成工作流。
عنوان نقطة النهاية
POST/v1/jobs
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonJSON الطلب والاستجابة
الطلب
{
"model": "seedream-5.0-lite/image-to-image",
"input": {
"prompt": "一张国风插画,细节丰富,柔和光线",
"image": [
"https://example.com/reference.png"
],
"size": "1024x1024",
"sequential_image_generation": "disabled",
"sequential_image_generation_options": {},
"tools": [],
"stream": false,
"guidance_scale": 5,
"output_format": "jpeg",
"response_format": "url",
"watermark": true,
"optimize_prompt_options": {}
}
}استجابة
{
"id": "job_example",
"object": "job",
"status": "processing",
"model": "seedream-5.0-lite/image-to-image",
"created": 1710000000,
"request_id": "req_example"
}حقول الطلب والاستجابة
حقول الطلب
| الحقل | النوع | مطلوب |
|---|---|---|
| prompt | string | Y |
| image | array | N |
| size | string | N |
| sequential_image_generation | enum | N |
| sequential_image_generation_options | object | N |
| tools | array | N |
| stream | boolean | N |
| guidance_scale | number | N |
| output_format | enum | N |
| response_format | enum | N |
| watermark | boolean | N |
| optimize_prompt_options | object | N |
حقول الاستجابة
| الحقل | النوع | مطلوب |
|---|---|---|
| output.images[] | image | N |
أمثلة الكود
cURLrequest.sh
curl -X POST "https://api.dreamtoai.com/v1/jobs" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "seedream-5.0-lite/image-to-image",
"input": {
"prompt": "一张国风插画,细节丰富,柔和光线",
"image": [
"https://example.com/reference.png"
],
"size": "1024x1024",
"sequential_image_generation": "disabled",
"sequential_image_generation_options": {},
"tools": [],
"stream": false,
"guidance_scale": 5,
"output_format": "jpeg",
"response_format": "url",
"watermark": true,
"optimize_prompt_options": {}
}
}'
# cURL لاستعلام الحالة
# استبدل job_example بمعرّف task_id الذي يعيده ردّ الإرسال.
curl -X GET "https://api.dreamtoai.com/v1/jobs/job_example" \
-H "Authorization: Bearer YOUR_API_KEY"