Skip to content

LLM Gateway Models

Payment wires: every paid endpoint accepts x402 and MPP (Machine Payments Protocol) on the same 402 - see Paying with x402 and Paying with MPP. Agent402 is the applied layer of Agentic Finance: agents that pay and get paid on their own.

Typed judgment, image and speech generation, the OpenClaw provider plugin and the model lifecycle of the LLM Gateway (OpenAI /v1). Request options are on LLM Gateway Options.

Typed judgment (/v1/judge, /v1/decisions)

Questions your code can branch on instead of prose to parse. Model-backed, wallet-only (no proof-of-work).

Route Price What it does
POST /v1/judge $0.001 state (text or JSON, up to 8,000 characters) and up to 8 questions, each noul (a yes/no probability), choice (one of your named options, with a probability each) or score (a position on levels you describe). model picks the first backend (jev-latest, jev-preview, microsoft-decision-1, gemini-decision-1, gpt-6-luna); the others are fallbacks, and the answer names the model that served and fallbackFrom when the first was unavailable. A noul the model gave no probability for reads noul: null with noProbability: true.
POST /v1/decisions $0.001 The same judgment on OpenAI's Decisions wire: point an OpenAI SDK here and decisions.create works unchanged.

jev-latest is the Jev version we have tested; every answer names the version that served it (for example jev-1.14.0). jev-preview reaches the newer release. A request larger than one call covers is refused with nothing charged on x402.

Image generation

POST /v1/images/generations speaks the OpenAI images wire - any OpenAI SDK's images.generate() works by changing base_url. Send {"prompt": "..."} (up to 4,000 chars) and get {created, model, data: [{b64_json, media_type}]} back - one image per call at a flat $0.08, n locked to 1, response_format is always inline b64_json (nothing is hosted). zdr: true works here too. The model is FLUX.2 Pro (MAI-Image-2.6 Flash as the failover), each pinned to one provider with a per-image bound and a live price re-check.

Text-to-speech

POST /v1/audio/speech speaks the OpenAI TTS wire, so any OpenAI SDK's audio.speech.create() works by changing base_url. Send {"input": "...", "voice": "alloy"} (up to 2,000 chars) and raw audio bytes come back, mp3 by default and pcm on request, at a flat $0.06 per call. zdr: true works here too.

There is no OpenAI TTS model on the upstream, so the tier serves a five-model failover chain instead, walking to the next link on any upstream failure including an empty audio body. The 11 OpenAI voice names (alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, verse) are accepted on every link and mapped to that model's closest native voice; each model's native voice ids (e.g. en_paul_cheerful) are also accepted directly and are listed per model on GET /v1/models. Pinning model moves that link to the front of the chain rather than disabling the rest.

Two request fields differ from OpenAI's:

  • instructions is rejected with a self-explaining 400: no serving model supports it. Pick an expressive native voice instead.
  • speed is accepted anywhere in 0.25–4; most serving models ignore it.

OpenClaw provider plugin (agent402-model-provider)

OpenClaw talks to any OpenAI-compatible provider through one block in openclaw.json, and the agent402-model-provider npm plugin writes that block for this gateway: AGENT402_CREDITS_KEY=a402_... npx agent402-model-provider setup --write stores a prepaid credits key (/credits says whether packs are on sale) and starts a loopback proxy that carries it, so OpenClaw itself never holds a payment credential. auto (routed per prompt, flat $0.01 per call) is offered beside every id on GET /v1/models; explicit models ride the metered route by default (--flat keeps them on their flat tiers), and setup picks the cheapest preferred metered model whose input cap holds OpenClaw's own system prompt as the primary. A wallet can pay instead of a credits key (AGENT402_WALLET_KEY, an EVM key holding USDC on Base): exact by default, or upto after a one-time agent402-model-provider permit2-approve, so the wallet settles actual usage plus the per-request fixed part the quote carries; agent402-model-provider doctor reports which mode it is in. Full guide: agent402.tools/guides/openclaw-model-provider.

Retired model ids

A request that names a model the upstream has retired is served by its successor, and the reply says so in agent402_model_substituted. Current mappings include anthropic/claude-sonnet-4 and anthropic/claude-sonnet-4.5 (with Anthropic's dated id claude-sonnet-4-5-20250929) to anthropic/claude-sonnet-5.5, qwen/qwen3.5-9b to qwen/qwen3.7-flash, qwen/qwen-2.5-7b-instruct to mistralai/ministral-8b-2512, the Gemini 2.5 models to their Gemini 3.x successors, the Laguna 2.1 models to Ministral, and meta-llama/llama-3.2-1b-instruct and meta-llama/llama-3.2-3b-instruct to mistralai/ministral-3b-2512. From its upstream expiration on 2026-12-11, openai/gpt-5 is served by openai/gpt-6.1-sol. From the same day openai/o3 is served by openai/gpt-6.1-sol, openai/gpt-5-mini by openai/gpt-6.1-terra and openai/gpt-5-nano by openai/gpt-6-luna, the successors OpenAI names, and openai/gpt-5-pro and openai/o3-pro by openai/gpt-6.1-sol-pro, the pro mode of OpenAI's named successor. anthropic/claude-opus-4.5 is served as itself until its upstream expiration on 2027-01-22, then by anthropic/claude-opus-5.5. GPT-4o, GPT-4o mini, GPT-4.1 and GPT-4.1 mini are scheduled to be retired upstream on 2027-01-14.

Upstream service tiers

Where the upstream offers it (the Gemini 3.x flash families, gpt-5.6-* and gpt-6 luna/sol, and gpt-5-nano while it is served as itself, which ends on 2026-12-11), the gateway asks for the upstream's flex service tier first (higher latency, lower availability) and retries the same model on the default tier if flex has no capacity, before moving to the next failover link. Buyers see the same price either way; the response's service_tier field says which tier served.