Developers
The Platform's gateway could not be reached from this page just now, so the live reference,…
# Python — the OpenAI SDK
import os
from openai import OpenAI
client = OpenAI(base_url="https://account.tmrwtitans-staging.com/api/v1", api_key=os.environ["TITAN_API_KEY"])
r = client.chat.completions.create(model="openai/gpt-6-luna-pro", messages=[{"role": "user", "content": "Hello, Titan"}])- Base URL
- https://account.tmrwtitans-staging.com/api/v1
- Auth
- Authorization: Bearer or x-api-key — the same key either way
- Your key
- made on the Keys page of your Titan account; shown once. A tk_test_… key is free and reaches no upstream.
- Streaming
- the chat route always streams server-sent events; the final frame carries usage with usage.cost
- What can it do?
- ask the key itself: GET /key, /catalog and /balance — free, and nothing is counted
See what your key can do
three calls · free · nothing is counted| Call | What it answers | SDK |
|---|---|---|
| GET /api/v1/key | What this key is, and for each service (chat, decisions, docs, agents, memory, verify, finance, lex, confidential) whether it can be used right now — and the exact reason when not. | await titan.key() titan.key() |
| GET /api/v1/catalog | The models, confidential models, agents and agent teams this key may use, each with its price. A key limited to some of them sees only those. | await titan.catalog() titan.catalog() |
| GET /api/v1/balance | Your organization's credit (balance, available, reserved) and this key's own spend against its cap. | await titan.balance() titan.balance() |
curl https://account.tmrwtitans-staging.com/api/v1/key \
-H "Authorization: Bearer tk_live_XXXXXXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXXXX"
curl https://account.tmrwtitans-staging.com/api/v1/catalog \
-H "Authorization: Bearer tk_live_XXXXXXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXXXX"
curl https://account.tmrwtitans-staging.com/api/v1/balance \
-H "Authorization: Bearer tk_live_XXXXXXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXXXX"When GET /key says a service is not available, its reason is the same sentence that service would refuse with — for example that your workspace does not offer agents yet, and how to switch them on. Your organization's credit is GET /balance.
Agents and agent teams
released ones with prices, then coming soonThe list could not be read just now.
An agent run bills its minutes and the model calls it makes, both at the agent's class; a team run at the team's. A run needs the Agents API switched on for your workspace — GET /key says whether it is. Agents made for a product (such as LegalOS) run inside that product.
From OpenAI or Anthropic in two lines
the SDKs you already use// TypeScript — the OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://account.tmrwtitans-staging.com/api/v1", apiKey: process.env.TITAN_API_KEY });
const r = await client.chat.completions.create({ model: "openai/gpt-6-luna-pro", messages: [{ role: "user", content: "Hello, Titan" }] });
# Python — the OpenAI SDK
import os
from openai import OpenAI
client = OpenAI(base_url="https://account.tmrwtitans-staging.com/api/v1", api_key=os.environ["TITAN_API_KEY"])
r = client.chat.completions.create(model="openai/gpt-6-luna-pro", messages=[{"role": "user", "content": "Hello, Titan"}])Anthropic-style clients send the key as x-api-key; anthropic-version is accepted and ignored. Honoured request fields: model, messages, stream, max_tokens, temperature, top_p, stop, tools, tool_choice, response_format, n (must be 1), user, metadata, and the titan object. Any other field is refused with 400 — Titan never silently ignores an unknown field.
Links
?the operator's documents and where to look when something is off- Status
- /status
- Changelog and deprecation policy
- /developers/changelog
- OpenAPI document
- https://account.tmrwtitans-staging.com/api/v1/openapi.json
Endpoint reference
the OpenAPI document could not be read just nowErrors
?one shape everywhere: {error: {message, type, param, code}} — all four keys, always| code | HTTP | type | When | Retry? |
|---|---|---|---|---|
| invalid_api_key | 401 | authentication_error | missing, malformed, unknown, disabled, expired or revoked key; two auth headers that disagree | no |
| insufficient_credit | 402 | billing_error | the available balance does not cover the reservation — add credit | no |
| not_entitled | 403 | permission_error | the key's scopes, models, workspace services, IP allowlist, or a member without the power | no |
| workspace_archived | 403 | permission_error | the key's workspace is archived, or the organization is suspended | no |
| model_not_found | 404 | not_found_error | not in the API catalog, or an object that does not exist (param names it) | no |
| invalid_request | 400 | invalid_request_error | body shape, an unknown field, a limit above the tier, a body over 8 MB | no |
| rate_limit_exceeded | 429 | rate_limit_error | param ∈ requests · tokens · concurrency · tier_monthly_spend · workspace_spend_limit · key_spend_limit | yes, after retry-after |
| idempotency_conflict | 409 | conflict_error | same Idempotency-Key, different body; the same request still in flight; a stream too long to replay | no |
| internal | 500 · 502 · 503 | api_error | ours (500); the upstream failed before the first byte (502, retry-after: 2); maintenance or a store outage (503, retry-after: 300) | yes, after retry-after |
Why 402, not 429: an empty wallet is not a reason to retry. Retrying will not restore access; add credit in your account.
What the headers mean
on every response, 2xx and 429 alike| Titan header | OpenAI-style alias | Meaning |
|---|---|---|
| titan-ratelimit-requests-limit / -remaining / -reset | x-ratelimit-limit-requests / -remaining-requests / -reset-requests | requests in the current minute |
| titan-ratelimit-tokens-limit / -remaining / -reset | x-ratelimit-limit-tokens / -remaining-tokens / -reset-tokens | the token window (input + cached + output) |
| retry-after | retry-after | seconds to wait, on 429 and on 502 / 503 |
| titan-organization-id · titan-workspace-id · x-request-id | — | who, which, and the request id every record carries |
Both families say the same thing. titan-*-reset is an RFC 3339 time; x-ratelimit-reset-* is OpenAI's duration form (17s). A request counts as its prompt estimate plus max_tokens until it settles; cache reads are credited back when it does.
Prices
?USD per million tokens, from the price book in effect — no key needed to read themThe price list could not be read just now.
Each price is Titan's own cost on that meter times its class's multiplier — models, confidential models, agents and agent teams each have their own; GET https://account.tmrwtitans-staging.com/api/v1/catalog shows the multipliers in effect for a key. Prices are read live from the Platform and may change; the price in effect at the time of a call is the one that bills it, and every billed answer carries its price book. https://account.tmrwtitans-staging.com