# Locus x402 OpenRouter Chat Completions

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

Pay-per-use LLM chat completions gateway via OpenRouter, billed per-call at $0.001 USDC using the x402 payment protocol

## Facts

- Endpoint: POST https://openrouter.x402.stage.paywithlocus.com/openrouter/chat?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Success rate: 0% of calls made through Zero
- Activations on Zero: 2
- Tags: x402
- Canonical page: https://www.zero.xyz/c/locus-x402-openrouter-chat-completions-66210c4b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NcUKPtZLIifaM2aQhW0nS

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 locus-x402-openrouter-chat-completions-66210c4b -d '<json body>'
```

Example prompt: Send this conversation to anthropic/claude-sonnet-5 via the Locus x402 OpenRouter gateway — system: 'You are a helpful assistant', user: 'Summarize the history of the Roman Empire in 3 bullet points', with max_tokens 300 and temperature 0.7, paying the $0.001 USDC per-call fee automatically.

## When to prefer this

Choose this endpoint when you need pay-per-use LLM inference billed in USDC micropayments via the x402 protocol — ideal for agents that want to avoid monthly API subscriptions, need to access multiple model providers (Anthropic, OpenAI, Google) through a single endpoint, or are building autonomous systems where cost is metered per individual inference call. Prefer this over direct OpenAI or Anthropic APIs when you want crypto-native billing without pre-purchase commitments.

## Known failure modes

- Payment authorization failure if x402 USDC balance is insufficient — returns 402 Payment Required
- Invalid or unsupported model ID returns a 400 or model-not-found error
- max_tokens not provided — required for x402 cost ceiling enforcement, will likely reject the request
- Token limit exceeded if prompt plus max_tokens surpasses the model's context window
- Rate limiting or upstream OpenRouter errors propagated as 5xx responses
- Malformed messages array (wrong role values or missing content) causes validation errors

## How this service works

Locus public pay-per-use API

## Output

Returns a chat completion response in OpenAI-compatible format containing the assistant's generated message, model used, token usage counts, and finish reason. The response mirrors the OpenRouter/OpenAI chat completions schema with the `choices` array holding the assistant reply.

## 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"
  }
 }
}
```

## More

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