# OpenRouter via Locus x402

> OpenRouter via Locus x402 is a paid API for AI agents from openrouter.x402.paywithlocus.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Routes chat completion requests to hundreds of LLMs (Anthropic, OpenAI, Google, Meta, and more) through a single OpenAI-compatible API endpoint with micropayment billing via x402.

## Facts

- Endpoint: POST https://openrouter.x402.paywithlocus.com/openrouter/chat?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openrouter-via-locus-x402-95749a2e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ftw77tJNOOVA4dqId9isc

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 openrouter-via-locus-x402-95749a2e -d '<json body>'
```

Example prompt: Using the OpenRouter gateway, send this conversation to anthropic/claude-sonnet-5 with a max of 1024 output tokens: system prompt 'You are a helpful assistant', user message 'Explain quantum entanglement in two sentences'.

## When to prefer this

Choose this endpoint when you need access to multiple LLM providers through a single OpenAI-compatible interface without managing separate API keys, especially when pay-per-call micropayment billing via x402 is preferred over subscription plans. Ideal for agents that need to dynamically route to different models (e.g. cheapest for simple tasks, most capable for complex ones) or compare outputs across providers. Prefer this over direct provider APIs when you want unified billing in USDC and a single integration point.

## Known failure modes

- Invalid or unsupported model ID returns an error — use provider-prefixed IDs like 'anthropic/claude-sonnet-5'
- Missing max_tokens field causes rejection since it's required for x402 payment authorization ceilings
- Insufficient USDC balance or failed x402 payment authorization blocks the request
- Malformed messages array (wrong role values or missing content) returns a validation error
- Exceeding the model's context window with the messages array causes a context length error
- Network timeout if the upstream model provider is slow or unavailable

## How this service works

Unified LLM gateway — one OpenAI-compatible API routing to hundreds of models from Anthropic, OpenAI, Google, Meta, and more.

## Output

Returns a JSON object containing the LLM chat completion response nested under 'data', along with payment metadata showing settled and authorized USDC amounts, a unique request ID, and a status URL for tracking the request. The 'data' field follows the standard OpenAI chat completion response format.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role"
    ],
    "properties": {
     "name": {
      "type": "string"
     },
     "role": {
      "type": "string"
     },
     "content": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "array",
        "items": {
         "type": "object",
         "required": [
          "type"
         ],
         "properties": {
          "text": {
           "type": "string"
          },
          "type": {
           "type": "string"
          },
          "image_url": {
           "type": "object",
           "required": [
            "url"
           ],
           "properties": {
            "url": {
             "type": "string"
            }
           },
           "additionalProperties": true
          }
         },
         "additionalProperties": true
        }
       },
       {
        "type": "null"
       }
      ]
     },
     "tool_calls": {
      "type": "array",
      "items": {
       "type": "object",
       "additionalProperties": true
      }
     },
     "tool_call_id": {
      "type": "string"
     }
    },
    "additionalProperties": true
   }
  },
  "max_tokens": {
   "type": "number"
  },
  "temperature": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "payment": {
   "scheme": "exact",
   "settledUsdc": "0.001000",
   "authorizedMaxUsdc": "0.001000"
  },
  "request": {
   "id": "00000000-0000-4000-8000-000000000000",
   "statusUrl": "/requests/00000000-0000-4000-8000-000000000000"
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openrouter-via-locus-x402-95749a2e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from openrouter.x402.paywithlocus.com](https://www.zero.xyz/host/openrouter.x402.paywithlocus.com/llms.txt)
