# Polygon MapleAI Chat Completions

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

OpenAI-compatible chat completion endpoint priced per call based on counted input tokens plus max output tokens at per-model rates

## Facts

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

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 polygon-mapleai-chat-completions-fed5a013 -d '<json body>'
```

Example prompt: Using the gpt-3.5-turbo model, send this conversation to the polygon.mapleai.shop chat completions API with a max of 512 output tokens: system says 'You are a helpful assistant', and the user asks 'What are three tips for writing clean Python code?'

## When to prefer this

Choose this endpoint when you need an OpenAI-compatible chat completion API with transparent per-call micropayment pricing via the x402 protocol, particularly useful for agents that need to pay for inference on a per-request basis without a subscription. Prefer this over standard OpenAI when you want token-counted pricing (input tokens + max output tokens) and compatibility with the x402 payment standard.

## Known failure modes

- Invalid or unsupported model ID returns an error — use GET /v1/models to fetch available models
- Missing required 'messages' field or malformed message objects cause 400 validation errors
- Exceeding model context window with large message arrays may result in truncation or error
- Payment failure via x402 protocol returns 402 Payment Required
- max_tokens set too low may result in truncated or incomplete responses
- Network timeouts possible for large max_tokens values with slow model inference

## 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 response containing the assistant's generated message, model used, finish reason, and token usage (prompt tokens, completion tokens, total tokens).

## 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/polygon-mapleai-chat-completions-fed5a013/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from polygon.mapleai.shop](https://www.zero.xyz/host/polygon.mapleai.shop/llms.txt)
