# MapleAI Prepaid API Code Purchase (Auto)

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

Purchases a prepaid API code with a 100,000-token budget for a specified GPT model using a single POST call with USDC payment via x402

## Facts

- Endpoint: POST https://base.mapleai.shop/prepaid/codes/auto?utm_source=zero.xyz
- Price: $0.0095/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-auto-083b1f47
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_axTgBZKg_5Oy4bTiPj_lK

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-auto-083b1f47 -d '<json body>'
```

Example prompt: Buy me a prepaid MapleAI API code for the openai/gpt-6-sol model with a 100,000-token budget — charge my USDC wallet.

## When to prefer this

Choose this endpoint when you need to pre-fund a fixed token budget for a specific GPT model rather than paying per request, or when delegating API access to a sub-agent that should have a capped spending limit. Ideal for autonomous pipelines that need a standalone credential without ongoing payment authorization per call.

## Known failure modes

- Insufficient USDC balance — payment fails and no code is issued
- Invalid or unsupported model enum value — request rejected with validation error
- x402 payment protocol handshake failure — no code returned
- Token budget parameter out of acceptable range — request error
- Service unavailability — upstream provisioning fails

## How this service works

One-shot prepaid tap: empty body buys a 100000-token openai/gpt-6-luna key

## Output

Returns a prepaid API code (key) tied to the specified GPT model and a 100,000-token budget, usable against MapleAI's OpenAI-compatible endpoint without further payment per call.

## 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"
  }
 }
}
```

## 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-auto-083b1f47/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)
