estimate_image_cost
Estimates OpenAI image generation and editing costs in USD offline from model, size, quality, prompt, and reference count, so you can budget paid requests before running them.
Instructions
Offline USD quote. Include the intended prompt and reference count (including mask). An omitted prompt budgets the maximum possible UTF-8 prompt. No files are read.
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>"
},
"name": "estimate_image_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| size | No | auto | |
| model | Yes | ||
| prompt | No | ||
| quality | No | auto | |
| reference_count | No |