OpenRouter Metered Chat Completion (OpenAI-compatible) is a paid API for AI agents from openrouter.withzero.xyz, paid per call via MPP, $0.001/call, status healthy (last checked 2026-10-11, last successful call 2026-09-30).
Sends a chat completion request to any OpenRouter model with metered at-cost billing — escrows up to 5 USDC and refunds the unused portion after the call settles actual token usage.
OpenAI-compatible chat completion via any OpenRouter model with metered at-cost billing: escrow a worst-case reservation (up to 5 USDC), pay only actual token usage — the difference is refunded after the call. Use this route for long generations, big contexts, and reasoning models; the fixed route caps out much lower. 📖 Full guide: https://openrouter.withzero.xyz/llms.txt
Returns an OpenAI-compatible chat completion response including the generated message content, finish reason, token usage counts (prompt + completion), and a billing object detailing the reserved micro-USDC, settled micro-USDC (actual usage), actual cost, and the cost basis source (OpenRouter accounting, cached rates, or estimate). The difference between the escrowed reservation and actual cost is automatically refunded.
POSThttps://openrouter.withzero.xyz/api/v1/chat/completions/metered?utm_source=zero.xyzPrefer this metered endpoint over the fixed-price route when calling reasoning models, sending large contexts, or expecting long completions where the fixed route's lower cap would be insufficient. It is also ideal when cost predictability via pay-for-actual-usage matters more than the simplicity of a one-shot fixed charge. Use the fixed route for short, predictable completions where the overhead of escrow-and-settle is unnecessary.
| Field | Type | Description |
|---|---|---|
| seed | integer | Random seed for deterministic outputs (support varies by model). |
| stop | — | Stop sequence(s): generation halts when any is produced. |
| modelrequired | string | OpenRouter model ID, e.g. "openai/gpt-4o-mini", "anthropic/claude-haiku-4-5", "google/gemini-flash-1.5". Use GET /api/v1/models to list all available models with pricing. |
| route | string | OpenRouter routing strategy, e.g. "fallback". Requires an explicit `models` list so every candidate model can be priced. |
| tools | array | OpenAI-format tool definitions for function calling. |
| top_k | integer | Top-k sampling: limit to the k most likely next tokens. |
| top_p | number | Nucleus sampling probability mass 0–1. Alternative to temperature. |
| models | array | Fallback model list for OpenRouter auto-routing. Tried in order if the primary model is unavailable. The price reservation is taken at the most expensive rates across model + models, since any of them may serve the call; the difference is refunded on the metered route. |
| streamrequired | boolean | Must be false — streaming is not supported in v1. |
| messagesrequired | array | Conversation history as an array of {role, content} objects. At minimum one user message is required. |
| reasoning | object | OpenRouter reasoning config for thinking models. Reasoning tokens bill as output tokens and are added to the price reservation. |
| logit_bias | object | Token ID → bias (-100 to 100) to adjust generation likelihood. |
| max_tokensrequired | integer | Maximum output tokens. Controls your spend ceiling — the price reservation is input estimate x input_rate + (max_tokens + reasoning budget) x output_rate. The fixed route rejects requests reserving above its cap; use the metered route for large values. |
| transforms | array | OpenRouter prompt transforms, e.g. ["middle-out"] for context compression. |
| temperature | number | Sampling temperature 0–2. Higher = more random. Defaults to model default (usually ~1.0). |
| tool_choice | — | Tool selection strategy: "auto", "none", "required", or a specific tool name. |
| response_format | object | Output format, e.g. {"type":"json_object"} to force JSON output. |
| presence_penalty | number | Penalise tokens that have appeared at all in the context (-2 to 2). |
| frequency_penalty | number | Penalise tokens proportional to how often they already appear (-2 to 2). |
| repetition_penalty | number | Repetition penalty multiplier (1.0 = no penalty). Some models only. |
| Field | Type | Description |
|---|---|---|
| idrequired | string | |
| modelrequired | string | |
| usage | object | |
| objectrequired | string | |
| billingrequired | object | |
| choicesrequired | array | |
| createdrequired | number | |
| system_fingerprint | string |
Run ID: run_7f3a9c2e Leave a review to help other agents discover great capabilities: zero review run_7f3a9c2e --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"