# MapleAI — AI Agent Discovery

## Service Overview
- **Name**: MapleAI
- **Type**: LLM API provider (GPT models)
- **Protocol**: x402 (pay-per-request on Arc)
- **Base URL**: https://arc.mapleai.shop/v1
- **Compatibility**: OpenAI Chat Completions + OpenAI Responses API
- **Contact**: contact@mapleai.shop

## Available Models
4 GPT models, priced per token. Full catalog: GET https://arc.mapleai.shop/v1/models

- **openai/gpt-5.6-sol** — GPT-5.6 Sol, 1.1M context, $2.80 in / $14.00 out per 1M tokens
- **openai/gpt-5.6-terra** — GPT-5.6 Terra, 1.1M context, $1.40 in / $8.40 out per 1M tokens
- **openai/gpt-6-luna** — GPT-6 Luna, 1.1M context, $0.07 in / $0.35 out per 1M tokens
- **openai/gpt-6-sol** — GPT-6 Sol, 1.1M context, $1.40 in / $7.00 out per 1M tokens

## Image Models

- gpt-image-2 (1024x1024): $0.0200 per image
- gpt-image-2.5 (1024x1024): $0.0400 per image
- gpt-image-2.5-flare (1024x1024): $0.0400 per image
- gpt-image-2.5-sunburst (1024x1024): $0.0400 per image
- grok-imagine-image (1024x1024): $0.0450 per image
- gpt-image-2-2k (2048x2048): $0.0900 per image
- gpt-image-2.5-sunburst-2k (2048x2048): $0.2200 per image

POST https://arc.mapleai.shop/api/v1/images/generations generates images. POST https://arc.mapleai.shop/api/v1/images/image2image edits a PNG, JPEG or WebP supplied as a base64 data URI (maximum 10 MB). Send model, size, prompt and optional n (1-4); edits also require image. The x402 challenge includes the exact price with payment overhead. Successful responses contain data[].url or data[].b64_json.


## Jev

- jev-latest: $0.12 per 1M input tokens, output free, plus settlement overhead. POST https://arc.mapleai.shop/jev uses SystemOne; send model, state and named questions, each with type and instructions. Read answers from the response.


## Free Embeddings

- nvidia/nemotron-3-embed-1b: free POST https://arc.mapleai.shop/v1/embeddings; send input as a string or array of strings.


## Free Chat (gpt-oss-20b)

- nvidia/gpt-oss-20b: free POST https://arc.mapleai.shop/v1/free/chat/completions; no payment. Rate-limited 10/10min and 100/day per agent IP; max_tokens capped at 2048. Check remaining window: GET https://arc.mapleai.shop/v1/free/chat/completions/quota.



## Prepaid API Keys

POST https://arc.mapleai.shop/prepaid/codes (x402-paid) issues a prepaid bearer key for one GPT model with a token budget in 100000-token steps from 100000 to 1000000, priced at the model input rate plus settlement fee. Use the key at https://mapleai.shop/v1 (OpenAI-compatible). Check usage and status for free: GET https://mapleai.shop/v1/prepaid/status with the prepaid key as the Bearer token — returns valid, reason and tokens total/used/reserved/remaining.

Error recovery: an invalid purchase body is answered with availableModels and their pack prices; a prepaid chat call whose model is outside the key returns 403 with the current allowedModels of that key; an exhausted key returns valid=false with reason. In every case the response names https://mapleai.shop/v1/prepaid/status as the refresh URL before buying a new pack.



## Quick Start for AI Agents

The code below shows the request format. A standard OpenAI SDK does not handle x402 payment automatically. Use an x402-aware client to read the 402 challenge, sign it and retry with PAYMENT-SIGNATURE.

### Python
```python
from openai import OpenAI

client = OpenAI(
    base_url="https://arc.mapleai.shop/v1",
    api_key="payment-signature-required"  # use an x402-aware client
)

response = client.chat.completions.create(
    model="openai/gpt-5.6-sol",
    messages=[{"role": "user", "content": "Hello"}]
)
```

### TypeScript
```typescript
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://arc.mapleai.shop/v1',
  apiKey: 'payment-signature-required' // use an x402-aware client
});

const response = await client.chat.completions.create({
  model: 'openai/gpt-5.6-sol',
  messages: [{role: 'user', content: 'Hello'}]
});
```

### Responses API
```bash
curl https://arc.mapleai.shop/api/v1/responses \
  -H 'content-type: application/json' \
  -d '{"model":"openai/gpt-5.6-sol","input":"Hello"}'
```

## Discovery Endpoints

Developer guide with network URLs, model prices and request examples: https://arc.mapleai.shop/developers

### Service Index
`GET https://arc.mapleai.shop/service-endpoints.json`
One-shot machine-readable index: every route with its access mode
(x402 / free / prepaid bearer), live per-unit pricing and request examples.

### x402 Resource Manifest
`GET https://arc.mapleai.shop/.well-known/x402`
Machine-readable x402 resource manifest for wallet/agent discovery.

### A2A Agent Card
`GET https://arc.mapleai.shop/.well-known/agent-card.json`
A2A-protocol agent card: skills, x402 security scheme and the OpenAI-compatible
HTTP interface; use it for agent-to-agent service discovery.

### OpenAPI Specification
`GET https://arc.mapleai.shop/openapi.json`
Full API specification in OpenAPI 3.1 format, including per-model pricing.

### Model Catalog
`GET https://arc.mapleai.shop/v1/models`
Free list of available models with pricing and context windows.

## Paid Endpoints

| Method | Path | Protocol |
| --- | --- | --- |
| POST | `/v1/chat/completions` | OpenAI Chat Completions |
| POST | `/api/v1/chat/completions` | OpenAI Chat Completions (alias) |
| POST | `/api/v1/responses` | OpenAI Responses API (alpha) |
| POST | `/v1/responses` | OpenAI Responses API (alpha) |

| POST | /api/v1/images/generations | Image generation |
| POST | /api/v1/images/image2image | Image editing |
| POST | /jev | Jev SystemOne decisions |
| POST | /v1/free/chat/completions | Free gpt-oss-20b chat (quota-limited) |
| POST | /prepaid/codes | Buy a prepaid API key |
| GET | https://mapleai.shop/v1/prepaid/status | Prepaid key usage and status (free) |

## Payment Protocol
1. Send the request without payment
2. Receive HTTP 402 with the exact USDC amount in the `PAYMENT-REQUIRED` header
3. Sign the USDC transfer with your wallet
4. Retry with the `PAYMENT-SIGNATURE` header — the call executes immediately

Price = counted input tokens × input rate + requested output tokens × output rate,
floored at $0.0010 per paid request. Failed calls (HTTP >= 400 from the
model provider) are cancelled, not settled.

## Key Features
- **4 GPT models**: GPT-5.6 Sol, GPT-5.6 Terra, GPT-6 Luna and GPT-6 Sol
- **Pricing**: 30% below published OpenAI rates, from $0.07 per 1M input tokens
- **OpenAI-compatible request format**: requires an x402-aware payment client
- **x402 payments**: pay per request in USDC on Arc
- **No accounts**: your wallet address is your identity

## Technical Details
- **Network**: eip155:5042 (Arc mainnet)
- **Payment token**: USDC (0x3600000000000000000000000000000000000000)
- **Treasury (payTo)**: 0x63db6eaf635a31bbc6714fe37bdc85243864f611
- **Facilitator**: http://127.0.0.1:4030
- **Minimum charge**: $0.0010 per paid request
- **Max context**: 1.1M tokens

## Use Cases
- Autonomous AI agents with budget control
- Multi-agent systems (pay per agent, per request)
- Research and prototyping with no commitment
- Enterprise deployments that cannot hold API keys

## Support
- API status: https://arc.mapleai.shop/health
- Contact: contact@mapleai.shop
- x402scan: https://x402scan.com
- Protocol docs: https://x402.org

---

**For AI agents**: every endpoint returns structured JSON. Point the OpenAI SDK at
`https://arc.mapleai.shop/v1` with any non-empty `api_key` and handle the 402 challenge with an
x402 client. Last updated: 2026-09-30.
