# MapleAI Prepaid API Code Purchase

> MapleAI Prepaid API Code Purchase is a paid API for AI agents from base.mapleai.shop, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Purchase a prepaid code granting access to a specific GPT model with a fixed token budget, paid in USDC via x402

## Facts

- Endpoint: POST https://base.mapleai.shop/prepaid/codes?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mapleai-prepaid-api-code-purchase-f6ad470b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YJE1bEETe6CQ2q1anDdL3

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability mapleai-prepaid-api-code-purchase-f6ad470b -d '<json body>'
```

Example prompt: Buy me a prepaid MapleAI API code for the gpt-6-luna model with 100,000 tokens so I can use it for LLM calls.

## When to prefer this

Use this endpoint when you need to pre-allocate a fixed token budget for a specific MapleAI GPT model before making LLM calls — ideal for cost-capping agent runs, isolating per-project spend, or distributing API access without sharing a master key. Prefer this over per-call billing when you want predictable spending or need to hand off a limited-use credential to a sub-agent.

## Known failure modes

- Invalid model enum value — returns validation error if model is not one of the four supported GPT identifiers
- Token count out of range or not a multiple of 100,000 — returns schema validation error
- Insufficient USDC balance or x402 payment failure — call is rejected with payment error
- Network or provider downtime — HTTP 5xx or timeout with no code issued

## How this service works

Buy a prepaid API code for one GPT model and a token budget

## Output

Returns a JSON object containing a unique prepaid code string, the selected model name, the API base URL (https://mapleai.shop/v1), a status URL for checking remaining tokens, and token counts (total and remaining). The code can then be used as an API key against the MapleAI OpenAI-compatible endpoint.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "enum": [
    "openai/gpt-5.6-sol",
    "openai/gpt-5.6-terra",
    "openai/gpt-6-luna",
    "openai/gpt-6-sol"
   ],
   "type": "string"
  },
  "tokens": {
   "type": "integer",
   "maximum": 1000000,
   "minimum": 100000,
   "multipleOf": 100000
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "code": "oms_buy_example",
  "model": "openai/gpt-6-luna",
  "object": "prepaid_code",
  "tokens": {
   "total": 100000,
   "remaining": 100000
  },
  "api_base": "https://mapleai.shop/v1",
  "status_url": "https://mapleai.shop/v1/prepaid/status"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapleai-prepaid-api-code-purchase-f6ad470b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base.mapleai.shop](https://www.zero.xyz/host/base.mapleai.shop/llms.txt)
