Get API

Claude Sonnet 5

Balanced Claude — strong quality at production speed.

anthropic/claude-sonnet-5

Capabilities

Claude Sonnet 5 is a language model served through the Pika developer API. Send it a list of chat messages and it streams back a text reply, using the Anthropic Messages API shape.

Authentication

api key header

The Pika API uses API keys to authenticate requests. Send your key in the X-API-Key header. Your API key is a secret. Don't expose it in browsers or other client-side code. Instead, call the API from your server. The signed-in playground uses a portal session and never sends your API key.

header
X-API-Key: YOUR_API_KEY

Endpoint

synchronous · chat completions

POSThttps://api.dev.pika.art/anthropic/v1/messages

Request

POST /anthropic/v1/messages

Request

curl -X POST https://api.dev.pika.art/anthropic/v1/messages \
-H "X-API-Key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Hello, who are you?" }
]
}'

Pass anthropic/claude-sonnet-5 as the model and a messages array of { role, content } turns. Set stream: true to receive tokens incrementally over server-sent events.

The Python and TypeScript examples use the official Anthropic SDK with its base URL pointed at https://api.dev.pika.art/anthropic — no Pika-specific SDK is needed. Keep your Pika API key and existing Anthropic code works without a rewrite.

Errors

shared across calls

Errors use conventional HTTP status codes with a JSON body of the shape {"message": "..."}. A missing or invalid key returns 401.

Pricing

billed per token

TierPrice
Input$3.15 / 1M tokens
Output$15.75 / 1M tokens
Cached input$0.32 / 1M tokens
Cache write 5m$3.94 / 1M tokens
Cache write 1h$6.30 / 1M tokens

Per-model pricing

Transparent, usage-based rates for every Anthropic model.

Claude Fable 5

LLM

Input$10.50 / 1M tok
Output$52.50 / 1M tok
Cached input$1.05 / 1M tok
Cache write 5m$13.125 / 1M tok
Cache write 1h$21 / 1M tok

Claude Sonnet 5

LLM

Input$3.15 / 1M tok
Output$15.75 / 1M tok
Cached input$0.315 / 1M tok
Cache write 5m$3.938 / 1M tok
Cache write 1h$6.30 / 1M tok

Claude Opus 5

LLM

Input$5.25 / 1M tok
Output$26.25 / 1M tok
Cached input$0.525 / 1M tok
Cache write 5m$6.563 / 1M tok
Cache write 1h$10.50 / 1M tok