{"openapi":"3.1.0","info":{"title":"MapleAI","version":"1.0.0","description":"Pay-per-request API access via x402 on Base mainnet. 14 chat models (GPT + Claude), 7 image models, and Jev structured decisions; no accounts or client API keys.","contact":{"name":"MapleAI","email":"contact@mapleai.shop","url":"https://base.mapleai.shop"},"license":{"name":"Proprietary","identifier":"LicenseRef-Proprietary"},"x-guidance":"Agent guidance. What this is: pay-per-request LLM inference; every call is paid with USDC exactly once, no account, no API key. How to pay: POST any paid endpoint without credentials. You get HTTP 402 and a PAYMENT-REQUIRED header with accepts[] (scheme exact, asset USDC, payTo, amount in atomic units). Pick an entry on a network your wallet is funded on, sign the USDC transfer, retry the identical request with the signed payload in the PAYMENT-SIGNATURE header. The product and an on-chain receipt arrive in one response. Inputs: OpenAI-compatible JSON bodies; model id from GET /v1/models. Outputs: OpenAI-compatible JSON (chat/responses/messages), JSON with url/b64 (images), binary audio (TTS). When to call: /v1/chat/completions, /v1/responses or /v1/messages for text (Claude models cost 50% of list); /api/v1/images/generations and /image2image for images; /v1/audio/speech and /v1/audio/transcriptions for speech; /v1/web/search and /v1/x/* for live web/X data with citations; /jev for deterministic structured JSON decisions; /v1/agents/execute for multi-step tool runs. Free eval paths (no payment, no key): POST /v1/embeddings for embeddings (RAG, semantic search, clustering) and POST /v1/free/chat/completions (rate-limited). Budget: minimum charge 0.001 USDC; a typical chat call settles for about $0.004. Agents that prefer pay-once: POST /prepaid/codes or /prepaid/codes/auto mints a Bearer key with a token budget, then call /prepaid/v1/* routes with no per-request payment; GET /prepaid/status reports the remaining budget.","x-payment":{"protocol":"x402","network":"eip155:8453","asset":"USDC","assetAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x63db6eaf635a31bbc6714fe37bdc85243864f611","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402","minimumChargeUsd":0.001}},"servers":[{"url":"https://base.mapleai.shop"}],"x-discovery":{"well-known":"https://base.mapleai.shop/.well-known/x402","llms":"https://base.mapleai.shop/llms.txt","agents":"https://base.mapleai.shop/AI-AGENTS.md","ownershipProofs":["rQZJejmJ179aDRKDA2Uxmu29u6Cye3JyAjMT7TX7mgfPCikZvn52Aoz2rCFgNiezYcpDT5RkvNpTFeT6sb3YK6X","0x099ce2927a83bb1addab87f88d4d522735b824eabe6394593926374eef4394ae621f4d245671210b713fc0d2752171606c512054830a37e33b5ca5c5993850e91c","0x87c5b0027ad36300dee3d4da0a308803726677d4155a59f1c539bee268c407080309ec89dd23395521ebee327ca8e697f36587612c3d86b2f6a3513e5c32bbc31c","0xb68189e68f6ceeccce47034e41573a6c0221f5a9d98e88c5973a2395b896ebc617eb8694c4a0ef91c29db22cb0b2f6599097ab3e657f6dde74e2ea414f884a121c"]},"x-agentcash-provenance":{"ownershipProofs":["rQZJejmJ179aDRKDA2Uxmu29u6Cye3JyAjMT7TX7mgfPCikZvn52Aoz2rCFgNiezYcpDT5RkvNpTFeT6sb3YK6X","0x099ce2927a83bb1addab87f88d4d522735b824eabe6394593926374eef4394ae621f4d245671210b713fc0d2752171606c512054830a37e33b5ca5c5993850e91c","0x87c5b0027ad36300dee3d4da0a308803726677d4155a59f1c539bee268c407080309ec89dd23395521ebee327ca8e697f36587612c3d86b2f6a3513e5c32bbc31c","0xb68189e68f6ceeccce47034e41573a6c0221f5a9d98e88c5973a2395b896ebc617eb8694c4a0ef91c29db22cb0b2f6599097ab3e657f6dde74e2ea414f884a121c"]},"components":{"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 payment payload. Request the resource once to receive HTTP 402 with the exact price in the PAYMENT-REQUIRED header, sign the USDC transfer, then retry with the signed payload in PAYMENT-SIGNATURE."},"prepaidBearer":{"type":"http","scheme":"bearer","description":"Prepaid buyer key (oms_buy_...) minted by POST /prepaid/codes or /prepaid/codes/auto. Spends from the key's token budget; no x402 payment is needed."}}},"paths":{"/api/v1/images/generations":{"post":{"summary":"Generate images","operationId":"generateImages","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/api/v1/images/generations \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"gpt-image-2\",\"size\":\"1024x1024\",\"n\":1,\"prompt\":\"A maple leaf\"}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per image","models":{"gpt-image-2":{"1024x1024":0.02},"gpt-image-2.5":{"1024x1024":0.04},"gpt-image-2.5-flare":{"1024x1024":0.04},"gpt-image-2.5-sunburst":{"1024x1024":0.04},"grok-imagine-image":{"1024x1024":0.045},"gpt-image-2-2k":{"2048x2048":0.09},"gpt-image-2.5-sunburst-2k":{"2048x2048":0.22}}},"requestBody":{"required":true,"content":{"application/json":{"example":{"model":"gpt-image-2","size":"1024x1024","n":1,"prompt":"A maple leaf"},"schema":{"type":"object","required":["model","size","prompt"],"properties":{"model":{"type":"string","enum":["gpt-image-2","gpt-image-2.5","gpt-image-2.5-flare","gpt-image-2.5-sunburst","grok-imagine-image","gpt-image-2-2k","gpt-image-2.5-sunburst-2k"]},"size":{"type":"string","example":"1024x1024","description":"A listed size for the selected model"},"n":{"type":"integer","minimum":1,"maximum":4,"default":1},"prompt":{"type":"string","example":"A maple leaf","maxLength":4000}}}}}},"responses":{"200":{"description":"Generated images","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"created":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"b64_json":{"type":"string"}}}}}}}}},"400":{"description":"Invalid image request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Image upstream failed"}}}},"/api/v1/images/image2image":{"post":{"summary":"Edit an image","operationId":"editImage","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/api/v1/images/image2image \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"gpt-image-2\",\"size\":\"1024x1024\",\"n\":1,\"prompt\":\"Make the leaf green\",\"image\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC\"}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per image","models":{"gpt-image-2":{"1024x1024":0.02},"gpt-image-2.5":{"1024x1024":0.04},"gpt-image-2.5-flare":{"1024x1024":0.04},"gpt-image-2.5-sunburst":{"1024x1024":0.04},"grok-imagine-image":{"1024x1024":0.045},"gpt-image-2-2k":{"2048x2048":0.09},"gpt-image-2.5-sunburst-2k":{"2048x2048":0.22}}},"requestBody":{"required":true,"content":{"application/json":{"example":{"model":"gpt-image-2","size":"1024x1024","n":1,"prompt":"Make the leaf green","image":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC"},"schema":{"type":"object","required":["model","size","prompt","image"],"properties":{"model":{"type":"string","enum":["gpt-image-2","gpt-image-2.5","gpt-image-2.5-flare","gpt-image-2.5-sunburst","grok-imagine-image","gpt-image-2-2k","gpt-image-2.5-sunburst-2k"]},"size":{"type":"string","example":"1024x1024","description":"A listed size for the selected model"},"n":{"type":"integer","minimum":1,"maximum":4,"default":1},"prompt":{"type":"string","example":"A maple leaf","maxLength":4000},"image":{"type":"string","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4z8AAAAMBAQDJ/pLvAAAAAElFTkSuQmCC","description":"PNG, JPEG or WebP base64 data URI, maximum 10 MB"}}}}}},"responses":{"200":{"description":"Generated images","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"created":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"b64_json":{"type":"string"}}}}}}}}},"400":{"description":"Invalid image request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Image upstream failed"}}}},"/v1/audio/speech":{"post":{"summary":"Text-to-speech synthesis","operationId":"createSpeech","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/audio/speech \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"tts-1\",\"input\":\"Hello from MapleAI\",\"voice\":\"alloy\",\"response_format\":\"wav\"}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"fixed","amount":0.015,"currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"requestBody":{"required":true,"content":{"application/json":{"example":{"model":"tts-1","input":"Hello from MapleAI","voice":"alloy","response_format":"wav"},"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","enum":["tts-1","tts-1-hd","orpheus-english","orpheus-arabic"]},"input":{"type":"string","maxLength":5000},"voice":{"type":"string","default":"alloy"},"response_format":{"type":"string","enum":["wav"],"default":"wav"},"speed":{"type":"number","minimum":0.25,"maximum":4}}}}}},"responses":{"200":{"description":"Synthesized audio","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid speech request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"TTS upstream failed"}}}},"/v1/audio/transcriptions":{"post":{"summary":"Transcribe audio (speech-to-text)","operationId":"createTranscription","security":[{"x402":[]}],"x-payment-info":{"price":{"mode":"fixed","amount":0.006,"currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Audio file (mp3, wav, m4a, ogg, flac, webm), max 25 MB"},"model":{"type":"string","enum":["whisper-1","whisper-large-v3","whisper-large-v3-turbo"],"default":"whisper-1"},"response_format":{"type":"string","enum":["json","text","verbose_json","srt","vtt"],"default":"json"}}}},"application/json":{"schema":{"type":"object","required":["file"],"properties":{"model":{"type":"string","enum":["whisper-1","whisper-large-v3","whisper-large-v3-turbo"],"default":"whisper-1"},"file":{"type":"string","description":"Audio as base64 or data URI, max 25 MB"},"response_format":{"type":"string","enum":["json","text","verbose_json","srt","vtt"],"default":"json"}}}}}},"responses":{"200":{"description":"Transcript","content":{"application/json":{"example":{"text":"Hello from MapleAI"}}}},"400":{"description":"Invalid transcription request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Transcription upstream failed"}}}},"/prepaid/codes":{"post":{"summary":"Buy a prepaid GPT API code","operationId":"buyPrepaidCode","security":[{"x402":[]}],"description":"Purchases a prepaid bearer API key for https://mapleai.shop/v1. The key is limited to the selected model and a total token budget in 100000-token steps from 100000 to 1000000. Pricing uses the model input rate plus the network settlement fee. Check key usage and status any time: GET https://mapleai.shop/v1/prepaid/status with the prepaid key as the Bearer token.","x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/prepaid/codes \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"openai/gpt-6-luna\",\"tokens\":100000}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-pricing":{"unit":"prepaid token pack","models":{"openai/gpt-5.6-sol":{"input":2.8,"output":14},"openai/gpt-5.6-terra":{"input":1.4,"output":8.4},"openai/gpt-6-luna":{"input":0.07,"output":0.35},"openai/gpt-6-sol":{"input":1.4,"output":7},"anthropic/claude-haiku-4-5":{"input":0.5,"output":2.5},"anthropic/claude-sonnet-4-5":{"input":1.5,"output":7.5},"anthropic/claude-sonnet-4-6":{"input":1.5,"output":7.5},"anthropic/claude-sonnet-5":{"input":1,"output":5},"anthropic/claude-sonnet-5-5":{"input":1,"output":5},"anthropic/claude-opus-4-6":{"input":2.5,"output":12.5},"anthropic/claude-opus-4-7":{"input":2.5,"output":12.5},"anthropic/claude-opus-4-8":{"input":2.5,"output":12.5},"anthropic/claude-opus-5":{"input":2.5,"output":12.5},"anthropic/claude-opus-5-5":{"input":2,"output":10}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","tokens"],"properties":{"model":{"type":"string","enum":["openai/gpt-5.6-sol","openai/gpt-5.6-terra","openai/gpt-6-luna","openai/gpt-6-sol","anthropic/claude-haiku-4-5","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet-5","anthropic/claude-sonnet-5-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-opus-4-8","anthropic/claude-opus-5","anthropic/claude-opus-5-5","jev-latest"]},"tokens":{"type":"integer","minimum":100000,"maximum":1000000,"multipleOf":100000}}},"example":{"model":"openai/gpt-6-luna","tokens":100000}}}},"responses":{"201":{"description":"Prepaid bearer API key","content":{"application/json":{"example":{"object":"prepaid_code","code":"oms_buy_example","model":"openai/gpt-6-luna","tokens":{"total":100000,"remaining":100000},"api_base":"https://mapleai.shop/v1","status_url":"https://mapleai.shop/v1/prepaid/status"}}}},"400":{"description":"Invalid model or token amount"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"503":{"description":"Prepaid key issuer unavailable"}}}},"/prepaid/codes/auto":{"post":{"summary":"One-shot prepaid tap (empty body)","operationId":"buyPrepaidCodeAuto","security":[{"x402":[]}],"description":"POST with an empty or partial body: defaults buy a 100000-token openai/gpt-6-luna prepaid key without any parameters. Optional model and tokens override follow the same rules as /prepaid/codes.","x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/prepaid/codes/auto \\\n  -H 'content-type: application/json' \\\n  -d '{}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","enum":["openai/gpt-5.6-sol","openai/gpt-5.6-terra","openai/gpt-6-luna","openai/gpt-6-sol","anthropic/claude-haiku-4-5","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet-5","anthropic/claude-sonnet-5-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-opus-4-8","anthropic/claude-opus-5","anthropic/claude-opus-5-5","jev-latest"]},"tokens":{"type":"integer","minimum":100000,"maximum":1000000}}},"example":{}}}},"responses":{"201":{"description":"Prepaid bearer API key","content":{"application/json":{"example":{"object":"prepaid_code","code":"oms_buy_example","model":"openai/gpt-6-luna","tokens":{"total":100000,"remaining":100000},"api_base":"https://mapleai.shop/v1","status_url":"https://mapleai.shop/v1/prepaid/status"}}}},"400":{"description":"Invalid model or token amount"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"503":{"description":"Prepaid key issuer unavailable"}}}},"/prepaid/v1/chat/completions":{"post":{"summary":"Chat completion with a prepaid key (no x402)","operationId":"prepaidChatCompletion","security":[{"prepaidBearer":[]}],"description":"Spend a prepaid buyer key: same OpenAI-compatible body as /v1/chat/completions, authorized with Authorization: Bearer oms_buy_... instead of an x402 payment. Tokens are debited from the key's budget. /prepaid/v1/* forwards any OpenAI-compatible subpath (responses, embeddings, ...) to the prepaid API the same way.","x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/prepaid/v1/chat/completions \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"openai/gpt-6-luna\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"max_tokens\":8}'","payment":"none"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","enum":["openai/gpt-5.6-sol","openai/gpt-5.6-terra","openai/gpt-6-luna","openai/gpt-6-sol","anthropic/claude-sonnet-5","anthropic/claude-opus-4-8","anthropic/claude-opus-5","anthropic/claude-haiku-4-5","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet-5-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-opus-5-5"]},"messages":{"type":"array","description":"OpenAI chat messages","items":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"type":"string"}}}},"max_tokens":{"type":"integer","default":4096},"temperature":{"type":"number"},"stream":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Chat completion"},"401":{"description":"Missing, invalid or exhausted prepaid key"},"403":{"description":"Model not allowed for this key"},"502":{"description":"Prepaid gateway unavailable"}}}},"/prepaid/v1/jev":{"post":{"summary":"Jev structured decisions with a prepaid key (no x402)","operationId":"prepaidJevDecision","security":[{"prepaidBearer":[]}],"description":"Spend a prepaid buyer key on Jev structured decisions: same body as /jev (model jev-latest with state and named questions). Debits INPUT tokens only — Jev output is free. Failed upstream calls do not touch the budget.","x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/prepaid/v1/jev \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"jev-latest\",\"state\":\"The invoice was charged twice.\",\"questions\":{\"urgent\":{\"type\":\"noul\",\"instructions\":\"Is it time-sensitive?\"}}}'","payment":"none"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","state","questions"],"properties":{"model":{"type":"string","enum":["jev-latest"]},"state":{"type":"string"},"questions":{"type":"object"}}}}}},"responses":{"200":{"description":"Typed judgments with per-question answers and usage"},"401":{"description":"Missing, invalid or exhausted prepaid key"},"403":{"description":"Model not allowed for this key"},"502":{"description":"Jev upstream unavailable"}}}},"/prepaid/status":{"get":{"summary":"Prepaid key usage and status (free)","operationId":"prepaidKeyStatus","security":[{"prepaidBearer":[]}],"description":"Self-service status for a prepaid buyer key. The key itself is the Bearer credential. Returns valid, reason and tokens total/used/reserved/remaining; exhausted or disabled keys stay reachable so the holder learns why the key stopped working.","x-worked-example":{"curl":"curl -X GET https://base.mapleai.shop/prepaid/status","payment":"none"},"responses":{"200":{"description":"Key validity, allowed models and token budget"},"401":{"description":"Missing or invalid prepaid key"},"429":{"description":"Too many status checks"},"502":{"description":"Prepaid gateway unavailable"}}}},"/v1/embeddings":{"post":{"summary":"Create free embeddings","operationId":"createEmbeddings","security":[],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/embeddings \\\n  -H 'content-type: application/json' \\\n  -d '{\"input\":\"Hello\",\"input_type\":\"query\",\"encoding_format\":\"float\"}'","payment":"none"},"description":"Free NVIDIA Nemotron embeddings. Every request is routed to nvidia/nemotron-3-embed-1b; any supplied model value is ignored. Discovery and health probes that send a body containing only a model field (no input) receive HTTP 200 with an empty data list and a hint describing the expected input, so automated crawlers pass on the first try. ","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input"],"properties":{"model":{"type":"string","description":"Optional compatibility field; its value is ignored."},"input":{"oneOf":[{"type":"string"},{"type":"array","minItems":1,"maxItems":128,"items":{"type":"string"}}]},"input_type":{"type":"string","enum":["query","passage"]},"encoding_format":{"type":"string","enum":["float","base64"]}}},"example":{"input":"Hello","input_type":"query","encoding_format":"float"},"examples":{"single":{"summary":"Single text","value":{"input":"Hello","input_type":"query","encoding_format":"float"}},"batch":{"summary":"Batch of texts (max 128)","value":{"input":["first document","second document"],"input_type":"passage"}},"probe":{"summary":"Discovery probe (model-only body returns 200 with a hint)","value":{"model":"nvidia/nemotron-3-embed-1b"}}}}}},"responses":{"200":{"description":"Embedding vectors per input, or an empty data list with a hint for model-only probes.","content":{"application/json":{"examples":{"embeddings":{"summary":"Embeddings response","value":{"object":"list","data":[{"object":"embedding","index":0,"embedding":[0.0123,-0.0456]}],"model":"nvidia/nemotron-3-embed-1b"}},"probe":{"summary":"Probe response (model-only body)","value":{"object":"list","data":[],"model":"nvidia/nemotron-3-embed-1b","hint":"Send {\"input\": \"your text\"} or {\"input\": [\"up to 128 strings\"]}"}}}}}},"400":{"description":"Invalid request body. The error includes the expected request schema.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","param","code","details"],"properties":{"message":{"type":"string"},"type":{"const":"invalid_request"},"param":{"type":"string"},"code":{"type":"string"},"details":{"type":"object","required":["expected","schema"],"properties":{"expected":{"type":"string"},"schema":{"type":"object","required":["input"],"properties":{"model":{"type":"string","description":"Optional compatibility field; its value is ignored."},"input":{"oneOf":[{"type":"string"},{"type":"array","minItems":1,"maxItems":128,"items":{"type":"string"}}]},"input_type":{"type":"string","enum":["query","passage"]},"encoding_format":{"type":"string","enum":["float","base64"]}}}}}}}}}}}},"502":{"description":"NVIDIA upstream failed"}}}},"/v1/free/chat/completions":{"post":{"summary":"Free chat completions (alias nvidia/gpt-oss-20b)","operationId":"freeGptOssChat","security":[],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/free/chat/completions \\\n  -H 'content-type: application/json' \\\n  -d '{\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":false}'","payment":"none"},"description":"Free nvidia/gpt-oss-20b chat via the same OpenAI Chat Completions shape as the paid endpoint. No payment and no key. Rate-limited per agent IP: 10 requests per 10 minutes and 100 per day; max_tokens is capped at 2048. Exceeding the window returns HTTP 429 with a free_tier_exhausted code and a retry-after. Window usage: GET /v1/free/chat/completions/quota.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["messages"],"properties":{"model":{"type":"string","description":"Optional; only nvidia/gpt-oss-20b is accepted"},"messages":{"type":"array","minItems":1,"items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string"},"content":{"type":"string"}}}},"max_tokens":{"type":"integer","maximum":2048},"stream":{"type":"boolean"}}},"example":{"messages":[{"role":"user","content":"Hello"}],"stream":false}}}},"responses":{"200":{"description":"Chat completion object with model echoed as nvidia/gpt-oss-20b.","content":{"application/json":{"example":{"id":"chatcmpl_free","object":"chat.completion","model":"nvidia/gpt-oss-20b","choices":[{"index":0,"finish_reason":"stop","message":{"role":"assistant","content":"Hello!"}}],"usage":{"prompt_tokens":32,"completion_tokens":6,"total_tokens":38}}}}},"400":{"description":"Invalid request body (wrong model or missing messages)"},"429":{"description":"Free tier window exhausted for this agent IP; retry-after included."},"502":{"description":"Upstream temporarily unavailable"}}}},"/v1/free/chat/completions/quota":{"get":{"summary":"Free tier window usage for the caller IP","operationId":"freeGptOssQuota","security":[],"responses":{"200":{"description":"Current usage and limits for both windows.","content":{"application/json":{"example":{"object":"free_quota","model":"nvidia/gpt-oss-20b","per10Min":{"limit":10,"used":0},"perDay":{"limit":100,"used":0}}}}}}}},"/jev":{"post":{"summary":"Run Jev structured decision","operationId":"runJev","description":"SystemOne protocol for jev-latest. Returns structured answers, not chat text.","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/jev \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"jev-latest\",\"state\":\"The customer was charged twice for one order.\",\"questions\":{\"billing\":{\"type\":\"noul\",\"instructions\":\"Is this about a billing issue?\"}}}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per 1M tokens","input":0.06,"output":0},"requestBody":{"required":true,"content":{"application/json":{"example":{"model":"jev-latest","state":"The customer was charged twice for one order.","questions":{"billing":{"type":"noul","instructions":"Is this about a billing issue?"}}},"schema":{"type":"object","required":["model","state","questions"],"properties":{"model":{"type":"string","enum":["jev-latest"],"example":"jev-latest"},"state":{"type":"string","example":"The customer was charged twice for one order."},"questions":{"type":"object","example":{"billing":{"type":"noul","instructions":"Is this about a billing issue?"}},"description":"Named questions. Each value needs type (noul, choice or score) and instructions.","additionalProperties":{"type":"object","required":["type","instructions"],"properties":{"type":{"type":"string","enum":["noul","choice","score"]},"instructions":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Structured answers","content":{"application/json":{"example":{"model":"jev-1.13.0","answers":{"billing":{"type":"noul","noul":0.98}},"usage":{"input_tokens":282,"output_tokens":20}}}}},"400":{"description":"Invalid request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Upstream unavailable"}}}},"/v1/x/search":{"post":{"summary":"Live X/Twitter search","operationId":"searchX","description":"Server-side Grok x_search over X posts. Returns a Responses API object: output_text summarizes the findings with direct post links, citations collected as url_citation entries. include_web adds a web_search pass alongside X.","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/x/search \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":\"trending AI agent frameworks\",\"max_results\":10}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per query","formula":"base + per_result * max_results (+web surcharge with include_web)","base":0.015,"perResult":0.0015,"webSurcharge":0.01,"defaultTotal":0.03,"note":"max_results defaults to 10, max 25"},"requestBody":{"required":true,"content":{"application/json":{"example":{"query":"trending AI agent frameworks","max_results":10},"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","maxLength":2000,"description":"What to look for on X/Twitter"},"max_results":{"type":"integer","minimum":1,"maximum":25,"default":10,"description":"Maximum posts cited; drives the price"},"include_web":{"type":"boolean","default":false,"description":"Also run web_search alongside X (adds the web surcharge)"},"instructions":{"type":"string","description":"Optional extra instructions for the search agent (e.g. quote posts verbatim, include author/date/likes)"},"format":{"type":"string","enum":["text","json"],"default":"text","description":"json returns a validated posts array {url, author, date, text, likes, reposts} instead of prose"},"hours_back":{"type":"integer","minimum":1,"maximum":168,"description":"Restrict search to the last N hours"}}}}}},"responses":{"200":{"description":"Responses API object with the summary and citations","content":{"application/json":{"example":{"object":"response","output_text":"AI agents are trending around x402 payments. https://x.com/user/status/123[[1]]","citations":["https://x.com/user/status/123"],"usage":{"input_tokens":1200,"output_tokens":300}}}}},"400":{"description":"Invalid request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Search upstream unavailable"}}}},"/v1/x/digest":{"post":{"summary":"Digest of specific X handles","operationId":"xDigest","description":"Server-side Grok x_search restricted to the given handles (allowed_x_handles). Per handle: up to max_posts_per_handle key posts with links, likes and reposts, plus recurring themes; silent handles are marked. include_media enables image understanding inside posts (surcharge).","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/x/digest \\\n  -H 'content-type: application/json' \\\n  -d '{\"handles\":[\"base\",\"jessepollak\",\"brian_armstrong\"],\"hours_back\":24,\"max_posts_per_handle\":3}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per digest","formula":"base + per_handle * handles (+media surcharge)","base":0.02,"perHandle":0.005,"mediaSurcharge":0.005,"note":"1-20 handles"},"requestBody":{"required":true,"content":{"application/json":{"example":{"handles":["base","jessepollak","brian_armstrong"],"hours_back":24,"max_posts_per_handle":3},"schema":{"type":"object","required":["handles"],"properties":{"handles":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","pattern":"^@?[A-Za-z0-9_]{1,15}$"},"description":"X handles to monitor (with or without @)"},"hours_back":{"type":"integer","minimum":1,"maximum":168,"default":24,"description":"Look-back window in hours"},"max_posts_per_handle":{"type":"integer","minimum":1,"maximum":5,"default":3},"include_media":{"type":"boolean","default":false,"description":"Also analyze images inside the fetched posts"}}}}}},"responses":{"200":{"description":"Structured digest","content":{"application/json":{"example":{"object":"x.digest","handles":[{"handle":"base","silent":false,"themes":["gas upgrade"],"posts":[{"url":"https://x.com/base/status/123","summary":"...","likes":4200,"reposts":890}]}]}}}},"400":{"description":"Invalid request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Search upstream unavailable or invalid model response"}}}},"/v1/x/sentiment":{"post":{"summary":"X sentiment for a topic","operationId":"xSentiment","description":"Two x_search passes (Top + Latest) over the look-back window; every fetched post is classified bullish/bearish/neutral. score and distribution are model-estimated aggregates; low_sample is flagged when few posts were evaluated.","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/x/sentiment \\\n  -H 'content-type: application/json' \\\n  -d '{\"topic\":\"x402 protocol\",\"hours_back\":24,\"max_examples\":5,\"min_engagement\":10}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per assessment","formula":"base + per_example * max_examples + per_day * extra_window_days","base":0.025,"perExample":0.0015,"perDay":0.005,"note":"window default 24h, max 168h"},"requestBody":{"required":true,"content":{"application/json":{"example":{"topic":"x402 protocol","hours_back":24,"max_examples":5,"min_engagement":10},"schema":{"type":"object","required":["topic"],"properties":{"topic":{"type":"string","maxLength":200,"description":"Token, project or narrative to assess"},"hours_back":{"type":"integer","minimum":1,"maximum":168,"default":24},"max_examples":{"type":"integer","minimum":1,"maximum":10,"default":5,"description":"Evidence posts in the answer; drives the price"},"min_engagement":{"type":"integer","minimum":0,"default":0,"description":"When > 0, keyword searches use min_faves:N to skip low-engagement noise"}}}}}},"responses":{"200":{"description":"Structured sentiment","content":{"application/json":{"example":{"object":"x.sentiment","topic":"x402 protocol","verdict":"bullish","score":0.6,"distribution":{"bullish":14,"bearish":3,"neutral":5},"posts_evaluated":22,"drivers":["agent payments momentum"],"examples":[{"url":"https://x.com/user/status/123","stance":"bullish","snippet":"...","likes":420}]}}}},"400":{"description":"Invalid request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Search upstream unavailable or invalid model response"}}}},"/v1/x/factcheck":{"post":{"summary":"Factcheck a claim (X + web)","operationId":"xFactcheck","description":"Cross-checks a claim with server-side x_search (X posts) and web_search (press/official sources). verdict is confirmed|refuted|mixed|unverified; confidence is the model's self-assessment (low|medium|high).","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/x/factcheck \\\n  -H 'content-type: application/json' \\\n  -d '{\"claim\":\"Tether is bringing USDT back to the Bitcoin network\",\"max_sources\":6,\"days_back\":7}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per factcheck","formula":"base + per_source * max_sources","base":0.03,"perSource":0.002,"note":"max_sources caps evidence items per side"},"requestBody":{"required":true,"content":{"application/json":{"example":{"claim":"Tether is bringing USDT back to the Bitcoin network","max_sources":6,"days_back":7},"schema":{"type":"object","required":["claim"],"properties":{"claim":{"type":"string","maxLength":1000,"description":"The statement to verify"},"max_sources":{"type":"integer","minimum":1,"maximum":10,"default":6,"description":"Max evidence items per side; drives the price"},"days_back":{"type":"integer","minimum":1,"maximum":30,"default":7,"description":"How far back to look"}}}}}},"responses":{"200":{"description":"Structured factcheck","content":{"application/json":{"example":{"object":"x.factcheck","claim":"...","verdict":"confirmed","confidence":"high","summary":"...","evidence_for":[{"url":"https://x.com/user/status/123","source_type":"x","note":"..."}],"evidence_against":[]}}}},"400":{"description":"Invalid request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Search upstream unavailable or invalid model response"}}}},"/v1/x/profile":{"post":{"summary":"Profile dossier for X handles","operationId":"xProfile","description":"x_user_search dossier per handle: bio, followers and verification from the user card, posting topics, factual flags and recent posts (following/created/location appear only when the card contains them). Flags are observations only, no bot-score verdicts.","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/x/profile \\\n  -H 'content-type: application/json' \\\n  -d '{\"handles\":[\"base\",\"jessepollak\"],\"days_back\":14,\"include_posts\":true}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per dossier","formula":"base + per_handle * handles","base":0.02,"perHandle":0.015,"note":"1-5 handles"},"requestBody":{"required":true,"content":{"application/json":{"example":{"handles":["base","jessepollak"],"days_back":14,"include_posts":true},"schema":{"type":"object","required":["handles"],"properties":{"handles":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string","pattern":"^@?[A-Za-z0-9_]{1,15}$"},"description":"X handles to profile (with or without @)"},"days_back":{"type":"integer","minimum":1,"maximum":30,"default":14,"description":"Window for recent posts"},"include_posts":{"type":"boolean","default":true,"description":"Include up to 3 recent posts per handle"}}}}}},"responses":{"200":{"description":"Structured profiles","content":{"application/json":{"example":{"object":"x.profile","profiles":[{"handle":"base","name":"Base","bio":"...","followers":1559000,"verified":true,"topics":["L2","builders"],"flags":[],"recent_posts":[{"url":"https://x.com/base/status/123","summary":"...","likes":4200}]}]}}}},"400":{"description":"Invalid request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Search upstream unavailable or invalid model response"}}}},"/v1/x/media":{"post":{"summary":"Media radar over X posts","operationId":"xMedia","description":"Searches X posts matching the query and analyzes attached media with view_image/view_video: what the chart/meme/screenshot shows (numbers and labels when readable), with post links. media_type video costs more latency.","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/x/media \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":\"base onchain dashboard screenshot\",\"hours_back\":24,\"media_type\":\"image\",\"max_results\":8}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per scan","formula":"base + per_result * max_results","base":0.02,"perResult":0.002,"note":"max 15 posts"},"requestBody":{"required":true,"content":{"application/json":{"example":{"query":"base onchain dashboard screenshot","hours_back":24,"media_type":"image","max_results":8},"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","maxLength":500},"hours_back":{"type":"integer","minimum":1,"maximum":168,"default":24},"media_type":{"type":"string","enum":["image","video","both"],"default":"image","description":"Which media understanding to enable (image is cheapest)"},"max_results":{"type":"integer","minimum":1,"maximum":15,"default":8,"description":"Posts analyzed; drives the price"},"mode":{"type":"string","enum":["top","latest"],"default":"top","description":"top = highest-engagement posts, latest = freshest"}}}}}},"responses":{"200":{"description":"Structured media findings","content":{"application/json":{"example":{"object":"x.media","results":[{"url":"https://x.com/user/status/123","media_type":"image","description":"Line chart rising from 2M to 6M transactions","relevance":"Answers the adoption question","likes":920}]}}}},"400":{"description":"Invalid request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Search upstream unavailable or invalid model response"}}}},"/v1/web/search":{"post":{"summary":"Live web search","operationId":"webSearch","description":"Server-side Grok web_search: summarized answer with direct source links; allowed_domains restricts the crawl to up to 5 domains.","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/web/search \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":\"x402 facilitator comparison\",\"max_results\":10}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per query","formula":"base + per_result * max_results","base":0.015,"perResult":0.001,"note":"max_results defaults to 10, max 25"},"requestBody":{"required":true,"content":{"application/json":{"example":{"query":"x402 facilitator comparison","max_results":10},"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","maxLength":2000},"max_results":{"type":"integer","minimum":1,"maximum":25,"default":10,"description":"Sources cited; drives the price"},"instructions":{"type":"string","description":"Optional extra instructions for the search agent"},"allowed_domains":{"type":"array","maxItems":5,"items":{"type":"string"},"description":"Restrict search to these domains (e.g. [\"coindesk.com\"])"}}}}}},"responses":{"200":{"description":"Responses API object with summary and citations","content":{"application/json":{"example":{"object":"response","output_text":"...","citations":["https://example.com/article"],"usage":{"input_tokens":900,"output_tokens":250}}}}},"400":{"description":"Invalid request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Search upstream unavailable"}}}},"/v1/agents/execute":{"post":{"summary":"Autonomous agent execution","operationId":"executeAgent","description":"Sends a natural-language task to a multi-step agent engine (cheap agents/oss-20b or premium agents/gpt-6-sol) with calculator, fetch_url, web_search, data_analysis and sandboxed code_exec (python/javascript/typescript) tools. stream=true streams SSE step events (open, step, done). Charged at the max_steps ceiling: settlement overhead + engine base ($0.002 / $0.004) + per-step ($0.0005 / $0.004) + code_exec $0.002 per call (max 3 per task), default 8, maximum 20 steps. Returns the agent.execution object with the full step trace, sources, usage and charged_ceiling_usd. Per-step timeouts finalize as partial instead of 502.","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/agents/execute \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"agents/oss-20b\",\"task\":\"What is the population of France divided by 7?\",\"max_steps\":6}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"unit":"USD per execution","input":0.002,"output":0.0005,"premiumInput":0.004,"premiumOutput":0.004,"note":"engine base + per step, max 20 steps; code_exec $0.002/call, max 3 per task"},"requestBody":{"required":true,"content":{"application/json":{"example":{"model":"agents/oss-20b","task":"What is the population of France divided by 7?","max_steps":6}}}},"responses":{"200":{"description":"agent.execution result","content":{"application/json":{"example":{"object":"agent.execution","model":"agents/oss-20b","status":"completed","steps_executed":2,"steps":[{"n":1,"thought":"Compute","action":"tool","tool_call":{"name":"calculator","args":{"expression":"0.12*340"}},"tool_result":"40.8"}],"output":{"result":"40.8"},"usage":{"input_tokens":4603,"output_tokens":122,"tools_invoked":1,"steps_executed":2,"cost_usd":0}}}}},"400":{"description":"Invalid request"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"502":{"description":"Engine unavailable"}}}},"/v1/chat/completions":{"post":{"summary":"Create chat completion","description":"OpenAI-compatible chat completion, priced by counted input tokens + max output tokens at per-model rates","operationId":"createChatCompletion","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/chat/completions \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"openai/gpt-5.6-sol\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"max_tokens\":8}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.001000","max":"4.733000"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"type":"dynamic","calculation":"input_tokens * input_rate + max_tokens * output_rate + settlement overhead, floored at the minimum charge","unit":"USD per 1M tokens","minimum_charge_usd":0.001,"settlement_overhead_usd":0.001,"models":[{"id":"openai/gpt-5.6-sol","input":2.8,"output":14},{"id":"openai/gpt-5.6-terra","input":1.4,"output":8.4},{"id":"openai/gpt-6-luna","input":0.07,"output":0.35},{"id":"openai/gpt-6-sol","input":1.4,"output":7},{"id":"anthropic/claude-sonnet-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-8","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5","input":2.5,"output":12.5},{"id":"anthropic/claude-haiku-4-5","input":0.5,"output":2.5},{"id":"anthropic/claude-sonnet-4-5","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-4-6","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-5-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-6","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-4-7","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5-5","input":2,"output":10}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","enum":["openai/gpt-5.6-sol","openai/gpt-5.6-terra","openai/gpt-6-luna","openai/gpt-6-sol","anthropic/claude-sonnet-5","anthropic/claude-opus-4-8","anthropic/claude-opus-5","anthropic/claude-haiku-4-5","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet-5-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-opus-5-5"]},"messages":{"type":"array","description":"OpenAI chat messages","items":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"type":"string"}}}},"max_tokens":{"type":"integer","default":4096},"temperature":{"type":"number"},"stream":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Successful completion. Set stream: true for server-sent events.","content":{"application/json":{"schema":{"type":"object","required":["id","object","created","model","choices"],"properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer","description":"Unix timestamp in seconds"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","required":["index","message","finish_reason"],"properties":{"index":{"type":"integer"},"message":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","const":"assistant"},"content":{"type":["string","null"]},"tool_calls":{"type":"array","items":{"type":"object","required":["id","type","function"],"properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","required":["name","arguments"],"properties":{"name":{"type":"string"},"arguments":{"type":"string"}}}}}}}},"finish_reason":{"type":["string","null"]}}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}},"example":{"id":"chatcmpl_worked","object":"chat.completion","created":1700000000,"model":"openai/gpt-5.6-sol","choices":[{"index":0,"message":{"role":"assistant","content":"OK"},"finish_reason":"stop"}],"usage":{"prompt_tokens":11,"completion_tokens":5,"total_tokens":16}}},"text/event-stream":{"schema":{"type":"string","description":"Server-sent events ending with data: [DONE]"}}}},"400":{"description":"Unknown or missing model"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}}}}},"/api/v1/chat/completions":{"post":{"summary":"Create chat completion (agent alias)","description":"OpenAI-compatible chat completion, priced by counted input tokens + max output tokens at per-model rates. Alias of /v1/chat/completions for agent crawlers.","operationId":"createChatCompletionAlias","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/api/v1/chat/completions \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"openai/gpt-5.6-sol\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"max_tokens\":8}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.001000","max":"4.733000"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"type":"dynamic","calculation":"input_tokens * input_rate + max_tokens * output_rate + settlement overhead, floored at the minimum charge","unit":"USD per 1M tokens","minimum_charge_usd":0.001,"settlement_overhead_usd":0.001,"models":[{"id":"openai/gpt-5.6-sol","input":2.8,"output":14},{"id":"openai/gpt-5.6-terra","input":1.4,"output":8.4},{"id":"openai/gpt-6-luna","input":0.07,"output":0.35},{"id":"openai/gpt-6-sol","input":1.4,"output":7},{"id":"anthropic/claude-sonnet-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-8","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5","input":2.5,"output":12.5},{"id":"anthropic/claude-haiku-4-5","input":0.5,"output":2.5},{"id":"anthropic/claude-sonnet-4-5","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-4-6","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-5-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-6","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-4-7","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5-5","input":2,"output":10}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","enum":["openai/gpt-5.6-sol","openai/gpt-5.6-terra","openai/gpt-6-luna","openai/gpt-6-sol","anthropic/claude-sonnet-5","anthropic/claude-opus-4-8","anthropic/claude-opus-5","anthropic/claude-haiku-4-5","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet-5-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-opus-5-5"]},"messages":{"type":"array","description":"OpenAI chat messages","items":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"type":"string"}}}},"max_tokens":{"type":"integer","default":4096},"temperature":{"type":"number"},"stream":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Successful completion. Set stream: true for server-sent events.","content":{"application/json":{"schema":{"type":"object","required":["id","object","created","model","choices"],"properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer","description":"Unix timestamp in seconds"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","required":["index","message","finish_reason"],"properties":{"index":{"type":"integer"},"message":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","const":"assistant"},"content":{"type":["string","null"]},"tool_calls":{"type":"array","items":{"type":"object","required":["id","type","function"],"properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","required":["name","arguments"],"properties":{"name":{"type":"string"},"arguments":{"type":"string"}}}}}}}},"finish_reason":{"type":["string","null"]}}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}},"example":{"id":"chatcmpl_worked","object":"chat.completion","created":1700000000,"model":"openai/gpt-5.6-sol","choices":[{"index":0,"message":{"role":"assistant","content":"OK"},"finish_reason":"stop"}],"usage":{"prompt_tokens":11,"completion_tokens":5,"total_tokens":16}}},"text/event-stream":{"schema":{"type":"string","description":"Server-sent events ending with data: [DONE]"}}}},"400":{"description":"Unknown or missing model"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}}}}},"/api/v1/responses":{"post":{"summary":"Create a model response","description":"OpenAI-compatible Responses API (alpha). Translated to a chat completion upstream.","operationId":"createResponse","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/api/v1/responses \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"openai/gpt-5.6-sol\",\"input\":\"Hello\",\"max_output_tokens\":8}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.001000","max":"4.733000"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"type":"dynamic","calculation":"input_tokens * input_rate + max_tokens * output_rate + settlement overhead, floored at the minimum charge","unit":"USD per 1M tokens","minimum_charge_usd":0.001,"settlement_overhead_usd":0.001,"models":[{"id":"openai/gpt-5.6-sol","input":2.8,"output":14},{"id":"openai/gpt-5.6-terra","input":1.4,"output":8.4},{"id":"openai/gpt-6-luna","input":0.07,"output":0.35},{"id":"openai/gpt-6-sol","input":1.4,"output":7},{"id":"anthropic/claude-sonnet-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-8","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5","input":2.5,"output":12.5},{"id":"anthropic/claude-haiku-4-5","input":0.5,"output":2.5},{"id":"anthropic/claude-sonnet-4-5","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-4-6","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-5-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-6","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-4-7","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5-5","input":2,"output":10}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","enum":["openai/gpt-5.6-sol","openai/gpt-5.6-terra","openai/gpt-6-luna","openai/gpt-6-sol","anthropic/claude-sonnet-5","anthropic/claude-opus-4-8","anthropic/claude-opus-5","anthropic/claude-haiku-4-5","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet-5-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-opus-5-5"]},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}}}}]},"instructions":{"type":"string"},"max_output_tokens":{"type":"integer","default":4096},"stream":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Successful completion. Set stream: true for server-sent events.","content":{"application/json":{"schema":{"type":"object","required":["id","object","created_at","status","model","output","output_text"],"properties":{"id":{"type":"string"},"object":{"type":"string","const":"response"},"created_at":{"type":"integer","description":"Unix timestamp in seconds"},"status":{"type":"string","const":"completed"},"model":{"type":"string"},"output":{"type":"array","items":{"oneOf":[{"type":"object","required":["id","type","status","role","content"],"properties":{"id":{"type":"string"},"type":{"type":"string","const":"message"},"status":{"type":"string","const":"completed"},"role":{"type":"string","const":"assistant"},"content":{"type":"array","items":{"type":"object","required":["type","text","annotations"],"properties":{"type":{"type":"string","const":"output_text"},"text":{"type":"string"},"annotations":{"type":"array","items":{}}}}}}},{"type":"object","required":["id","type","status","call_id","name","arguments"],"properties":{"id":{"type":"string"},"type":{"type":"string","const":"function_call"},"status":{"type":"string","const":"completed"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"}}}]}},"output_text":{"type":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}},"example":{"id":"resp_worked","object":"response","created_at":1700000000,"status":"completed","model":"openai/gpt-5.6-sol","output":[{"id":"msg_worked","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"OK","annotations":[]}]}],"output_text":"OK","usage":{"input_tokens":11,"output_tokens":5,"total_tokens":16}}},"text/event-stream":{"schema":{"type":"string","description":"Server-sent events ending with data: [DONE]"}}}},"400":{"description":"Unknown or missing model"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}}}}},"/v1/responses":{"post":{"summary":"Create a model response (short path)","description":"Alias of /api/v1/responses. OpenAI-compatible Responses API (alpha), translated to a chat completion upstream.","operationId":"createResponseAlias","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/responses \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"openai/gpt-5.6-sol\",\"input\":\"Hello\",\"max_output_tokens\":8}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.001000","max":"4.733000"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"type":"dynamic","calculation":"input_tokens * input_rate + max_tokens * output_rate + settlement overhead, floored at the minimum charge","unit":"USD per 1M tokens","minimum_charge_usd":0.001,"settlement_overhead_usd":0.001,"models":[{"id":"openai/gpt-5.6-sol","input":2.8,"output":14},{"id":"openai/gpt-5.6-terra","input":1.4,"output":8.4},{"id":"openai/gpt-6-luna","input":0.07,"output":0.35},{"id":"openai/gpt-6-sol","input":1.4,"output":7},{"id":"anthropic/claude-sonnet-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-8","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5","input":2.5,"output":12.5},{"id":"anthropic/claude-haiku-4-5","input":0.5,"output":2.5},{"id":"anthropic/claude-sonnet-4-5","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-4-6","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-5-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-6","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-4-7","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5-5","input":2,"output":10}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","enum":["openai/gpt-5.6-sol","openai/gpt-5.6-terra","openai/gpt-6-luna","openai/gpt-6-sol","anthropic/claude-sonnet-5","anthropic/claude-opus-4-8","anthropic/claude-opus-5","anthropic/claude-haiku-4-5","anthropic/claude-sonnet-4-5","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet-5-5","anthropic/claude-opus-4-6","anthropic/claude-opus-4-7","anthropic/claude-opus-5-5"]},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}}}}]},"instructions":{"type":"string"},"max_output_tokens":{"type":"integer","default":4096},"stream":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Successful completion. Set stream: true for server-sent events.","content":{"application/json":{"schema":{"type":"object","required":["id","object","created_at","status","model","output","output_text"],"properties":{"id":{"type":"string"},"object":{"type":"string","const":"response"},"created_at":{"type":"integer","description":"Unix timestamp in seconds"},"status":{"type":"string","const":"completed"},"model":{"type":"string"},"output":{"type":"array","items":{"oneOf":[{"type":"object","required":["id","type","status","role","content"],"properties":{"id":{"type":"string"},"type":{"type":"string","const":"message"},"status":{"type":"string","const":"completed"},"role":{"type":"string","const":"assistant"},"content":{"type":"array","items":{"type":"object","required":["type","text","annotations"],"properties":{"type":{"type":"string","const":"output_text"},"text":{"type":"string"},"annotations":{"type":"array","items":{}}}}}}},{"type":"object","required":["id","type","status","call_id","name","arguments"],"properties":{"id":{"type":"string"},"type":{"type":"string","const":"function_call"},"status":{"type":"string","const":"completed"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"}}}]}},"output_text":{"type":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}},"example":{"id":"resp_worked","object":"response","created_at":1700000000,"status":"completed","model":"openai/gpt-5.6-sol","output":[{"id":"msg_worked","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"OK","annotations":[]}]}],"output_text":"OK","usage":{"input_tokens":11,"output_tokens":5,"total_tokens":16}}},"text/event-stream":{"schema":{"type":"string","description":"Server-sent events ending with data: [DONE]"}}}},"400":{"description":"Unknown or missing model"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}}}}},"/v1/messages":{"post":{"summary":"Create a message (Anthropic Messages API)","description":"Anthropic Messages API (Claude models). Anthropic-native request/response shape (system prompt, content blocks, stream SSE events); claude-* ids resolve bare or via the anthropic/ prefixed catalog id from GET /v1/models.","operationId":"createAnthropicMessage","security":[{"x402":[]}],"x-worked-example":{"curl":"curl -X POST https://base.mapleai.shop/v1/messages \\\n  -H 'content-type: application/json' \\\n  -d '{\"model\":\"claude-sonnet-5\",\"max_tokens\":8,\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}]}'","payment":"x402","firstAttempt":"402 with PAYMENT-REQUIRED; sign and retry with PAYMENT-SIGNATURE"},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.001000","max":"4.733000"},"protocols":[{"x402":{}}],"offers":[{"intent":"charge","method":"usdc","amount":null,"currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."},{"intent":"charge","method":"usdc","amount":null,"currency":"0x3600000000000000000000000000000000000000","description":"Exact price quoted at runtime in the 402 challenge; varies by model and tokens. Minimum charge $0.001 USDC."}]},"x-pricing":{"type":"dynamic","calculation":"input_tokens * input_rate + max_tokens * output_rate + settlement overhead, floored at the minimum charge","unit":"USD per 1M tokens","minimum_charge_usd":0.001,"settlement_overhead_usd":0.001,"models":[{"id":"openai/gpt-5.6-sol","input":2.8,"output":14},{"id":"openai/gpt-5.6-terra","input":1.4,"output":8.4},{"id":"openai/gpt-6-luna","input":0.07,"output":0.35},{"id":"openai/gpt-6-sol","input":1.4,"output":7},{"id":"anthropic/claude-sonnet-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-8","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5","input":2.5,"output":12.5},{"id":"anthropic/claude-haiku-4-5","input":0.5,"output":2.5},{"id":"anthropic/claude-sonnet-4-5","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-4-6","input":1.5,"output":7.5},{"id":"anthropic/claude-sonnet-5-5","input":1,"output":5},{"id":"anthropic/claude-opus-4-6","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-4-7","input":2.5,"output":12.5},{"id":"anthropic/claude-opus-5-5","input":2,"output":10}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","max_tokens","messages"],"properties":{"model":{"type":"string","description":"Claude model id (claude-haiku-4-5, claude-sonnet-*, claude-opus-* — full list in GET /v1/models)"},"max_tokens":{"type":"integer","minimum":1,"description":"Required by the Anthropic API"},"system":{"type":"string","description":"System prompt (string or array of text blocks)"},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{}}}},"stream":{"type":"boolean"}}},"example":{"model":"claude-sonnet-5","max_tokens":64,"messages":[{"role":"user","content":"Hello"}]}}}},"responses":{"200":{"description":"Anthropic message object (or SSE event stream when stream=true)"},"400":{"description":"Invalid request (unknown model, missing max_tokens)"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 payment requirements (price, network, asset, payTo)"}}},"503":{"description":"Anthropic endpoint not configured on this gateway"}}}},"/v1/models":{"get":{"summary":"List available models","description":"Free. Returns every sellable GPT model with live pricing.","operationId":"listModels","security":[],"responses":{"200":{"description":"List of models"}}}},"/.well-known/x402":{"get":{"summary":"x402 resource manifest","description":"Free. Machine-readable x402 discovery document.","operationId":"x402Discovery","security":[],"responses":{"200":{"description":"x402 discovery document"}}}},"/v1/x402/info":{"get":{"summary":"Rate card and billing rules","description":"Free. Stable machine-readable rate card for agent catalogs: service and contact info, x402 payment parameters (network, USDC asset, payTo, facilitator), per-model input/output rates, per-endpoint billing formulas (including the deterministic prepaid Jev rule: charged_tokens = max(1, ceil(bodyBytes / 4)) + 32, output free, zero debit on upstream failure) and prepaid pack pricing. No x402 challenge.","operationId":"x402RateCard","security":[],"x-worked-example":{"curl":"curl -X GET https://base.mapleai.shop/v1/x402/info","payment":"none"},"responses":{"200":{"description":"Rate card with payment, rateCard, billingRules, prepaid and links sections"}}}},"/health":{"get":{"summary":"Service health","description":"Free. Liveness probe.","operationId":"health","security":[],"responses":{"200":{"description":"Service status"}}}}},"x-service-info":{"categories":["AI","inference","developer-tools","payments"],"docs":"https://base.mapleai.shop/AI-AGENTS.md"}}