Developer docs/claude-opus-5

Claude Opus 5

claude-opus-5

Claude Opus 5 is Anthropic's current flagship Opus — near-Fable intelligence at half Fable's token price.

Overview

Official $5.00 / $25.00
LumeAPI $2.50 / $12.50
POST /v1/chat/completions
Base: https://api.lumeapi.site/v1

Auth: Authorization: Bearer sk-… from the Console. Use this model id exactly in the model field.

Streaming (optional)

Enable streaming

POST /v1/chat/completions with "stream": true. Response Content-Type is text/event-stream.

SSE frame format

First line: retry: 3000 (reconnect delay ms). Each chunk: id: N then data: {JSON}. Heartbeats: : PING comment lines (~every 30s). End: data: [DONE].

Save stream_id

Use the "id" field inside the first data JSON (e.g. chatcmpl-abc…) as stream_id for resume.

Resume after disconnect

GET /v1/chat/completions/stream/resume/{stream_id}?last_event_id=N with the same Bearer key. Also accepts Last-Event-ID header. Replays cached chunks from N+1; waits for new chunks if still generating.

404 stream gone

Hub expired (>30 min after completion) or server restarted. Do not retry resume — re-submit POST or fetch final result another way.

Video jobs

Video models use async POST/GET polling, not SSE. See Video Integration section.

Errors

  • 401 — invalid or missing Bearer key
  • 402 — insufficient wallet balance (top up in Account)
  • 403 — model id not on the whitelist / wrong id spelling
  • 429 — rate limited; back off and retry
  • 502 — temporary gateway error; retry

FAQ — API parameters & pricing

claude-opus-5 — official vs LumeAPI pricing

Official: $5.00 / $25.00. LumeAPI: $2.50 / $12.50 (per 1M input/output tokens). /models/claude-opus-5

How to call claude-opus-5 with openai compatible api

POST https://api.lumeapi.site/v1/chat/completions, model="claude-opus-5", Bearer key. Same shape as OpenAI Chat Completions — /openai-compatible-api.

Claude Opus 5 API docs and curl

/docs/models/claude-opus-5 · cross-provider pricing: /ai-api-pricing

openai sdk compatible — claude-opus-5 base_url

base_url=https://api.lumeapi.site/v1, model="claude-opus-5". Do not append /chat/completions in SDK clients.