# Onchain Router – AI Model Chat Completions via USDC

> Onchain Router – AI Model Chat Completions via USDC is a paid API for AI agents from llm.agenticfi.wtf, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Routes OpenAI-compatible chat completion requests to Google Gemini models, charging $0.002 USDC per call with an on-chain payment receipt.

## Facts

- Endpoint: POST https://llm.agenticfi.wtf/v1/chat/completions
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-router-ai-model-chat-completions-via-usdc-c93ec47a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_H3VmmYMW0JH7VmnmPmmw_

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-ai-model-chat-completions-via-usdc-c93ec47a -d '<json body>'
```

Example prompt: Using the Onchain Router with Gemini 2.5 Flash, generate a 200-word product description for a noise-cancelling headphone called 'AuraSound Pro' — pay with USDC per request and give me back the completion.

## When to prefer this

Choose this endpoint when you need OpenAI-compatible chat completions backed by Google Gemini models and want to pay per-request in USDC with an on-chain receipt — ideal for crypto-native agents, Web3 applications, or any workflow requiring auditable micropayment records per LLM inference. Prefer it over direct Google AI APIs when you need provider neutrality, stablecoin billing, or durable blockchain receipts without managing API keys per provider.

## Known failure modes

- Insufficient USDC balance — payment fails and request is rejected
- Invalid or unsupported model enum value — schema validation error
- max_tokens exceeds 65536 limit — request rejected
- stream:true sent (not supported) — error returned
- Network or provider outage — upstream Gemini API error propagated
- Malformed messages array — JSON schema validation failure

## How this service works

Request-priced LLM inference · 0% service fee launch promotion

## Output

A JSON object in OpenAI chat.completion format containing: a unique completion ID, the model used, token usage breakdown (prompt, completion, total), and an array of message choices with the generated text. A USDC payment receipt is also recorded on-chain per call.

## 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"
   ],
   "type": "string"
  },
  "stream": {
   "type": "boolean",
   "const": false
  },
  "messages": {
   "type": "array"
  },
  "max_tokens": {
   "type": "integer",
   "maximum": 65536,
   "minimum": 1
  }
 }
}
```

## 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-ai-model-chat-completions-via-usdc-c93ec47a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from llm.agenticfi.wtf](https://www.zero.xyz/host/llm.agenticfi.wtf/llms.txt)
