Puma API

Getting Started

Puma API — OpenRouter-compatible chat completions powered by Cloudflare Workers AI.

The Puma API is an OpenRouter-compatible API for chat completions. It runs on Cloudflare Workers and proxies requests to Workers AI.

Quick start

curl https://api.pumaai.com/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-test-123" \
  -d '{
    "messages": [
      {"role": "user", "content": "What is the meaning of life?"}
    ]
  }'

The Authorization header is required. Any Bearer <token> value is accepted (there is no token validation yet).

Base URL

EnvironmentURL
Deployed (default)https://api.pumaai.com
Local devhttp://localhost:8787

Authentication

All /api/v1 endpoints use Bearer auth via the Authorization header:

Authorization: Bearer <your-token>

Endpoints

MethodPathDescription
GET/Health check
POST/api/v1/chat/completionsChat completion (OpenRouter-compatible)

See the Chat Completions page for the full request and response schema.

Interactive playground

Every endpoint in the API reference has an interactive playground: pick a server and a token, tweak the request, and hit Send to call the API straight from your browser. Requests are routed through a server-side proxy (/api/openapi-proxy) so the API server never needs to configure CORS for the docs site.

Models

AliasWorkers AI model
puma/cheapest (default)@cf/meta/llama-3.2-1b-instruct

You can also pass any Workers AI text generation model directly, e.g. @cf/meta/llama-3.3-70b-instruct-fp8-fast.

OpenRouter compatibility

The /api/v1/chat/completions endpoint accepts OpenRouter-specific headers:

HeaderDescription
HTTP-RefererSite URL for rankings on openrouter.ai
X-OpenRouter-TitleSite name for rankings on openrouter.ai