Use Cosmic 1 through the API.
Ultrac speaks the OpenAI chat-completions format from this site's own /v1. Create a key, set the base URL, and use the cosmic-1 model ID. It is the same API the Ultrac agent signs in to, so one key covers your terminal and your code.
Send a chat completion request.
The request needs this site's base URL, your key as a bearer token, and model: cosmic-1. Any OpenAI SDK works unchanged.
Base URL
https://ultrac.io/v1
Auth
Authorization: Bearer ultrac_sk_...
Model
cosmic-1
curl https://ultrac.io/v1/chat/completions \
-H "Authorization: Bearer $ULTRAC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "cosmic-1",
"messages": [{"role": "user", "content": "Analyze this incident."}]
}'Keys are created and revoked on the API keys page once your account is approved. A key is shown once, stored only as a hash, and can be turned off at any time.
Streaming and tool calling work the way they do at OpenAI: send stream: true for server-sent chunks, and tools with tool_choice to have the model call your functions and return tool_calls. The request reference has a worked example.
Work that takes minutes does not fit in one request. Queue it as a task instead: POST /v1/runs answers before the model starts, a worker does the work, and you follow the event log over server-sent events - dropping the connection and rejoining from the last event you saw costs nothing. Long-running tasks has the endpoints and a copyable loop.
What each plan allows.
Stated per account, for the plan confirmed on it; until one is, Free applies. Every key also has its own per-minute bucket at the same figure, so a 429 names the key that is hot and ten keys cannot multiply the plan. Nothing here is billed.
| Plan | API requests / minute | API requests / day | Dashboard / minute |
|---|---|---|---|
| Free | 10 | 200 | 20 |
| Pro | 60 | 2,000 | 40 |
| Team(at 3 seats; the daily figure grows per seat) | 300 | 9,000 | 60 |
| Ultra | 1,200 | 40,000 | 120 |
A request over the limit answers 429 with a retry-after header. Full reference, including the request fields and error codes, is in the docs.