text-to-image

Seedream 4 - Create image from text

Convert descriptive text input into images using AI. This endpoint accepts a variety of parameters to customize the generated images.

post/v1/ai/text-to-image/seedream-v4

Request

  • Base URL: https://api.magnific.com
  • URL: https://api.magnific.com/v1/ai/text-to-image/seedream-v4
  • Auth: API key in header x-magnific-api-key

Request body

promptstring required

The text prompt used to generate the image

webhook_urlstring uri

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

aspect_ratio'square_1_1' | 'widescreen_16_9' | 'social_story_9_16' | 'portrait_2_3' | 'traditional_3_4' | 'standard_3_2' | 'classic_4_3'

The aspect ratio of the generated image

guidance_scalenumber

Controls how closely the output image aligns with the input prompt. Higher values mean stronger prompt correlation.

seedinteger

Random seed to control the stochasticity of image generation

Example request

{
  "webhook_url": "https://www.example.com/webhook"
}

Response

OK - The request has succeeded and the Seedream v4 process has started.

Example response

{
  "data": {
    "generated": [
      "https://openapi-generator.tech",
      "https://openapi-generator.tech"
    ],
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "CREATED"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.