Skip to main content
POST
/
api
/
v3
/
images
/
generations
doubao-seedream-4-5-251128 (text to image)
curl --request POST \
  --url https://api.example.com/api/v3/images/generations
BytePlus’s official format for the text to image API.
curl -X POST "https://gptproto.com/api/v3/images/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "doubao-seedream-4-5-251128",
  "prompt": "Fisheye lens, a cat'\''s head, the picture shows the cat'\''s facial features are distorted due to the shooting method.",
  "response_format": "url",
  "seed": 12,
  "guidance_scale": 2.5,
  "watermark": true
}'
{
  "error": {
    "message": "Invalid request parameters",
    "type": "invalid_request_error",
    "code": "invalid_parameters"
  }
}

Parameters

ParameterTypeRequiredDefaultRangeDescription
modelstring✅ Yesdoubao-seedream-4-5-251128-The model identifier for image generation/editing
promptstring✅ Yes--Description of the desired image transformation or generation
response_formatstring❌ Nourl-Response format: “url” (image URL) or “b64_json” (base64 encoded)
sizestring❌ Noadaptive-Output image resolution. Options: adaptive, 1024x1024, 2K, 4K
seedinteger❌ No--Random seed for reproducible results
guidance_scalenumber❌ No5.51.0-10.0Controls adherence to the prompt. Recommended: 3.0-7.0
watermarkboolean❌ Notrue-Whether to add watermark to the generated image