Input Schema
{
"bodyFields": {
"enable_safety_checker": {
"default": true,
"description": "If set to true, the safety checker will be enabled.",
"example": true,
"required": false,
"type": "boolean"
},
"image_size": {
"default": "landscape_16_9",
"description": "The size of the generated image. You can choose between some presets or custom height and width that **must be multiples of 16**.",
"enum": [
"square_hd",
"square",
"portrait_4_3",
"portrait_16_9",
"landscape_4_3",
"landscape_16_9"
],
"required": false,
"type": "ImageSize | \"square_hd\" | \"square\" | \"portrait_4_3\" | \"portrait_16_9\" | \"landscape_4_3\" | \"landscape_16_9\""
},
"num_images": {
"default": 1,
"description": "The number of images to generate.",
"enum": [
"1"
],
"required": false,
"type": "integer"
},
"prompt": {
"description": "The prompt to generate an image from.",
"example": "a tiny astronaut hatching from an egg on the moon",
"required": true,
"type": "string"
},
"seed": {
"description": "The same seed and the same prompt given to the same version of the model will output the same image every time.",
"required": false,
"type": "integer"
},
"sync_mode": {
"default": false,
"description": " If set to true, the function will wait for the image to be generated and uploaded before returning the response. This will increase the latency of the function but it allows you to get the image directly in the response without going through the CDN.\n ",
"required": false,
"type": "boolean"
}
},
"bodyType": "json",
"method": "POST",
"type": "http"
}
Output Schema
{
"jobId": {
"description": "Unique job identifier",
"type": "string"
},
"message": {
"description": "Human-readable message with status tracking URL",
"type": "string"
},
"statusCode": {
"description": "HTTP status code",
"type": "integer"
},
"statusUrl": {
"description": "URL to check job status",
"type": "string"
},
"timestamp": {
"description": "ISO 8601 timestamp of the response",
"type": "string"
}
}