Skip to content

Tartarus AI from the command line

Tartarus AI exposes an OpenAI-compatible endpoint. Point an existing client at it by setting two environment variables and the requests you already send keep working, unchanged. Included with the Pro plan.


Setup

Mint a token under Account › CLI access. Pro allows ten active tokens; revoking one takes effect immediately.

export OPENAI_BASE_URL=https://api.tartarusai.chat/api/v1
export OPENAI_API_KEY=<your token>

A token outlives the plan that created it, so plan access is checked on every request rather than only at mint time. Downgrade and the token stops working the same minute.

A request

curl https://api.tartarusai.chat/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deep",
    "stream": true,
    "messages": [
      { "role": "user", "content": "Explain the CAP theorem in three sentences." }
    ]
  }'

With the OpenAI Python SDK

Nothing about the client changes. The base URL and key are the whole integration.

from openai import OpenAI

client = OpenAI()   # reads OPENAI_BASE_URL and OPENAI_API_KEY

stream = client.chat.completions.create(
    model="coder",
    messages=[{"role": "user", "content": "Refactor this function."}],
    stream=True,
)

for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Endpoints

Available API endpoints
MethodPathNotes
POST/api/v1/chat/completionsStreaming and non-streaming.
GET/api/v1/modelsThe models your plan can reach.

Model ids are the public keys fast, deep and coder. See the model catalogue for what each one is for.

Limits over the API

API traffic draws on the same weekly and session budgets as the browser, and a request that exceeds the plan's context ceiling is rejected rather than trimmed — a client can compact and retry, which is the behaviour an agent wants. The per-response output cap is larger over the API than in chat: 24K tokens against 8K.

Requests are rate limited to 60 a minute from the CLI and 120 a minute on the API. A 429 means either that limit or a spent token allowance, and the error body says which; a 402 means the plan does not include API access at all.