Official API, no code changes
Requests go to POST /v1/messages with the anthropic-version header, and anthropic-beta headers take effect as sent. The official Python and TypeScript SDKs only need base_url set to https://api.unioapi.com.
Claude API
Anthropic's official SDKs, Claude Code and other clients only need one new base URL. Request fields, streaming events and error shapes match the official API, and one API key calls both Claude and GPT models.
curl https://api.unioapi.com/v1/messages \
-H "x-api-key: $UNIO_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [{ "role": "user", "content": "Hello, Claude" }]
}'The base URL is https://api.unioapi.com; paths and headers match the official API.
Requests go to POST /v1/messages with the anthropic-version header, and anthropic-beta headers take effect as sent. The official Python and TypeScript SDKs only need base_url set to https://api.unioapi.com.
Claude Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1 all have 1M context and 128K output. Apart from Haiku 5.5, long inputs have no separate long-context price.
Add cache_control to a content block to cache a stable prefix, with 5-minute or 1-hour lifetimes. Cache reads are billed at a fraction of the base input price, which adds up quickly in long chats and coding agents.
Steer thinking depth with output_config.effort, applied as sent. Thinking tokens count as output and are reported faithfully in usage.
Add speed: "fast" to a request for faster processing, billed at Fast prices; usage.speed in the response shows the tier the request actually ran on.
Console request logs list the model, tokens, latency and charge of each call, filterable by API key and endpoint, so usage and billing line up.
Redeem credit in the console and create an API key; each key can have its own spend cap and expiry.
Read the docsSet the official SDK's base_url to https://api.unioapi.com (no /v1) and use the model IDs shown on the model pages.
Read the docsFields, streaming events and error shapes match the official API; every parameter is covered in the Messages reference.
Read the docsAdd cache_control to stable prefixes such as system prompts and tool definitions to pay less for repeated input.
Read the docsEach call is settled from the usage in its response: input, output, cache reads and each cache-write lifetime are priced separately, and Fast has its own set of prices. The model pages list current prices for every model.
Two things: set base_url to https://api.unioapi.com and use your UnioAPI key. Request bodies, streaming and error handling stay the same.
Create an API key, point the base URL at https://api.unioapi.com and send your first request in minutes.