# MapleAI Claude Messages API

> MapleAI Claude Messages API is a paid API for AI agents from base.mapleai.shop, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Sends a chat message to a Claude model (Haiku, Sonnet, or Opus) and returns a text completion, using Anthropic's messages format with pay-per-request USDC billing via x402.

## Facts

- Endpoint: POST https://base.mapleai.shop/v1/messages?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mapleai-claude-messages-api-76a20ea2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JCGUPoEQB21hHvp0Y3Apr

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 mapleai-claude-messages-api-76a20ea2 -d '<json body>'
```

Example prompt: Ask Claude Sonnet to summarize the following article in 3 bullet points, keeping the response under 300 tokens: 'Renewable energy capacity grew by 50% globally last year, driven by solar and wind installations...'

## When to prefer this

Choose this endpoint when you need Anthropic-compatible Claude model access (Haiku, Sonnet, Opus) on a pay-per-request basis without committing to an Anthropic subscription or prepaid credits. It is ideal for agents that need occasional or unpredictable Claude inference volumes, want to pay in USDC on Base via x402, or require the standard Anthropic messages format for drop-in compatibility with existing Claude-based code.

## Known failure modes

- Missing or invalid model ID returns a 400 error
- max_tokens not provided triggers an Anthropic API validation error
- Unsupported model string results in a model-not-found error
- Insufficient USDC balance or failed x402 payment prevents the request from being processed
- Malformed messages array (missing role or content) causes a schema validation failure
- Stream mode may require SSE-compatible client handling

## How this service works

14 chat models (GPT + Claude), 7 image models, and Jev structured decisions. Pay per request in USDC on Base with x402.

## Output

Returns a JSON object in Anthropic's messages format containing the assistant's text response(s), the stop reason (e.g. end_turn), input and output token counts, the model used, and a unique message ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Claude model id (claude-haiku-4-5, claude-sonnet-*, claude-opus-* — full list in GET /v1/models)"
  },
  "stream": {
   "type": "boolean"
  },
  "system": {
   "type": "string",
   "description": "System prompt (string or array of text blocks)"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "user",
       "assistant"
      ],
      "type": "string"
     },
     "content": {}
    }
   }
  },
  "max_tokens": {
   "type": "integer",
   "minimum": 1,
   "description": "Required by the Anthropic API"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "msg_example",
  "role": "assistant",
  "type": "message",
  "model": "claude-sonnet-5",
  "usage": {
   "input_tokens": 12,
   "output_tokens": 2
  },
  "content": [
   {
    "text": "Hello!",
    "type": "text"
   }
  ],
  "stop_reason": "end_turn"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapleai-claude-messages-api-76a20ea2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base.mapleai.shop](https://www.zero.xyz/host/base.mapleai.shop/llms.txt)
