Skip to content

Quick Start

Get up and running in a few minutes.

1. Check the API is alive

The public health check requires no API key:

curl https://puter-api.x0root.workers.dev/

Expected response:

{
  "status": "ok",
  "tiers": {
    "free": "Most models",
    "pro": "All models including claude-opus-4-7, gpt-5.5-pro, gpt-5.4-pro"
  },
  "docs": "Authorization: Bearer qp-..."
}

2. Send your first chat request

curl https://puter-api.x0root.workers.dev/v1/chat/completions \
  -H "Authorization: Bearer qp-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "router",
    "messages": [
      { "role": "user", "content": "Say hello in one sentence." }
    ],
    "context": false,
    "max_tokens": 80
  }'

The response is an OpenAI-compatible chat completion. Read the info object to see which provider/model actually answered:

{
  "info": {
    "provider": "x0root",
    "model": "meta/llama-3.1-8b-instruct",
    "pool": "NORMAL"
  }
}

3. Try streaming

Add "stream": true and use curl -N to see OpenAI-style SSE chunks:

curl -N https://puter-api.x0root.workers.dev/v1/chat/completions \
  -H "Authorization: Bearer qp-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "router",
    "stream": true,
    "messages": [
      { "role": "user", "content": "Write a tiny story." }
    ]
  }'

Next Steps