OpenAI Compatible API With Claude Code: Limits
Short version: Claude Code does not talk to OpenAI-style endpoints directly, so an OpenAI compatible API Claude Code setup needs a translation layer. Other coding agents accept such endpoints natively. Here is what works, what does not, and what to expect.
Updated


Key points
- +Claude Code is built around Anthropic's Messages format; this API serves /v1/chat/completions and /v1/responses, so they do not connect by default.
- +A translating proxy can bridge the two, but behaviour with agent tool loops must be tested, not assumed.
- +Agents with an OpenAI-compatible mode, such as Aider, take a base URL and key directly.
- +The model here is a single open-weight text model with a 100,000-token window, not an Anthropic model.
The protocol gap in one paragraph
Searching for an OpenAI compatible API Claude Code combination usually means you want to run the Claude Code interface against a cheaper or less restricted model. The obstacle is the wire format. Claude Code is a tool from Anthropic and is designed to call Anthropic's Messages API. It lets you override the base URL through the ANTHROPIC_BASE_URL environment variable, but whatever sits at that URL must still answer in the Anthropic format. The endpoint at https://api.geminiuncensored.com/v1 answers in the OpenAI format: POST /v1/chat/completions, POST /v1/responses and GET /v1/models. Setting the variable to this URL will not work, because the paths and the payloads differ.
That is a statement about formats, not about quality. The fix is either a translator in the middle or a different front end. The rest of this article covers both, plus the limits you will meet whichever way you go.
Option 1: put a translating proxy in between
Open-source gateways exist that accept requests in the Anthropic format and forward them to an OpenAI-compatible backend. LiteLLM is one widely used example, and there are community projects built specifically for routing Claude Code to other providers. Check the current documentation of whichever you choose, because their options change often.
The general shape is the same. You run the proxy locally, declare a model that points at this API, and aim Claude Code at the proxy. A LiteLLM-style config looks like this:
cat > config.yaml <<'EOF'
model_list:
- model_name: uncensored
litellm_params:
model: openai/uncensored
api_base: https://api.geminiuncensored.com/v1
api_key: os.environ/UNCENSORED_KEY
EOF
export UNCENSORED_KEY="your-key-here"
litellm --config config.yaml --port 4000
Then point your tool at http://localhost:4000 and test with one simple prompt before anything else. Which model name the tool sends, and how the proxy maps it, depends on the proxy version, so read its docs for the Anthropic-compatible route. Treat this setup as unofficial: neither the proxy authors nor this service promise that every Claude Code feature survives the translation.
Option 2: use an agent that speaks OpenAI natively
Several coding assistants accept a custom OpenAI-compatible endpoint and need no translator. Aider is a terminal tool that does, using standard environment variables:
export OPENAI_API_BASE="https://api.geminiuncensored.com/v1"
export OPENAI_API_KEY="your-key-here"
aider --model openai/uncensored
Editor extensions such as Cline and Continue also let you set an OpenAI-compatible provider with a base URL, key and model name. OpenAI's own Codex CLI supports custom providers through its configuration. Exact settings vary by version, so verify against each tool's docs. In all of them the values you enter are the same: base URL as above, your key, and the model id uncensored.
This route is simpler for a practical reason. The tool was written with OpenAI-style APIs in mind, so the request and response shapes match what the endpoint already provides. You skip the proxy, one fewer process to start, and one fewer place where a log line can hide the real error.
What may break when you swap the model
Agentic coding is demanding. A tool like Claude Code or Aider sends long prompts, large file excerpts and tool definitions, and expects precise, structured replies. Be ready for these differences:
- Different model, different strengths. This is one open-weight model run by an independent provider, not an Anthropic model and not a router across vendors. It will not behave like the model the tool was tuned for.
- Tool calling. The API supports
tools,tool_choiceand streamedtool_calls, with results sent back asrole: "tool". How reliably the model follows a particular agent's tool schema is something only a test can tell you. - Context size. The window is 100,000 tokens for prompt plus completion. Agents that load very large repositories can exceed that, so expect to trim.
- Text only. No image input handling, no embeddings. Features that rely on them will not work.
- Proxy gaps. A translator may not map every Anthropic feature, such as particular thinking or caching options, so some features are silently dropped.
Test the endpoint before wiring anything
Whatever route you take, confirm the API itself first, so you can tell an endpoint issue from a tool issue.
curl https://api.geminiuncensored.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [
{"role": "user", "content": "Write a Python function that parses ISO dates."}
]
}'
If this returns text, the key and base URL are right. Keys come from the API key page, where new users can claim $0.50 of trial credit with one click. The trial key has 2 concurrent requests and 60 requests per minute. Coding agents can run several calls at once, so you will see HTTP 429 with the code concurrency or rate_limited sooner than you might expect. A funded key allows 8 concurrent and 300 per minute. The article on the key header explains the Bearer format if you get authentication errors.
Cost of a coding session
Before you commit to either path, decide what you actually need from the tool. If it is the editing workflow and file handling, many agents offer that. If it is a particular model's quality on coding tasks, no wrapper will change what the model can do, and you should run your own small benchmark on a repository you know well: one bug fix, one refactor and one new test. Compare how many attempts each needs.
Agents resend a lot of context, so input tokens dominate. Suppose a session makes 60 requests averaging 25,000 input tokens and 800 output tokens. Input: 60 × 25,000 = 1,500,000 tokens, which is 1.5 × $0.15 = $0.225. Output: 60 × 800 = 48,000 tokens, which is 0.048 × $0.50 = $0.024. The session costs about $0.25. Failed requests are not charged. Billing is prepaid with no subscription, and credit never expires.
This site accepts crypto top-ups only (USDT on TRC20, USDC on Base), in any whole amount from $20 to $500, with bonuses of 5% from $50, 10% from $100 and 15% from $200. See the pricing page and the docs for details.
When to choose which path
If you only want a coding assistant on top of this model, use an agent with native OpenAI support. It is the shortest path and has the fewest moving parts. If you specifically want the Claude Code interface, a proxy is the only route, and you should treat it as an experiment: run a small task, read the logs, and see whether tool calls complete. If the results are poor, the likely cause is model and prompt fit, not your configuration. For a general view of this API as a drop-in replacement elsewhere, see the note on an OpenAI-compatible Gemini alternative.
More guides
Questions and answers
Can I set ANTHROPIC_BASE_URL to this API?
Not directly. That variable expects an endpoint that speaks Anthropic's Messages format, while this API speaks the OpenAI format. You would need a translating proxy.
Which tools work without a proxy?
Tools that accept a custom OpenAI-compatible base URL, such as Aider, Cline and Continue. Check each tool's docs for exact settings.
Is the model the same as Claude or Gemini?
No. It is an open-weight model run by an independent provider, and this service is not affiliated with Anthropic or Google.
Does it support tool calling for agents?
Yes, the API supports tools, tool_choice and streamed tool_calls. How well the model follows a given agent's schema should be tested.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.