View raw JSON
{
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"prompt",
"size"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"n": {
"type": "integer",
"default": 1,
"maximum": 6,
"minimum": 1,
"description": "Optional integer from 1 to 6, default 1. Sets the requested number of generated or edited images; check the actual successful count."
},
"seed": {
"type": "integer",
"maximum": 2147483647,
"minimum": 0,
"description": "Optional integer from 0 to 2147483647. Helps repeat the random setup, but using the same seed does not guarantee identical images."
},
"size": {
"type": "string",
"pattern": "^\\d+\\*\\d+$",
"description": "Required width*height string, for example 1024*1024; use an asterisk, not x or auto. For both tasks, total pixel area is 512×512 to 2048×2048 and aspect ratio 1:8 to 8:1. These are not independent side bounds, and actual dimensions may vary slightly."
},
"images": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"description": "A nonempty, publicly accessible HTTPS image URL. JPG, JPEG, PNG, BMP, TIFF, WEBP and GIF inputs are supported, each at most 10 MB. Sides of 384–2048 pixels are recommended rather than mandatory bounds."
},
"maxItems": 3,
"description": "Optional array of up to three public HTTPS image links. Their order defines the reference order. For text-only generation, omit this whole field; do not assume an empty array selects that mode."
},
"prompt": {
"type": "string",
"minLength": 1,
"description": "Required nonempty text describing the new scene, or the change to make to supplied images. The recommended maximum is 4500 tokens, not a 4500-character limit. State any subject details you want to retain; adherence is not guaranteed."
},
"watermark": {
"type": "boolean",
"default": false,
"description": "Optional boolean, default false. Requests an AI Generated watermark when enabled."
},
"prompt_extend": {
"type": "boolean",
"default": true,
"description": "Optional boolean, default true. Enables the model to rewrite the prompt before generation or editing; it does not guarantee a better result."
},
"enable_thinking": {
"type": "boolean",
"description": "Optional boolean; the documented default is true. Requires prompt_extend=true and increases processing time, without guaranteeing image quality or fidelity."
},
"negative_prompt": {
"type": "string",
"description": "Optional text describing elements you would prefer to exclude. It guides the model but does not guarantee those elements will be absent."
},
"prompt_extend_mode": {
"enum": [
"direct",
"agent"
],
"type": "string",
"description": "Optional direct or agent value; the documented default is direct. direct supports generation and editing. agent performs more extensive rewriting only for text-only generation without input images."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}