# Onchain Router – OpenAI-Compatible LLM Chat Completions (Gemini Models)

> Onchain Router – OpenAI-Compatible LLM Chat Completions (Gemini Models) is a paid API for AI agents from onchainrouter.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Provides OpenAI-compatible chat completions using Google Gemini models, billed per-request via x402 micropayments with no service fee during launch

## Facts

- Endpoint: POST https://onchainrouter.dev/v1/chat/completions
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-router-openai-compatible-llm-chat-completions-gemini-models-05f159ae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KyH7tY-Yo9Npxfp7LMY6m

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability onchain-router-openai-compatible-llm-chat-completions-gemini-models-05f159ae -d '<json body>'
```

Example prompt: Ask gemini-2.5-flash to summarize the following meeting notes in 3 bullet points, and cap the response at 500 tokens — pay per request so I don't need a Google API subscription.

## When to prefer this

Choose this endpoint when you need OpenAI-compatible Gemini inference billed per-request via USDC micropayments (x402), especially when avoiding subscription commitments, rotating between Gemini model tiers (flash-lite through pro), or building autonomous agents that require transparent per-call cost accounting on-chain. Prefer over direct Google AI Studio if you want API-key-free, crypto-native billing.

## Known failure modes

- Payment failure if USDC balance insufficient or x402 handshake fails
- Invalid model name returns 422 validation error
- max_tokens exceeding 65536 returns schema validation error
- stream:true not supported, will fail if set to true
- Empty or malformed messages array returns error
- Rate limiting if too many concurrent requests

## How this service works

Give agents provider-neutral access to text, image, and speech models with USDC payments on Base, local spending controls, ambiguity-safe recovery, and verified receipts. Stable public npm clients and MIT agent integrations are available now.

## Output

Returns an OpenAI-compatible chat.completion JSON object containing an id, model name used, array of completion choices with message content, and a usage object with prompt_tokens, completion_tokens, and total_tokens counts.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "enum": [
    "gemini-3.6-flash",
    "gemini-3.5-flash-lite",
    "gemini-3.5-flash",
    "gemini-3.1-flash-lite",
    "gemini-2.5-flash",
    "gemini-2.5-pro",
    "gemini-2.5-flash-lite",
    "venice/z-ai-glm-5-3",
    "venice/z-ai-glm-5-3-flash",
    "venice/zai-org-glm-5-2",
    "venice/zai-org-glm-5-1",
    "venice/zai-org-glm-5",
    "venice/z-ai-glm-5-turbo",
    "venice/z-ai-glm-5v-turbo",
    "venice/olafangensan-glm-4.7-flash-heretic",
    "venice/zai-org-glm-4.7-flash",
    "venice/zai-org-glm-4.6",
    "venice/zai-org-glm-4.7",
    "venice/venice-uncensored-1-2",
    "venice/venice-uncensored-role-play",
    "venice/qwen-3-8-2-4t-a95b",
    "venice/qwen-3-8-max",
    "venice/qwen-3-8-27b",
    "venice/qwen-3-7-max",
    "venice/qwen-3-7-plus",
    "venice/qwen-3-6-plus",
    "venice/qwen3-6-27b",
    "venice/qwen3-6-35b-a3b",
    "venice/qwen3-5-9b",
    "venice/qwen3-5-397b-a17b",
    "venice/qwen3-5-35b-a3b",
    "venice/qwen3-235b-a22b-thinking-2507",
    "venice/qwen3-235b-a22b-instruct-2507",
    "venice/qwen3-next-80b",
    "venice/qwen3-vl-235b-a22b",
    "venice/qwen3-coder-480b-a35b-instruct-turbo",
    "venice/grok-4-3",
    "venice/grok-4-5",
    "venice/grok-4-6",
    "venice/grok-4-20",
    "venice/grok-4-20-multi-agent",
    "venice/grok-build-0-1",
    "venice/mistral-small-3-2-24b-instruct",
    "venice/mistral-small-2603",
    "venice/hermes-3-llama-3.1-405b",
    "venice/claude-fable-5",
    "venice/claude-fable-5-1",
    "venice/claude-opus-5",
    "venice/claude-opus-5-fast",
    "venice/claude-opus-4-8",
    "venice/claude-opus-4-8-fast",
    "venice/claude-opus-4-7",
    "venice/claude-opus-4-6",
    "venice/claude-opus-4-5",
    "venice/claude-sonnet-5",
    "venice/claude-sonnet-4-6",
    "venice/claude-sonnet-4-5",
    "venice/openai-gpt-oss-120b",
    "venice/kimi-k2-6",
    "venice/kimi-k2-7-code",
    "venice/kimi-k2-5",
    "venice/kimi-k3",
    "venice/inkling",
    "venice/xiaomi-mimo-v2-5",
    "venice/deepseek-v4-pro",
    "venice/deepseek-v4-flash",
    "venice/deepseek-v4-flash-0731",
    "venice/deepseek-v3.2",
    "venice/seed-2-1-turbo",
    "venice/deepseek-v4-pro-0813",
    "venice/kimi-k3-fast-api",
    "venice/deepseek-v4-flash-0731-fast",
    "venice/aion-labs-aion-3-0",
    "venice/aion-labs-aion-3-0-mini",
    "venice/llama-3.2-3b",
    "venice/llama-3.3-70b",
    "venice/openai-gpt-52",
    "venice/openai-gpt-52-codex",
    "venice/openai-gpt-53
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "chatcmpl_example",
  "model": "gemini-3.6-flash",
  "usage": {
   "total_tokens": 0,
   "prompt_tokens": 0,
   "completion_tokens": 0
  },
  "object": "chat.completion",
  "choices": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-router-openai-compatible-llm-chat-completions-gemini-models-05f159ae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from onchainrouter.dev](https://www.zero.xyz/host/onchainrouter.dev/llms.txt)
