Generate an image with an AI model (text to image)
generate_imageGenerate an image from a text prompt with an image model on this account (text to image); the picture is returned in the chat — no API key needed. Calls a model and is billed to this account like an API call. Image model ids come from list_models. n makes up to 4 at once (default 1) and each one is billed. If the result asks which project to bill, ask the person and call again with projectId.
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": {
"model": "<model>",
"prompt": "<prompt>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | How many images (default 1) | |
| size | No | e.g. '1024x1024', when the model supports a choice | |
| model | Yes | An image model id from list_models | |
| prompt | Yes | What to draw | |
| projectId | No | Only when a previous result asked which project to bill |