auto-model
Generate images from a prompt, letting the server pick the best model
Generate one or more images from a prompt without choosing a model. The server selects the model best suited to the request — the prompt, the requested output size, and any style references all inform the choice — and may route different requests to different models.
By default the request blocks until the images are ready and returns them in data. Set async to true to return immediately after the request is accepted, then poll for completion and results with GET /v1/generations/{generation_id} using the returned generation_id.
post/v2/tool/text-to-image
Request body
Example request
{
"magic_prompt": "",
"aspect_ratio": "",
"async": false,
"private": true,
"seed": 12345,
"negative_prompt": "negative_prompt",
"target_collection_id": "target_collection_id",
"resolution_tier": "1K",
"style_reference_asset_identifiers": [
{
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
},
{
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
},
{
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
},
{
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
},
{
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
}
],
"prompt": "prompt",
"resolution": "resolution",
"num_images": 1
}Response
The generated images (synchronous requests), or an acknowledgement to poll with GET /v1/generations/{generation_id} (async requests).
Example response
{
"data": [
{
"seed": 12345,
"prompt": "prompt",
"resolution": "1024x1024",
"url": "https://openapi-generator.tech",
"is_image_safe": true
},
{
"seed": 12345,
"prompt": "prompt",
"resolution": "1024x1024",
"url": "https://openapi-generator.tech",
"is_image_safe": true
}
],
"seed": 12345,
"generation_id": "generation_id"
}