Skip to content

Seedream4.0 - Text to Image ​

Endpoint ​

POST /images/generations

Full URL: https://modelfold.ai/v1/images/generations

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.

Input parameters for the generation task

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe model name to use for generation. Required field.
- Must be bytedance/seedream-v4-text-to-image for this endpoint Default:"bytedance/seedream-v4-text-to-image"。 Allowed values:bytedance/seedream-v4-text-to-image。 Example:bytedance/seedream-v4-text-to-image。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. The text prompt used to generate the image (Max length: 5000 characters) maxLength: 2000. Example:Draw the following system of binary linear equations and the corresponding solution steps on the blackboard: 5x + 2y = 26; 2x -y = 5.。
image_sizestringNoThe size of the generated image. Default:"square_hd"。 Allowed values:square / square_hd / portrait_4_3 / portrait_3_2 / portrait_16_9 / landscape_4_3 / landscape_3_2 / landscape_16_9 / landscape_21_9。 Example:square_hd。
image_resolutionstringNoFinal image resolution is determined by combining image_size (aspect ratio) and image_resolution (pixel scale).. Default:"1K"。 Allowed values:1K / 2K / 4K。 Example:1K。
seedintegerNoRandom seed for reproducible results. Integer, up to 1000000. Omit for a random seed. maximum: 1000000.
nsfw_checkerbooleanNoDefaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

Request Example ​

bash
curl -X POST "https://modelfold.ai/v1/images/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "bytedance/seedream-v4-text-to-image",
  "prompt": "Draw the following system of binary linear equations and the corresponding solution steps on the blackboard: 5x + 2y = 26; 2x -y = 5.",
  "image_size": "square_hd",
  "image_resolution": "1K"
}'
json
{
  "model": "bytedance/seedream-v4-text-to-image",
  "prompt": "Draw the following system of binary linear equations and the corresponding solution steps on the blackboard: 5x + 2y = 26; 2x -y = 5.",
  "image_size": "square_hd",
  "image_resolution": "1K"
}

Response ​

200 — Generation completed. usage contains actual billing details; result URLs are illustrative. ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.png"
    }
  ],
  "usage": {}
}

ModelFold — one API for all the best AI models.