# Claude Haiku via x402 Gateway

> Claude Haiku via x402 Gateway is a paid API for AI agents from x402-gateway-production.up.railway.app, paid per call via x402, $0.020000/call, status unknown (last checked 2026-10-11, last successful call 2026-06-02).

Call Anthropic's Claude Haiku model — fast and affordable — via a pay-per-call x402-enabled API gateway for simple tasks and high-throughput workloads

## Facts

- Endpoint: POST https://x402-gateway-production.up.railway.app/api/llm/claude-haiku?utm_source=zero.xyz
- Price: $0.020000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Last successful call: 2026-06-02
- Success rate: 97% of calls made through Zero
- Rating: 4.3 / 5 from 1 review
- Activations on Zero: 30
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-production-up-railway-app-4696ae0d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BPYuvaEk0hYu-VOAZzEG_

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 x402-gateway-production-up-railway-app-4696ae0d -d '<json body>'
```

Example prompt: Use Claude Haiku to quickly answer this: 'Summarize the key differences between REST and GraphQL in 3 bullet points' — I need a fast, cheap response, not a heavyweight model.

## When to prefer this

Choose this endpoint when you need fast, affordable Claude Haiku completions with pay-per-call USDC micropayments via x402, especially for high-volume agent pipelines, simple classification tasks, or short Q&A where a heavyweight model is unnecessary. Prefer over GPT-4o-class or Claude Sonnet/Opus endpoints when latency and cost matter more than raw capability.

## Known failure modes

- Payment not sent or insufficient USDC — 402 Payment Required
- Invalid or missing message payload — 400 Bad Request
- Model rate limit exceeded — 429 Too Many Requests
- Gateway or upstream Anthropic outage — 502/503 Service Unavailable
- Malformed JSON body — 400 Bad Request

## How this service works

Anthropic's fastest model — affordable and quick for simple tasks and high throughput

## Output

Returns a text completion or assistant response from Claude Haiku, Anthropic's lightweight fast model, suitable for simple classification, summarization, Q&A, or high-throughput agent subtasks.

## Example request

```json
{
 "model": "claude-haiku-3-5",
 "messages": [
  {
   "role": "user",
   "content": "Summarize the key differences between REST and GraphQL in 3 bullet points"
  }
 ],
 "max_tokens": 256
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "messages"
     ],
     "properties": {
      "stop": {
       "oneOf": [
        {
         "type": "string"
        },
        {
         "type": "array",
         "items": {
          "type": "string"
         },
         "maxItems": 4
        }
       ],
       "description": "Model-supported stop; see /docs/llm-capabilities.md."
      },
      "tools": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "function"
        ],
        "properties": {
         "type": {
          "enum": [
           "function"
          ],
          "type": "string"
         },
         "function": {
          "type": "object",
          "properties": {
           "name": {
            "type": "string"
           },
           "strict": {
            "type": "boolean"
           },
           "parameters": {
            "type": "object"
           },
           "description": {
            "type": "string"
           }
          }
         }
        }
       },
       "description": "Client-executed function definitions; return results using role=tool and tool_call_id."
      },
      "top_k": {
       "type": "integer",
       "description": "Model-supported top_k; see /docs/llm-capabilities.md."
      },
      "top_p": {
       "type": "number",
       "description": "Model-supported top_p; see /docs/llm-capabilities.md."
      },
      "stream": {
       "type": "boolean",
       "description": "Return live OpenAI-compatible SSE after payment settlement."
      },
      "plugins": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "pdf"
        ],
        "properties": {
         "id": {
          "enum": [
           "file-parser"
          ],
          "type": "string"
         },
         "pdf": {
          "type": "object",
          "properties": {
           "engine": {
            "enum": [
             "native"
            ],
            "type": "string"
           }
          }
         }
        }
       },
       "description": "Optional native PDF parser only; automatically enabled for file inputs."
      },
      "messages": {
       "type": "ar
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-production-up-railway-app-4696ae0d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production.up.railway.app](https://www.zero.xyz/host/x402-gateway-production.up.railway.app/llms.txt)
