# Polyform AI Chat

> Polyform AI Chat is a paid API for AI agents from api.polyform.org, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Send a message to a hosted LLM (Llama 3.1 8B Instruct) and receive a conversational reply, paid per-call with USDC on Base via x402.

## Facts

- Endpoint: POST https://api.polyform.org/v1/ai/chat
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/polyform-ai-chat-a7df0249
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kj5We23UBQp1Pej03Z2xU

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 polyform-ai-chat-a7df0249 -d '<json body>'
```

Example prompt: Ask the Polyform Llama 3.1 model: 'What are the key differences between REST and GraphQL?' and give me back whatever it says.

## When to prefer this

Choose this endpoint when your agent needs a single, stateless LLM inference call without committing to a subscription or managing API keys — ideal for low-frequency, pay-as-you-go usage patterns, autonomous agents with USDC wallets, or pipelines that need to call a language model on demand without prior account setup. Prefer alternatives (OpenAI, Anthropic) when you need persistent conversation history, higher model capacity, or guaranteed SLAs.

## Known failure modes

- Payment not provided or insufficient USDC — 402 Payment Required returned
- Malformed input body missing required 'type', 'method', or 'bodyType' fields — 400 Bad Request
- Model unavailable or overloaded — 503 or timeout
- Empty or null body content causing no meaningful reply
- Network latency spikes if Base blockchain confirmation is slow

## How this service works

Pay-per-call data endpoints for AI agents. USDC on Base via x402. No account, no API key — one micropayment per call.

## Output

A JSON object containing the model identifier (e.g. 'llama-3.1-8b-instruct') and a 'reply' string with the model's generated response to the input prompt.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "llama-3.1-8b-instruct",
  "reply": "…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/polyform-ai-chat-a7df0249/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.polyform.org](https://www.zero.xyz/host/api.polyform.org/llms.txt)
