Create image
/v1/images/generationsCreate an image from text, or create/edit an image from text plus one or more input images.
Image generation responses are returned directly from this request; unlike video generation, there is no submit-and-poll task flow.
Use the returned data[].url to download the image directly. To use the dedicated image download or delete endpoints, first retrieve the image record ID from GET /v1/images.
Authentication
Authorization Bearer
API key as bearer token in Authorization header.
Request Body
modelstringrequiredImage model ID.
promptstringrequiredText description of the image to generate.
nintegerNumber of generated images. Availability depends on the selected model.
sizestringdefault:model defaultImage dimensions or resolution enum. Availability depends on the selected model.
Example: "1024x1024"
response_formatstringImage response format. Availability depends on the selected model.
watermarkbooleanWhether to include the provider watermark. Availability depends on the selected model.
seedintegerRandom seed. Availability depends on the selected model.
sequential_image_generationstringSequential generation mode. Availability depends on the selected model.
qualitystringOutput quality. Availability depends on the selected model.
ratiostringOutput aspect ratio. Availability depends on the selected model.
Model-Specific Notes
- Kling Image O1: exposes model-specific
nandsizecontrols on its model card. - Seedream 4.5: exposes model-specific
seed,watermark,response_format, andsequential_image_generationcontrols on its model card. - Seedream 4.0: exposes model-specific
seed,watermark,response_format, andsequential_image_generationcontrols on its model card. - Dola-Seedream-5.0-lite: exposes model-specific
seedandwatermarkcontrols on its model card. - Nano Banana Pro: exposes model-specific
ratioandqualitycontrols on its model card. - GLM-Image: does not expose additional unified image parameters.
Response
createdintegerUnix timestamp.
modelstringProvider-side model identifier that served the request.
dataobject[]Generated images.
data.urlstringURL to download the generated image.
data.b64_jsonstringBase64-encoded image when returned by the model.
usageobjectUsage stats such as generated_images, output_tokens, and total_tokens.
Previous
Create chat completion
Next
List images