Endpoints
- Chat completions
POST https://arc.mapleai.shop/v1/chat/completions- Responses
POST https://arc.mapleai.shop/v1/responses- 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 |
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.
Jev
jev-latest evaluates structured questions through SystemOne. $0.12 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.
Prepaid API keys
Buy a prepaid bearer key for one GPT 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 |
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"}curl https://mapleai.shop/v1/prepaid/status \
-H "Authorization: Bearer oms_buy_..."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 list_models and chat_completion. 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"
}
}
}
}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. Keep the wallet key in your local MCP client configuration.
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.