{"uid":"cap_ydeCGKRVU0uIGUezaDGyG","slug":"mapleai-gpt-chat-completions-api-x402-pay-per-request-c2190527","name":"MapleAI GPT Chat Completions API (x402 Pay-Per-Request)","description":"OpenAI-compatible chat completion, priced by counted input tokens + max output tokens at per-model rates","url":"https://base.mapleai.shop/api/v1/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Model ID from GET /v1/models"},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant","tool"],"type":"string"},"content":{"type":"string"}}}},"max_tokens":{"type":"integer","minimum":1}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl_example","object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello!"},"finish_reason":"stop"}]}},"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_Eag4FHeYHKz-Agnm4dIXC","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":"Provides OpenAI-compatible chat completions using four GPT models (GPT-5.6 Sol, GPT-5.6 Terra, GPT-6 Luna, GPT-6 Sol) with per-request USDC micropayment via x402 on Base.","exampleAgentPrompt":"Using MapleAI's GPT-6 Luna model, send this conversation — system: 'You are a helpful coding assistant', user: 'Write a Python function that reverses a linked list' — and give me the response, up to 512 tokens.","exampleUseCases":[{"title":"One-off coding help with GPT-6","prompt":"Use MapleAI's GPT-6 Sol model to answer this for me — system: 'You are an expert software engineer', user: 'Explain the difference between async/await and promises in JavaScript with examples' — cap the reply at 800 tokens."},{"title":"Automated content drafting agent","prompt":"I'm building an agent that drafts product descriptions. Using MapleAI's GPT-5.6 Terra model, send: system: 'You are a marketing copywriter', user: 'Write a 3-sentence product description for a noise-cancelling travel pillow' — limit to 200 tokens."},{"title":"Comparing GPT model tiers on same prompt","prompt":"Send the same message to MapleAI's GPT-5.6 Sol and GPT-6 Luna models — system: 'You are a summarizer', user: 'Summarize the causes of World War I in 5 bullet points' — max 300 tokens each — so I can compare the outputs."}],"resultDescription":"Returns an OpenAI-compatible chat completion JSON object containing a unique completion ID, the model used, the assistant's reply message, the finish reason (e.g. 'stop'), and the choice index. The content field holds the generated text response.","failureModes":["Payment failure: x402 payment not processed or insufficient USDC balance — request rejected before completion","Invalid model ID: model string not found in /v1/models — returns error response","Malformed messages array: missing required 'role' or 'content' fields — validation error","max_tokens too low for the prompt context — truncated or empty response","Rate limiting or capacity issues on MapleAI infrastructure — 503 or timeout","Network failure on Base blockchain payment settlement — request not fulfilled"],"whenToPreferThis":"Choose this endpoint when you need OpenAI-compatible chat completions with no monthly subscription, paying only $0.01 USDC per call via the x402 protocol on Base. Ideal for infrequent or bursty workloads, agent pipelines needing crypto-native billing, or developers wanting to experiment with GPT-5.6 and GPT-6 model tiers without committing to a plan. Prefer over standard OpenAI API when you need USDC micropayment billing or want to avoid API key subscription overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T01:18:24.484Z","isFirstParty":false,"canonicalSlug":"mapleai-gpt-chat-completions-api-x402-pay-per-request-c2190527"}