# Inference402 Chat Small (Llama 3.1 8B)

> Inference402 Chat Small (Llama 3.1 8B) is a paid API for AI agents from inference402.worlddata402.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-19).

Pay-per-call chat inference using Llama 3.1 8B via USDC micropayment on Base, no API key required

## Facts

- Endpoint: GET https://inference402.worlddata402.workers.dev/v1/chat/small?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/inference402-chat-small-llama-3-1-8b-a1f46c5d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wMcLFZVMwOqpm9bTnTLkl

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 inference402-chat-small-llama-3-1-8b-a1f46c5d
```

Example prompt: Ask the small Llama model to write a short two-paragraph summary of how photosynthesis works, keeping the answer under 200 tokens and using a neutral tone.

## When to prefer this

Choose this endpoint when you need a cheap, fast, keyless LLM inference call via USDC micropayment on Base mainnet and a smaller model (8B) is sufficient for the task. Prefer it over the large sibling when latency and cost matter more than reasoning depth. Ideal for agent pipelines needing many low-cost inference steps without managing API credentials.

## Known failure modes

- Payment not received or insufficient USDC — returns 402 Payment Required
- Messages array empty or malformed — schema validation error
- max_tokens exceeds 512 — rejected by schema
- temperature out of 0–2 range — validation error
- Network timeout on Cloudflare Worker — transient 5xx error
- messages array exceeds 50 items — rejected by schema

## How this service works

Pay-per-call AI inference for agents: chat (Llama 3.3 70B / 3.1 8B), structured JSON, summarize, translate (incl. Egyptian Arabic), extract, classify, sentiment, keywords, rewrite, embeddings, moderation, vision and speech-to-text. USDC on Base mainnet over x402. No API key, no account.

## Output

Returns a JSON object with the generated text content, the model identifier (e.g. @cf/meta/llama-3.1-8b-instruct-fp8), and token usage stats including prompt_tokens and completion_tokens.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant"
      ],
      "type": "string"
     },
     "content": {
      "type": "string"
     }
    }
   },
   "maxItems": 50,
   "minItems": 1
  },
  "max_tokens": {
   "type": "integer",
   "default": 256,
   "maximum": 512,
   "minimum": 1
  },
  "temperature": {
   "type": "number",
   "default": 0.6,
   "maximum": 2,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "@cf/meta/llama-3.1-8b-instruct-fp8",
  "usage": {
   "prompt_tokens": 20,
   "completion_tokens": 40
  },
  "content": "1. Bean There ..."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/inference402-chat-small-llama-3-1-8b-a1f46c5d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from inference402.worlddata402.workers.dev](https://www.zero.xyz/host/inference402.worlddata402.workers.dev/llms.txt)
