We speak both major API dialects, so your existing tool works unchanged — no plugin, no proxy, no SDK swap. Sign up, create a key, export two variables. New accounts get 150,000,000 free output tokens.
Create one at /portal/apikeys. It is shown
once. Keys look like sk-optra-… and travel in the
Authorization: Bearer header.
export OPENAI_BASE_URL=https://api.optracloud.com/v1
export OPENAI_API_KEY=<your key>export ANTHROPIC_BASE_URL=https://api.optracloud.com
export ANTHROPIC_AUTH_TOKEN=<your key>
export ANTHROPIC_MODEL=optra-coderoptra-coderIt is what /v1/models advertises, and it stays stable when we
re-quantise or move hardware underneath. qwen3-coder and
qwen3-coder-30b are accepted aliases.
Every row was tested against the live endpoint on 16 Aug 2026 — chat, streaming, and the tool-calling loop an agent needs to read and edit files. If one breaks, it is a bug, not a caveat.
| Tool | How to configure | Chat | Tools |
|---|---|---|---|
| Claude Code | export ANTHROPIC_BASE_URL=https://api.optracloud.com | Yes | Yes |
| OpenAI Codex CLI | export OPENAI_BASE_URL=https://api.optracloud.com/v1 | Yes | Yes |
| Cline | API Provider: OpenAI Compatible | Yes | Yes |
| Cursor | Settings > Models > OpenAI API Key > Override base URL | Yes | Yes |
| Aider | export OPENAI_API_BASE=https://api.optracloud.com/v1 | Yes | Yes |
| Continue | provider: openai | Yes | Yes |
| curl, or any SDK | curl https://api.optracloud.com/v1/chat/completions \\ | Yes | Yes |
Anything that speaks either dialect works. The two endpoints
are /v1/chat/completions and /v1/messages.
curl $OPENAI_BASE_URL/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"optra-coder",
"messages":[{"role":"user","content":"Reverse a string in Python"}]}'curl https://api.optracloud.com/v1/messages \
-H "x-api-key: $OPTRA_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"optra-coder","max_tokens":512,
"messages":[{"role":"user","content":"Reverse a string in Python"}]}'import os
from openai import OpenAI
# Read the key from the environment. A key in a repo is a key
# on the internet.
client = OpenAI(base_url=os.environ["OPENAI_BASE_URL"],
api_key=os.environ["OPENAI_API_KEY"])
r = client.chat.completions.create(
model="optra-coder",
messages=[{"role": "user", "content": "…"}],
)
print(r.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: process.env.OPENAI_BASE_URL,
apiKey: process.env.OPENAI_API_KEY,
});
const r = await client.chat.completions.create({
model: "optra-coder",
messages: [{ role: "user", content: "…" }],
});
console.log(r.choices[0].message.content);Set "stream": true. The OpenAI path emits the usual
data: chunks ending in [DONE]; the Anthropic path
emits message_start, content_block_delta and
message_stop. We take exact token counts from the model
server's final frame, so what we bill is what it generated — never an
estimate of ours.
Supported on both dialects — this is what lets an agent read and edit
your files. Send tools as usual; the model replies with
tool_calls (OpenAI) or a tool_use block
(Anthropic).
curl $OPENAI_BASE_URL/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"optra-coder",
"messages":[{"role":"user","content":"Read /etc/hostname"}],
"tools":[{"type":"function","function":{
"name":"read_file","description":"Read a file",
"parameters":{"type":"object",
"properties":{"path":{"type":"string"}},
"required":["path"]}}}]}'curl $OPENAI_BASE_URL/models -H "Authorization: Bearer $OPENAI_API_KEY"We bill generated tokens. The context you send is free, because charging for input punishes long-context coding — the exact workload this model is for.
The free tier is paced to 60 token/sec. Paid plans hold a 60 token/sec floor even when every seat is busy.
Shared plans cap at 128K so one long session cannot crowd out the card. Dedicated cards carry 256K to a full 1M.
| Code | Means | What to do |
|---|---|---|
| 401 | Missing or revoked key | Check the Authorization: Bearer header |
| 402 | Free grant exhausted | Invite someone for another 150,000,000, or start a plan |
| 404 | Unknown model | Use optra-coder |
| 502 | Model server rejected it | Usually a malformed body — check the request |
| 503 | Model server unreachable | Ours to fix — retry shortly |
Errors come back in OpenAI's shape, so client libraries surface them the way you already expect.
| Symptom | Cause |
|---|---|
403, body reads error code: 1010 |
Your HTTP client sends a User-Agent our edge reads as
a bot — bare Python-urllib is the usual culprit.
Every real SDK and curl passes. Set any normal User-Agent. |
| Claude Code connects but will not edit files | Set ANTHROPIC_MODEL=optra-coder. Without
it the tool requests a model we do not serve. |
| Generation feels slow | The free tier is paced to 60 token/sec by design. Paid plans start at a 60 token/sec floor. |
| Long prompt returns 400 | Shared plans cap at 128K tokens per request, prompt plus completion. |