# Tokensale Claude Sonnet 5 Chat Completions (x402)

> Tokensale Claude Sonnet 5 Chat Completions (x402) is a paid API for AI agents from tokensale.maiapp.ru, paid per call via x402, $0.002051/call, status unknown (last checked 2026-11-24).

Generates AI chat completions using Claude Sonnet 5 via a pay-per-call x402 USDC endpoint with OpenAI-compatible request/response format.

## Facts

- Endpoint: POST https://tokensale.maiapp.ru/x402/v1/models/claude-sonnet-5/chat/completions?utm_source=zero.xyz
- Price: $0.002051/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tokensale-claude-sonnet-5-chat-completions-x402-b181168e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kkxJN7Swzuj5MOpswQoYE

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 tokensale-claude-sonnet-5-chat-completions-x402-b181168e -d '<json body>'
```

Example prompt: Ask Claude Sonnet 5 through the Tokensale x402 endpoint: send the message 'Explain the theory of relativity in simple terms' with a max of 512 tokens and temperature 0.7, paying per call in USDC.

## When to prefer this

Choose this endpoint when you need Claude Sonnet 5 inference without an Anthropic subscription, want pay-per-call USDC billing via the x402 protocol, require an OpenAI-compatible API format for drop-in Claude access, or are building an agent that self-funds LLM calls via crypto micropayments on Base network. Prefer over direct Anthropic API when you need transparent on-chain billing or lack API key management infrastructure.

## Known failure modes

- Insufficient USDC balance or x402 payment failure — returns 402 Payment Required
- Invalid or missing messages array — returns 400 Bad Request
- Temperature out of range [0,2] — schema validation error
- max_tokens or max_completion_tokens below minimum of 1 — rejected
- Model field mismatch (not exactly 'claude-sonnet-5') — const violation error
- Stream set to true — not supported, returns error
- Upstream Anthropic API unavailability — 502 or 503 error
- Context window exceeded (max 195904 input tokens)

## How this service works

Один API-ключ для GPT и Claude-совместимых клиентов. Пакетные токены, прозрачное списание и контроль доступа.

## Output

Returns an OpenAI-compatible chat.completion JSON object containing the assistant's reply message, finish reason, token usage breakdown (prompt, completion, total), the model ID, and a modelCatalog array with pricing details including per-million-token rates for input, output, cache read, and cache write on Base network in USDC.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "const": "claude-sonnet-5"
  },
  "stream": {
   "type": "boolean",
   "const": false
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object"
   },
   "minItems": 1
  },
  "max_tokens": {
   "type": "integer",
   "minimum": 1
  },
  "temperature": {
   "type": "number",
   "maximum": 2,
   "minimum": 0
  },
  "max_completion_tokens": {
   "type": "integer",
   "minimum": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "x402-request",
  "model": "claude-sonnet-5",
  "usage": {
   "total_tokens": 2,
   "prompt_tokens": 1,
   "completion_tokens": 1
  },
  "object": "chat.completion",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Hello back"
    },
    "finish_reason": "stop"
   }
  ],
  "modelCatalog": [
   {
    "id": "claude-sonnet-5",
    "payment": {
     "scheme": "upto",
     "network": "eip155:8453",
     "currency": "USDC"
    },
    "protocols": [
     "messages"
    ],
    "contextTokens": 200000,
    "maxInputTokens": 195904,
    "maxOutputTokens": 4096,
    "priceUsdPerMillionTokens": {
     "input": "0.100000",
     "output": "0.500000",
     "cacheRead": "0.010000",
     "cacheWrite": "0.114975"
    }
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokensale-claude-sonnet-5-chat-completions-x402-b181168e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tokensale.maiapp.ru](https://www.zero.xyz/host/tokensale.maiapp.ru/llms.txt)
