# Locus x402 Claude Chat API

> Locus x402 Claude Chat API is a paid API for AI agents from anthropic.x402.stage.paywithlocus.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Pay-per-use metered chat completions endpoint proxying Anthropic Claude models (Opus 4, Sonnet 4, Haiku 4) via x402 micropayment protocol

## Facts

- Endpoint: POST https://anthropic.x402.stage.paywithlocus.com/anthropic/chat
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/locus-x402-claude-chat-api-b7589107
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yazbVH6C-BfQmE3PAiNVP

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-claude-chat-api-b7589107 -d '<json body>'
```

Example prompt: Using the Locus x402 pay-per-call Claude endpoint, send this conversation to claude-sonnet-4-6 with a max of 1024 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 on-demand, pay-per-call access to Anthropic Claude models without a subscription or prepaid API key — especially in agentic contexts where usage is sporadic or cost must be directly tied to each call. Ideal when your agent runtime supports the x402 micropayment protocol and you want to access Opus-class reasoning or extended thinking without committing to a monthly plan. Prefer this over the direct Anthropic API when you lack API credentials or need USDC-denominated billing.

## Known failure modes

- Payment failure or insufficient USDC balance via x402 protocol returns 402 Payment Required
- Unsupported model ID returns 400 Bad Request
- Exceeding model token limits (128k Opus, 64k Sonnet/Haiku) causes truncation or error
- Malformed messages array structure returns validation error
- Rate limiting or upstream Anthropic outage returns 503 or 500
- Invalid tool definition schema causes tool-calling errors

## How this service works

Locus public pay-per-use API

## Output

Returns an Anthropic-compatible chat completion response object containing the assistant's reply message, stop reason, usage statistics (input/output tokens billed), and any tool call payloads if tools were invoked. Extended thinking responses include thinking token blocks billed at the output token rate.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string"
  },
  "tools": {
   "type": "array",
   "items": {}
  },
  "top_k": {
   "type": "number"
  },
  "top_p": {
   "type": "number"
  },
  "system": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "array",
     "items": {}
    }
   ]
  },
  "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
   }
  },
  "thinking": {
   "type": "object",
   "additionalProperties": true
  },
  "max_tokens": {
   "type": "number"
  },
  "temperature": {
   "type": "number"
  },
  "tool_choice": {
   "type": "object",
   "additionalProperties": true
  },
  "stop_sequences": {
   "type": "array",
   "items": {
    "type": "string"
   }
  }
 }
}
```

## More

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