Call a model
ask_modelRun a single paid model inference call via x402 using OpenAI chat messages, capping spend with max_usdg and max_tokens.
Instructions
One paid model call through x402. The price is the upper bound for this request, so keep max_tokens close to what you need. Body is the OpenAI chat format. AGENT_KEY is not set, so this tool will fail until a wallet is configured.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model key from list_models | |
| max_usdg | No | The most this call may cost. Default 0.05, never above the spend cap. | |
| messages | Yes | ||
| max_tokens | No | Output budget you pay for. Default 500. | |
| temperature | No |