Quote a generation price
quote_priceExact USDC price for a model+settings combo before paying — images are flat per call, video is per-second × duration at the resolution tier. The x402 endpoint always re-quotes from the body, so this is the same number it would charge.
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": {
"modelId": "<modelId>"
},
"name": "quote_price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payer | No | Your 0x… payer wallet — applies your volume-tier discount | |
| modelId | Yes | Model id from list_models | |
| duration | No | Video seconds (video models) | |
| imageSize | No | Image size label | |
| resolution | No | Video resolution tier | |
| aspectRatio | No |