One base URL. Every model.
Point any OpenAI or Anthropic SDK at unbottled.ai. Codex CLI and Claude Code too. Images, voice, video and music on the same key. No new client to learn.
Quickstart
The API speaks the OpenAI and the Anthropic wire format. Code that runs against either runs here after two changes: the base URL and the key.
Open API keys in your account, name the key, copy it. You see it once.
Swap the base URL in your client. Anthropic clients take the second one.
Any locale works in the path (en-US, de-DE, pl-PL). It only changes the language of error messages.
For Claude Code and Anthropic SDKs. No /v1 at the end: they add /v1/messages themselves.
Paste it into a terminal, put your key in, run it. Same call in Python and JavaScript.
Example response
Access and pricing
The API runs on the same credits as the chat app. No separate API plan, no seat fees.
Need more? Subscribers top up with credit packs from $5. Pack credits never expire.
Accounts without a purchase cannot create keys, and every /v1 call answers HTTP 402 paid_plan_required.
Authentication
Send your key as a Bearer token on every request. Keys start with sk-unb-. Anthropic clients send it as x-api-key, and that works too.
We store a hash, not the key. Lose it and you create a new one.
A key works on the API only: /v1/models, chat (/v1/chat/completions, /v1/responses, /v1/messages) and media (/v1/images, /v1/audio, /v1/videos, /v1/music, /v1/media). It cannot touch your account, payments or settings.
Up to 20 active keys per account. Revoke any key at any time: it stops working at once.
No key or a revoked key returns 401. A key on an account without a purchase returns 402.
Chat completions
Standard OpenAI chat completions. Messages in, one assistant message out. Text and image inputs (image_url as https URL or base64 data URL).
Non-streaming
The default. You get one JSON body when the model is done. usage.credits_charged is what this call cost you.
Example response
Streaming
Set stream: true for server-sent events in the OpenAI chunk format, ended by data: [DONE]. Add stream_options.include_usage to get a final chunk with token counts and credits_charged. Closing the connection stops generation. You pay only for what ran.
Example stream
Request fields
Tool calling
Function calling works like OpenAI. You describe functions, the model decides to call one, you run it and send the result back. We never execute your tools.
The loop
Send tools with your messages.
The model answers with tool_calls and finish_reason: tool_calls. Each call has an id, a function name and JSON-string arguments.
Run the function yourself. Append the assistant message, then one tool message per call with its tool_call_id.
Call again. The model uses the results and answers.
1. Request with tools
2. The model asks for a call
3. Return the result
Streaming tool calls
With stream: true, calls arrive as delta.tool_calls chunks, addressed by index. The first chunk for an index carries id and function.name. Later chunks append to function.arguments. Concatenate them, then parse the JSON when finish_reason is tool_calls. Every OpenAI SDK does this for you.
The model must support tools: check supports_tools in GET /v1/models. Others return 400 tools_not_supported.
tool_choice none, auto and required work as in OpenAI. Naming a function that is not in tools returns 400.
Function names: letters, digits, underscore, dash, up to 64 characters.
Tool definitions and tool results are input tokens. Calls are output tokens. They bill like any other tokens.
Responses API
The OpenAI Responses API, the format Codex CLI speaks. Same models, key, credits and rate limits as chat completions.
Request
input is a string or a list of input items. instructions is the system prompt. The answer arrives as output items. Every OpenAI SDK also gives you output_text.
Example response
Streaming
Set stream: true for the Responses event stream: response.created, text deltas, then response.completed with usage.
Example stream
Tools: function, custom and local_shell. The model's calls come back as output items. Send each result back as a function_call_output item with the same call_id.
Reasoning models return reasoning items next to the answer.
Billing, model ids, errors and rate limits work exactly like chat completions.
Messages API
The Anthropic Messages API, the format Claude Code and the Anthropic SDKs speak. Use the base URL without /v1: clients add /v1/messages themselves.
Request
Standard Messages request: model, max_tokens, system, messages. Text and image blocks in, text and tool_use blocks out.
Example response
Streaming
Set stream: true for Anthropic server-sent events, from message_start to message_stop.
Example stream
Count tokens
POST /v1/messages/count_tokens counts the input tokens of a Messages request without running the model. Claude Code calls it to manage its context.
Example response
Auth: x-api-key or Authorization: Bearer. Both take your sk-unb key.
Model: any id from GET /v1/models. The Anthropic ids Claude Code sends by default, like claude-sonnet-4-5-20250929, map to our matching Claude model.
Tools: tool_use blocks out, tool_result blocks back, as in the Anthropic API.
Same credits, same prices, same rate limits as every other endpoint.
Images
OpenAI images format. Any model with modality image from GET /v1/models. Works with the images client of every OpenAI SDK.
Generate
Send JSON with these fields. The answer lists one url per image.
Example response
Edit an image
One input image plus a prompt. Upload it as multipart field image, or send image_url (https or base64 data URL) in JSON. The model must take image input: input_modalities contains image. Masks are not supported; describe the change in the prompt.
We pick the closest size and ratio the model renders.
url is a signed link to the stored file, valid 7 days without a key. b64_json returns the bytes inline.
Billed per image. credits_charged in the response says what the call cost.
Text to speech
Text in, audio bytes out. model is a voice id from GET /v1/models (modality speech), like openai-nova. OpenAI style also works: model tts-1 with voice nova.
input up to 4096 characters. speed 0.25 to 4 on OpenAI, NanoGPT and ElevenLabs voices.
response_format mp3 (default), opus, aac, flac, wav or pcm. Which ones a voice delivers depends on its provider; others answer 400 with the list.
Billed per character. The X-Credits-Charged header says what the call cost.
Transcription
Speech to text, OpenAI Whisper format. Multipart upload, same SDK call you already use.
Transcribe
file up to 25 MB (mp3, mp4, m4a, wav, webm, ogg, flac), model like whisper-1, optional language. response_format json, text, srt, verbose_json or vtt.
Example response
Translate to English
POST /v1/audio/translations: any spoken language in, English text out. Runs on whisper-1. Same formats as transcriptions.
Billed per second of audio.
Video
Async, in the shape of OpenAI's video API. The call answers at once with a job. Poll it, then download the MP4.
Start a job
model, prompt, seconds, size or aspect_ratio, resolution, negative_prompt. The answer is a video object with status queued.
Finished job object
Poll and download
GET /v1/videos/{id} returns status (queued, in_progress, completed, failed), progress and, when done, a signed url. Polling is free and skips abuse limits. GET /v1/videos/{id}/content streams the MP4.
Image to video: send image_url in JSON or input_reference as a multipart upload. It becomes the first frame.
Billed when the video is ready, per second of video. credits_charged shows the cost.
A failed job costs nothing. error says why.
Music
Async like video. Start a job, poll GET /v1/music/{id}, download GET /v1/music/{id}/content.
Start a job
Poll and download
seconds: about 8, 20 or 30. The model may round it. Describe style, mood, instruments and tempo in prompt.
Billed per clip once it is ready. A failed job costs nothing.
Media files
Every url in a media response points here. The signed link works without a key for 7 days, so you can hand it to a browser or a user. With your API key the same path works any time.
Models
GET /v1/models lists the models your key can call right now, with context size, tool support and credit prices per million tokens. Use the id as the model field in requests.
Example response
The list depends on your account. Unknown or unavailable ids return 404 model_not_found. The one mapping: on /v1/messages, Claude ids that Claude Code sends by default go to our newest Claude of the same family.
Chat token prices
The pricing extension lists customer credits per million tokens at the base context tier, including markup. No field in this object is denominated in USD. A null value means no separate rate is listed.
When pricing.tiers is present, use the same credit fields in the matching tier. min_prompt_tokens includes the threshold. utc_start and utc_end are UTC times in HHMM format, including the start and excluding the end.
Media models in the same list
Image, video, music, voice and transcription models sit in the same list. Each entry says what it does and where to call it.
modality is chat, image, video, music, speech or transcription. endpoints lists the paths that take the model.
Media pricing is per unit: credits_per_image, credits_per_second (video), credits_per_clip (music), credits_per_1k_characters (speech), credits_per_minute (transcription).
Anthropic clients (anthropic-version header) get chat models only. Models whose provider is not set up on our side are not listed and answer 404 model_not_found.
Credits and billing
The API draws from the same credits as the chat app, billed by the same rules. One balance, one bill.
For a listed-price estimate, multiply each token count by its credit rate per million. Count each input token once as uncached, read or written.
Every response reports usage.credits_charged. Your balance is in the app under Credits.
Before a call runs we check your balance against a worst-case estimate. Not enough: HTTP 402 insufficient_credits, nothing runs, nothing is charged.
When the provider reports a charge, billing uses that charge plus markup. Otherwise it uses the applicable token rates. The final rounded charge is in usage.credits_charged.
Media calls bill the same way: the provider's real cost plus our markup where the provider reports it, the listed per-model price otherwise. Images bill per image, speech per character, transcription per second of audio, video when the clip is ready, music per clip.
Out of credits? Top up with a pack, renew or upgrade your plan. The next call works immediately.
Errors and rate limits
Errors use the OpenAI envelope, so SDKs raise their usual exceptions. Branch on error.code, not on the message.
Error body
Error codes
Rate limits
No fixed rate limit for paying accounts. Usage is billed per request from your credits, and calls stop with HTTP 402 when you run out. Generous abuse protection applies (a high burst ceiling and a concurrent stream cap) so runaway loops cannot overload the service. Upstream provider 429s pass through with their Retry-After header. If you get HTTP 429, back off for Retry-After seconds and retry.
Coding tools
One base URL, one key. Codex CLI and Claude Code connect natively. OpenCode, Continue, Aider and Cline use chat completions. Pick your tool, copy the block, run it.
Paste the command and Codex runs on unbottled.ai. To keep it, append the block to ~/.codex/config.toml and start Codex with --profile unbottled.
SDK examples
The official OpenAI and Anthropic SDKs work unchanged. Set the base URL and the key, keep the rest of your code.
Chat
Streaming
Responses API
Anthropic SDK
Images
Speech
Transcription
Guides
Longer walkthroughs: switching from OpenAI or OpenRouter, uncensored models over the API, and wiring your key into coding tools.
One API key, every model. OpenAI and Anthropic formats.
OpenAI chat completions, the Responses API and Anthropic Messages on one endpoint. Your SDK, Claude Code and Codex CLI on every model. What it costs, and when going direct or using OpenRouter is the better call.
Developer GuideUncensored LLM API. Your SDK. No refusal reflex.
Abliterated and uncensored models over OpenAI and Anthropic compatible endpoints. Model ids, prices, a working curl and Python example, limits and the 18+ step.
Developer GuideOne key. Every model. Codex and Claude Code included.
Codex CLI, Claude Code, OpenCode, Continue, Aider and Cline on one API key, uncensored models included. One base URL, one command per tool, the gotchas we hit.
Developer GuideOpenRouter alternatives. One key, fewer refusals.
Six OpenRouter alternatives from their own docs: API formats, uncensored coverage, fees. Plus the two lines that change when your OpenAI SDK client moves over.