Raw schema
{
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "Exact model name, e.g. gpt-image-2 or nano-banana-pro. Call list_models with category 'image' if unsure."
},
"prompt": {
"type": "string",
"description": "Description of the image to generate."
},
"images": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
},
"description": "Optional reference images as HTTPS URLs or data URLs, for image-to-image generation. Not all models accept references."
},
"size": {
"type": "string",
"description": "Output size, e.g. 1024x1024, 1536x1024, or 'auto'. Model-dependent; omit for the model default."
},
"n": {
"type": [
"null",
"integer"
],
"description": "How many images to generate. Defaults to 1. Each one is billed."
},
"quality": {
"type": "string",
"description": "Quality hint, e.g. low, medium, high or auto. Model-dependent."
},
"response_format": {
"type": "string",
"description": "'url' (default) returns links; 'b64_json' returns base64 data, which is far larger and usually unnecessary."
},
"aspect_ratio": {
"type": "string",
"description": "Z-Image only: required output aspect ratio. Supported values: 1:1, 4:3, 3:4, 16:9, 9:16."
},
"nsfw_checker": {
"type": [
"null",
"boolean"
],
"description": "Z-Image only: enable or disable the upstream NSFW checker. Explicit false is preserved."
},
"async": {
"type": "boolean",
"description": "Submit asynchronously and return a task_id instead of waiting. Use when the client times out on slow models; poll with get_task using platform 'image'."
},
"wait_seconds": {
"type": [
"null",
"integer"
],
"description": "Only with async: poll server-side for up to this many seconds (max 240) and return the finished image if it completes in time."
}
},
"required": [
"model",
"prompt"
],
"additionalProperties": false
}