text_to_image
Generate images from text prompts by creating GPT-4o Image tasks on RunAPI, returning task IDs, statuses, and output URLs.
Instructions
Create a GPT-4o Image task on RunAPI (text to image). Returns a task id, status, and output URLs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"aspect_ratio": "<aspect_ratio>"
},
"name": "text_to_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Poll until the task reaches a terminal status. | |
| model | No | RunAPI model slug for this model line. | |
| prompt | No | Declared type: string. | |
| mask_url | No | Declared type: string. | |
| timeout_ms | No | ||
| aspect_ratio | Yes | Declared type: string. Known values: "1:1", "3:2", "2:3". | |
| callback_url | No | Declared type: string. | |
| output_count | No | Declared type: integer. Known values: 1, 2, 4. | |
| poll_interval_ms | No | ||
| source_image_urls | No | Declared type: array. | |
| enable_prompt_expansion | No | Declared type: boolean. |