{"uid":"cap_O6RfJH1Qc6tsfg3M0O2iE","slug":"mapleai-chat-completions-d394d16e","name":"MapleAI Chat Completions","description":"OpenAI-compatible chat completion, priced by counted input tokens + max output tokens at per-model rates","url":"https://sol.mapleai.shop/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":null,"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.001006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2QGrDSu53bT0VqMXCSr8I","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001006","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"OpenAI-compatible chat completion endpoint with per-model token-based pricing, accessible via x402 micropayment","exampleAgentPrompt":"Using the gpt-3.5-turbo model with a max of 512 output tokens, ask the AI: 'You are a helpful assistant. Explain the difference between REST and GraphQL APIs in simple terms.'","exampleUseCases":[{"title":"Automated customer support reply drafting","prompt":"Using the chat completions API with the best available model and up to 300 output tokens, draft a polite reply to this customer message: 'My order hasn't arrived yet and it's been 2 weeks — what should I do?'"},{"title":"Code explanation for developer tools","prompt":"Send this message to the AI model with a system prompt saying 'You are a senior software engineer' and max 500 tokens: 'Can you explain what this Python function does and suggest any improvements?' then include my code snippet."},{"title":"Summarization pipeline for news articles","prompt":"I need a summary of this 800-word news article — use the cheapest available model with max 150 output tokens and a system prompt that says 'Summarize concisely in 3 bullet points'."}],"resultDescription":"Returns an OpenAI-compatible chat completion object containing the assistant's generated message, model used, token usage counts (prompt tokens, completion tokens, total), and finish reason.","failureModes":["Invalid or unsupported model ID returns an error","Missing required 'messages' or 'role'/'content' fields causes a 400 validation error","max_tokens set too low may cause truncated or empty responses","Payment failure via x402 protocol results in 402 Payment Required","Rate limits or overload may return 429 or 503 errors","Malformed message array structure causes rejection"],"whenToPreferThis":"Choose this endpoint when you need an OpenAI-compatible chat completion API with pay-per-call x402 micropayment pricing — ideal for agents that need to avoid subscription commitments, want token-based cost transparency, or are running in a crypto-native payment environment. Prefer this over managed OpenAI or Anthropic APIs when you need decentralized billing or are already operating in a USDC/x402 payment flow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T01:29:37.100Z","isFirstParty":false,"canonicalSlug":"mapleai-chat-completions-d394d16e"}