Endpoints
- Chat completions
POST https://arc.mapleai.shop/v1/chat/completions- Responses
POST https://arc.mapleai.shop/v1/responses- Anthropic Messages (Claude)
POST https://arc.mapleai.shop/v1/messages- Model catalog
GET https://arc.mapleai.shop/v1/models- Free embeddings
POST https://arc.mapleai.shop/v1/embeddings
Models & pricing
USD per 1 million tokens. Each request is quoted from input tokens and maximum output tokens before it runs. Arc adds a live estimate of settlement gas to the model cost. The exact USDC amount is in the 402 response.
| Model | Context | Input / 1M | Output / 1M |
|---|---|---|---|
openai/gpt-5.6-solGPT-5.6 Sol | 1.1M | $2.80 | $14.00 |
openai/gpt-5.6-terraGPT-5.6 Terra | 1.1M | $1.40 | $8.40 |
openai/gpt-6-lunaGPT-6 Luna | 1.1M | $0.07 | $0.35 |
openai/gpt-6-solGPT-6 Sol | 1.1M | $1.40 | $7.00 |
anthropic/claude-sonnet-5Claude Sonnet 5 | 1.1M | $1.00 | $5.00 |
anthropic/claude-opus-4-8Claude Opus 4.8 | 1.1M | $2.50 | $12.50 |
anthropic/claude-opus-5Claude Opus 5 | 1.1M | $2.50 | $12.50 |
anthropic/claude-haiku-4-5Claude Haiku 4.5 | 1.1M | $0.50 | $2.50 |
anthropic/claude-sonnet-4-5Claude Sonnet 4.5 | 1.1M | $1.50 | $7.50 |
anthropic/claude-sonnet-4-6Claude Sonnet 4.6 | 1.1M | $1.50 | $7.50 |
anthropic/claude-sonnet-5-5Claude Sonnet 5.5 | 1.1M | $1.00 | $5.00 |
anthropic/claude-opus-4-6Claude Opus 4.6 | 1.1M | $2.50 | $12.50 |
anthropic/claude-opus-4-7Claude Opus 4.7 | 1.1M | $2.50 | $12.50 |
anthropic/claude-opus-5-5Claude Opus 5.5 | 1.1M | $2.00 | $10.00 |
Images
Generate or edit images with x402 USDC payments. The exact quote includes payment overhead.
- Generate
POST /api/v1/images/generations- Edit
POST /api/v1/images/image2image
| Model | Size | USD / image |
|---|---|---|
gpt-image-2 | 1024x1024 | $0.0200 |
gpt-image-2.5 | 1024x1024 | $0.0400 |
gpt-image-2.5-flare | 1024x1024 | $0.0400 |
gpt-image-2.5-sunburst | 1024x1024 | $0.0400 |
grok-imagine-image | 1024x1024 | $0.0450 |
gpt-image-2-2k | 2048x2048 | $0.0900 |
gpt-image-2.5-sunburst-2k | 2048x2048 | $0.2200 |
curl -i https://arc.mapleai.shop/api/v1/images/generations \
-H 'content-type: application/json' \
-d '{"model":"gpt-image-2","size":"1024x1024","prompt":"A maple leaf","n":1}'For image2image, add image as a PNG, JPEG or WebP base64 data URI. Both routes return data[].url or data[].b64_json.
Audio
OpenAI-compatible audio endpoints with x402 USDC payments; flat price per request plus settlement overhead shown in the 402 challenge.
- Text-to-speech
POST /v1/audio/speech— $0.015 / request- Speech-to-text
POST /v1/audio/transcriptions— $0.006 / request
| TTS model | Backend & voices |
|---|---|
tts-1 | Gemini 3.8 Flash Lite; OpenAI presets (alloy, nova, onyx…) |
tts-1-hd | Gemini 3.8 Flash; same presets, fuller voice |
orpheus-english | Orpheus EN (emotive, [laughs] tags, real speed): autumn, diana, hannah, austin, daniel, troy |
orpheus-arabic | Orpheus AR Saudi: fahad, sultan, noura, lulwa, aisha, abdullah |
| STT model | Notes |
|---|---|
whisper-1 | Gemini 3.5 Transcribe — default quality, json/text |
whisper-large-v3 | Groq Whisper v3 — accuracy + verbose_json word timestamps, srt, vtt |
whisper-large-v3-turbo | Groq Whisper turbo — fast + same timestamp formats |
curl -i https://arc.mapleai.shop/v1/audio/speech \
-H 'content-type: application/json' \
-d '{"model":"tts-1","input":"Hello from MapleAI","voice":"alloy"}'curl -i https://arc.mapleai.shop/v1/audio/transcriptions \
-F [email protected] -F model=whisper-large-v3-turbo -F response_format=verbose_jsonTranscription also accepts JSON with file as a base64 string or data: URI (max 25 MB). Responses include x-audio-upstream and x-fallback-used headers; a fallback 1 means a secondary vendor served the request (for TTS the voice then differs).
Jev
jev-latest evaluates structured questions through SystemOne. $0.06 per 1M input tokens; output tokens are free. The x402 challenge includes settlement overhead and the exact amount. This model does not support Chat Completions or Responses.
POST https://arc.mapleai.shop/jev
content-type: application/json
{"model":"jev-latest","state":"The customer was charged twice for one order.","questions":{"billing":{"type":"noul","instructions":"Is this about a billing issue?"}}}The JSON response contains answers.billing. Each named question uses a type of noul, choice or score and its own instructions.
Agents
Autonomous task execution via agents/oss-20b (multi-step reasoning with tools). $0.002 base + $0.001 per step, charged at the max_steps ceiling (default 8, maximum 20), plus settlement overhead shown in the 402 challenge. Available tools: calculator (safe arithmetic) and fetch_url (public pages, up to 3 per task).
POST https://arc.mapleai.shop/v1/agents/execute
content-type: application/json
{"model":"agents/oss-20b","task":"What is 12% of 340?","max_steps":6,"tools":["calculator","fetch_url"]}The response is an agent.execution object: status (completed | failed | max_steps_exhausted), the full steps trace (thought, tool_call, tool_result), output.result with fetched sources, and per-step plus total token usage.
Prepaid API keys
Buy a prepaid bearer key for one GPT or Claude model with x402. The budget counts total tokens (input + output) in 100000-token steps from 100000 to 1000000 and is priced at the model input rate, plus the network settlement fee shown in the 402 challenge. The key works at https://mapleai.shop/v1 (OpenAI-compatible).
| Model | 0.1M pack | 1M pack |
|---|---|---|
openai/gpt-5.6-sol | $0.28 | $2.80 |
openai/gpt-5.6-terra | $0.14 | $1.40 |
openai/gpt-6-luna | $0.007 | $0.07 |
openai/gpt-6-sol | $0.14 | $1.40 |
anthropic/claude-sonnet-5 | $0.10 | $1.00 |
anthropic/claude-opus-4-8 | $0.25 | $2.50 |
anthropic/claude-opus-5 | $0.25 | $2.50 |
anthropic/claude-haiku-4-5 | $0.05 | $0.50 |
anthropic/claude-sonnet-4-5 | $0.15 | $1.50 |
anthropic/claude-sonnet-4-6 | $0.15 | $1.50 |
anthropic/claude-sonnet-5-5 | $0.10 | $1.00 |
anthropic/claude-opus-4-6 | $0.25 | $2.50 |
anthropic/claude-opus-4-7 | $0.25 | $2.50 |
anthropic/claude-opus-5-5 | $0.20 | $2.00 |
POST https://arc.mapleai.shop/prepaid/codes
content-type: application/json
{"model":"openai/gpt-6-luna","tokens":100000}{"object":"prepaid_code","code":"oms_buy_...","model":"openai/gpt-6-luna",
"tokens":{"total":100000,"remaining":100000},
"api_base":"https://mapleai.shop/v1",
"status_url":"https://mapleai.shop/v1/prepaid/status"}POST https://arc.mapleai.shop/prepaid/v1/chat/completions
Authorization: Bearer oms_buy_...
content-type: application/json
{"model":"openai/gpt-6-luna","messages":[{"role":"user","content":"Hello"}]}curl https://mapleai.shop/v1/prepaid/status \
-H "Authorization: Bearer oms_buy_..."The status check also works same-origin: GET https://arc.mapleai.shop/prepaid/status. Status returns valid, reason and tokens with total/used/reserved/remaining. An exhausted key answers valid: false, reason: "disabled" — buy a fresh pack to continue.
Supported networks
Choose the domain for the network where your wallet holds USDC. Each domain has its own OpenAPI document and payment quote.
| Network | CAIP-2 | API origin |
|---|---|---|
| Solana | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp | https://sol.mapleai.shop |
| Base | eip155:8453 | https://base.mapleai.shop |
| Polygon | eip155:137 | https://polygon.mapleai.shop |
| Arc (current) | eip155:5042 | https://arc.mapleai.shop |
cURL
Request the resource once to receive the exact amount and payment requirements in the PAYMENT-REQUIRED header. Sign those requirements with an x402 wallet, then retry with PAYMENT-SIGNATURE.
curl -i https://arc.mapleai.shop/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"model":"openai/gpt-5.6-sol","messages":[{"role":"user","content":"Hello"}],"max_tokens":64}'curl https://arc.mapleai.shop/v1/chat/completions \
-H 'content-type: application/json' \
-H "PAYMENT-SIGNATURE: $PAYMENT_SIGNATURE" \
-d '{"model":"openai/gpt-5.6-sol","messages":[{"role":"user","content":"Hello"}],"max_tokens":64}'Use the same request body for both calls. PAYMENT_SIGNATURE is the base64 x402 payment payload signed by your wallet.
Embeddings to GPT example
A runnable TypeScript app retrieves local FAQ context with free embeddings, then requests a paid GPT answer through x402. It supports Base and Solana and includes a quote-only mode.
MCP for agent clients
Use the local stdio server with Node.js 20+. It exposes nine tools — free list_models, embed_text, prepaid_status, paid chat_completion, claude_message, jev_decide, agent_execute, buy_prepaid_tap, and prepaid_chat which spends a prepaid key with no wallet. The server signs the x402 challenge and retries the API request; the agent client only needs standard MCP tool support.
npx -y -p mapleai-mcp mapleai-quickstart --network polygon{
"mcpServers": {
"mapleai": {
"command": "npx",
"args": ["-y", "-p", "mapleai-mcp", "mapleai-mcp"],
"env": {
"EVM_PRIVATE_KEY": "0x...",
"MCP_PAY_TO_POLYGON": "0x63db6eaf635a31bbc6714fe37bdc85243864f611",
"MCP_MAX_PAYMENT_USDC": "0.10",
"MCP_MAX_PREPAID_USDC": "3.00"
}
}
}
}After checking the quote, use mapleai-quickstart --pay with a funded local wallet to test settlement. For Base and Arc, set MCP_PAY_TO_BASE or MCP_PAY_TO_ARC to the verified recipient. For Solana use SVM_PRIVATE_KEY and MCP_PAY_TO_SOLANA=9DbpH2Mf9D26ak4bASsv6KA4Ra4V571oLpiVdZjAjcU8. The default network is Polygon; set MCP_NETWORK to change it. Metered calls are capped by MCP_MAX_PAYMENT_USDC, prepaid key packs by MCP_MAX_PREPAID_USDC. Keep the wallet key in your local MCP client configuration.
Bootstrapping a paying agent? Fork mapleai-agent-starter on GitHub: repo instructions for agent clients, MCP wiring, a full paid scenario script and a free CI smoke.
JavaScript
Use the x402 SDK to sign the 402 challenge. Set EVM_PRIVATE_KEY for an EVM wallet, or provide a Solana keypair signer on Solana. The example caps payments at 0.10 USDC on EVM networks.
import { x402Client } from '@x402/core/client';
import { registerExactEvmScheme } from '@x402/evm/exact/client';
import { privateKeyToAccount } from 'viem/accounts';
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client().setSpendControls({
allowedAssets: [{ network: 'eip155:5042', asset: '0x3600000000000000000000000000000000000000', maxAmountPerPayment: '100000' }]
});
registerExactEvmScheme(client, { signer: account, networks: ['eip155:5042'] });
const url = 'https://arc.mapleai.shop/v1/chat/completions';
const body = JSON.stringify({
model: 'openai/gpt-5.6-sol',
messages: [{ role: 'user', content: 'Hello' }],
max_tokens: 64
});
const headers = { 'content-type': 'application/json' };
const first = await fetch(url, { method: 'POST', headers, body });
if (first.status !== 402) throw new Error('Expected payment challenge');
const challenge = JSON.parse(Buffer.from(
first.headers.get('payment-required'), 'base64'
).toString());
if (challenge.resource.url !== url || challenge.accepts[0].network !== 'eip155:5042') {
throw new Error('Unexpected payment request');
}
const payload = await client.createPaymentPayload(challenge);
delete payload.extensions?.quote; // optional display metadata is not required to settle
const signature = Buffer.from(JSON.stringify(payload)).toString('base64');
const paid = await fetch(url, {
method: 'POST',
headers: { ...headers, 'PAYMENT-SIGNATURE': signature },
body
});
if (!paid.ok) throw new Error('Request failed: ' + paid.status);
console.log(await paid.json());Install the x402 packages for your network. On EVM: npm install @x402/core @x402/evm viem. On Solana: npm install @x402/svm @solana/kit @scure/base. Keep private keys outside source code.