Ask Model (LLM Gateway)
ask_model437 models, no account, no API key, pay per call in USDC - OpenAI-compatible chat completions and AI inference gateway (Claude, GPT, Gemini, Llama, Mistral and more in one endpoint). Price: from $0.001, computed from your max_tokens × model rate × 1.10 (you sign a ceiling; unused tokens are not refunded). 20s server-side timeout - never charged if it fires; set your client timeout to 30s. Try GET /v1/chat/completions/sample.
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>",
"messages": "<messages>"
},
"name": "ask_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | OpenRouter model id from GET /v1/models, e.g. "openai/gpt-4o-mini". | |
| messages | Yes | OpenAI-format chat messages: [{role, content}, ...]. | |
| max_tokens | No | Max completion tokens, capped at 4096 - also bounds the x402 upto price ceiling. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| model | No | ||
| usage | Yes | ||
| choices | Yes | ||
| x402_receipt | No |