text_to_image
Generate images from text prompts by creating a GPT Image 2 task on RunAPI, returning a task ID, status, and output URLs.
Instructions
Create a GPT Image 2 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": {
"prompt": "<prompt>"
},
"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 | Yes | Declared type: string. | |
| background | No | Declared type: string. Known values: "transparent", "opaque", "auto". | |
| timeout_ms | No | ||
| aspect_ratio | No | Declared type: string. Known values: "auto", "1:1", "3:2", "2:3", "4:3", "3:4", "5:4", "4:5", "16:9", "9:16", "2:1", "1:2", "3:1", "1:3", "21:9", "9:21". | |
| callback_url | No | Declared type: string. | |
| poll_interval_ms | No | ||
| output_resolution | No | Declared type: string. Known values: "1k", "2k", "4k". |