The same permissions
A key carries scopes. The workspace carries tool grants, and reading a tool is not the same grant as acting in it. A call has to clear both.
403{ "code": "scope_missing" }
API
One call hands the coworker a job. It works in your workspace, then answers with the documents it used.
{ "input": "When does Northwind renew, and what notice do we owe?", "conversation_id": "northwind-renewal", "include": ["sources"], "stream": false }
{ "data": { "answer_id": "event_01k9m4rx7te2v8b0qz5cd3ny4f", "status": "queued" } }
{ "data": { "status": "completed", "output_text": "Northwind renews on 30 September 2026.", "sources": [{ "subject": "Northwind", "fact_text": "60 days' notice" }] } }
Streaming
Some jobs finish in a second. Some take minutes. Keep the connection open and read every frame, or take an id and come back later.
answer.created
{ "answer_id": "event_01k9m4rx7te2v8b0qz5cd3ny4f", "conversation_id": "northwind-renewal" }
answer.delta
{ "text": "Northwind renews on 30 " }
Those fourteen seconds are the work. It read the drive and checked the record before it wrote a word.
answer.delta
{ "text": "September 2026. Notice is due by " }
answer.completed
{ "status": "completed", "sources": [{ "subject": "Northwind" }] }
Ask for sources and the last frame carries the facts it used. Each one names the subject it came from.
done
{ "ok": true }
Send an Idempotency-Key and a retry reads the same run back instead of paying for a second one.
Sessions
An answer is a question. A session is the work: it opens with one of your agents, keeps its history, uses the agent’s real tools, and stops to ask you before anything that needs asking.
The endpoints
The rest of the workspace
A session runs with the agent’s whole tool surface, so a call that needs approval stops it with requires_action and names the tool. Your key answers it — allow or deny — and the run goes on.
Three calls
{ "agent": "main", "title": "Nightly report", "initial_events": [ { "type": "user.message", "content": [{ "type": "text", "text": "Summarize yesterday's payouts." }] } ] }
{ "data": { "status": "idle", "usage": { "input_tokens": 5000, "output_tokens": 3200, "cache_read_input_tokens": 29000, "cache_creation_input_tokens": 4100 }, "last_activity_time": "2026-09-06T14:03:10Z" } }
{ "data": [ { "file_id": "file_01k9m4s2", "filename": "payouts.csv", "mime_type": "text/csv", "size_bytes": 4213 } ] }
What comes back
The same rules
The API is the same workspace, not a second product with its own settings. Every control you already set is on before the first call lands.
A key carries scopes. The workspace carries tool grants, and reading a tool is not the same grant as acting in it. A call has to clear both.
403{ "code": "scope_missing" }
Review workspace usage alongside the jobs your product starts.
Spend against cap
{ "code": "out_of_credits" }
Point the workspace at your Anthropic, OpenAI or Google key. The model bill goes to you.
A run your product started sits beside one somebody started in Slack, in the same list.
Auth
Make a key in the app and you see the secret once. Give it only the scopes it needs. Revoke it and the next call fails.
The same key opens the MCP endpoint, so Claude or Cursor reaches the same coworker.
Make a key, send one call, and read what comes back.