# MapleAI GPT API (x402 Pay-Per-Request)

> MapleAI GPT API (x402 Pay-Per-Request) is a paid API for AI agents from base.mapleai.shop, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-02).

Provides OpenAI-compatible chat completions via four GPT models (GPT-5.6 Sol, GPT-5.6 Terra, GPT-6 Luna, GPT-6 Sol) with per-request USDC micropayment billing on Base.

## Facts

- Endpoint: POST https://base.mapleai.shop/v1/chat/completions?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mapleai-gpt-api-x402-pay-per-request-920da9f1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JdquPdBqHFJxLE7R3zNGm

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-gpt-api-x402-pay-per-request-920da9f1 -d '<json body>'
```

Example prompt: Using MapleAI's GPT-6 Luna model, send this conversation — system: 'You are a concise assistant', user: 'Summarize the concept of quantum entanglement in two sentences' — and give me the response, keeping it under 200 tokens.

## When to prefer this

Choose this endpoint when you need OpenAI-compatible chat completions on a pay-per-request basis without committing to a subscription, especially in crypto-native or Web3 contexts where paying in USDC on Base is preferred. It is ideal for sporadic or one-off LLM calls, agent workflows that need to control per-call costs, or applications that want access to GPT-6-class models with micropayment billing.

## Known failure modes

- Payment failure if USDC balance or x402 payment header is missing or insufficient — endpoint returns 402 Payment Required
- Invalid model ID returns an error; valid IDs must be fetched from GET /v1/models
- Malformed messages array (missing role or content) causes a 400 Bad Request
- max_tokens set too low may result in truncated or empty responses
- Network latency on Base blockchain settlement may occasionally delay request processing

## How this service works

OpenAI-compatible chat completion, priced by counted input tokens + max output tokens at per-model rates

## Output

Returns a standard OpenAI-format chat completion object containing a choices array with the assistant's message content, the finish reason (e.g. 'stop'), and a completion ID. The response is ready to parse with any OpenAI SDK.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Model ID from GET /v1/models"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant",
       "tool"
      ],
      "type": "string"
     },
     "content": {
      "type": "string"
     }
    }
   }
  },
  "max_tokens": {
   "type": "integer",
   "minimum": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "chatcmpl_example",
  "object": "chat.completion",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Hello!"
    },
    "finish_reason": "stop"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapleai-gpt-api-x402-pay-per-request-920da9f1/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)
