# MapleAI Chat Completions

> MapleAI Chat Completions is a paid API for AI agents from sol.mapleai.shop, paid per call via x402, $0.001006/call, status unknown (last checked 2026-10-02).

OpenAI-compatible chat completion endpoint with per-model token-based pricing, accessible via x402 micropayment

## Facts

- Endpoint: POST https://sol.mapleai.shop/v1/chat/completions?utm_source=zero.xyz
- Price: $0.001006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mapleai-chat-completions-d394d16e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O6RfJH1Qc6tsfg3M0O2iE

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-chat-completions-d394d16e -d '<json body>'
```

Example prompt: Using the gpt-3.5-turbo model with a max of 512 output tokens, ask the AI: 'You are a helpful assistant. Explain the difference between REST and GraphQL APIs in simple terms.'

## When to prefer this

Choose this endpoint when you need an OpenAI-compatible chat completion API with pay-per-call x402 micropayment pricing — ideal for agents that need to avoid subscription commitments, want token-based cost transparency, or are running in a crypto-native payment environment. Prefer this over managed OpenAI or Anthropic APIs when you need decentralized billing or are already operating in a USDC/x402 payment flow.

## Known failure modes

- Invalid or unsupported model ID returns an error
- Missing required 'messages' or 'role'/'content' fields causes a 400 validation error
- max_tokens set too low may cause truncated or empty responses
- Payment failure via x402 protocol results in 402 Payment Required
- Rate limits or overload may return 429 or 503 errors
- Malformed message array structure causes rejection

## How this service works

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

## Output

Returns an OpenAI-compatible chat completion object containing the assistant's generated message, model used, token usage counts (prompt tokens, completion tokens, total), and finish reason.

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapleai-chat-completions-d394d16e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sol.mapleai.shop](https://www.zero.xyz/host/sol.mapleai.shop/llms.txt)
