Image Generation
imagesGenerate images from text prompts. Returns a hosted URL of the image and the same image as base64 (b64_json), with its content_type (image/png or image/jpeg, as the bytes are), the aspect ratio and the size used. Use to create a new picture from a description. To cut the background out of an existing image use bg-remove; to capture a web page use screenshot. Cost: 512px 1 credit, 1K 2 credits, 2K 3 credits, 4K 5 credits, charged only when a call succeeds.
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": "images"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Image description. | |
| image_size | No | Image size: the longer side, about 512, 1024, 2048 or 3840 pixels. The price depends on it. | 512px |
| aspect_ratio | No | Aspect ratio. | 1:1 |