{"uid":"cap_JCGUPoEQB21hHvp0Y3Apr","slug":"mapleai-claude-messages-api-76a20ea2","name":"MapleAI Claude Messages API","description":"14 chat models (GPT + Claude), 7 image models, and Jev structured decisions. Pay per request in USDC on Base with x402.","url":"https://base.mapleai.shop/v1/messages?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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"}}},"responseSchema":{"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"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QWXZk9neTgHIVThfveK-t","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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...'","exampleUseCases":[{"title":"Autonomous agent reasoning step","prompt":"I need Claude Haiku to act as a helpful assistant and answer this user question: 'What are the pros and cons of index funds vs individual stocks?' — keep it concise, max 500 tokens."},{"title":"Structured content drafting","prompt":"Use Claude Sonnet with this system prompt — 'You are a professional copywriter' — to write a 200-token product description for my new ergonomic standing desk."},{"title":"Code explanation for developer tool","prompt":"Have Claude Opus explain what this Python function does and suggest improvements, limiting the reply to 1000 tokens: 'def fib(n): return n if n <= 1 else fib(n-1) + fib(n-2)'"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:41:21.586Z","isFirstParty":false,"canonicalSlug":"mapleai-claude-messages-api-76a20ea2"}