Beta
An API for your account
What you do in the app, a program of yours can do with a key: make a project, send an agent a message and read its answer, start a run, read the rows and files your agents produced.
API keys are part of Solo, Team, Scale and Enterprise. The Free plan has none.
The API is new. Its calls are covered by automated tests and were run end to end with real agent turns, but few programs other than our own have used it yet, and a call or its answer may still change.
Start
A key, one call, an answer
- In the app, open Account & Security and make a key. Tick what it may do. Its text is shown once: keep it where your program reads its secrets, never in a web page or an app people download.
- Send the key with every call, as a Bearer token. A key works for the API only. It is not a sign-in to the app.
- Call it with plain HTTP from any language, as shown below.
# What this key is and may do
curl https://runchoreo.com/api/v1/me \
-H "Authorization: Bearer $API_KEY"
# Send an agent a message. The answer comes at once, with the ids to ask about.
curl -X POST https://runchoreo.com/api/v1/agents/$AGENT_ID/messages \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: orders-2026-11-22" \
-d '{"text":"Summarise the orders of yesterday"}'
# 202 {"conversationId":"conv-…","messageId":"msg-…","status":"running"}
# Ask until the status is no longer "running".
curl https://runchoreo.com/api/v1/conversations/$CONVERSATION_ID/turns/$MESSAGE_ID \
-H "Authorization: Bearer $API_KEY"
# 200 {"status":"done","reply":{"text":"…"}}What a key may do
Four permissions, ticked when you make it
Read
The account and its credit, projects, agents, chats and their messages, runs, the rows of a project's data tables and its files.
Create and change
Make a project. Make an agent, or change its name, model, prompt and status.
Run agents
Send an agent a message, stop a turn, start and cancel a run. This spends credit, so each key has a number of turns it may start per day. Reading the answer needs Read as well.
Delete
Delete a project or an agent. Off unless you tick it. It cannot be undone.
A key can be limited to one project. It then sees that project only, cannot make projects and cannot read the account's usage.
A key reaches the projects of its own account. A project of another account that you are a guest of is not reachable with a key.
No key can make or revoke keys, change billing, manage connections or stored passwords, answer an approval, or change a project's permission settings. A key ends when you revoke it, when its end date passes, and when you change or reset your password.
Sending a message
Nobody is at the screen
In the app, an agent that wants to do something risky shows a card and waits for your click. A program cannot click. So for a message sent with a key no card is shown: the step is refused, and the agent says in its answer what it could not do.
When you make a key you can allow its turns to write files and to run code. Run code comes in two kinds. The careful one covers code our command check finds nothing in; a command it flags is refused, because nobody is there to look at it first. Run any code works as a schedule does: choose it only for a key you keep safe, because whoever holds the key can then run anything in the project's server. Our check still stops the commands it rates dangerous. Sending mail, deleting files, browsing the web, computer mode, phone calls and stored passwords can never be allowed for a key.
These are about what would otherwise ask. A project whose own settings let its agents write files or run code without asking does so for a key's message as it does for yours. And they apply to messages: the steps of a run follow the project's settings alone.
If the text you send comes from somebody else, a customer's mail or a form, say so with "untrusted": true. The agent then treats the turn as one that has read outside content and does less without asking.
| How a turn ended | Meaning |
|---|---|
| done | The agent answered. An answer that says it could not do something is still done. |
| stopped | The turn was stopped. The text is what had been written. |
| failed | The turn broke. Send the message again to retry. |
| workspace_starting | The account's server was starting. Nothing ran. Try again in a few minutes. |
| needs_credit, low_balance | The account could not pay for it. Nothing ran. |
| lost | The server went away with the turn in it. |
Reference
The 25 calls
Every path is under https://runchoreo.com/api/v1. Every call takes the key as a Bearer token and answers JSON.
| Call | Permission | What it does |
|---|---|---|
| GET /me | any | What this key is and may do |
| GET /usage | Read | The credit left, and usage per project and agent |
| GET /projects | Read | The account's projects |
| POST /projects | Create | A new project with one agent |
| GET /projects/:id | Read | One project |
| DELETE /projects/:id | Delete | Delete a project |
| GET /projects/:id/agents | Read | A project's agents |
| POST /projects/:id/agents | Create | A new agent |
| GET /agents/:id | Read | One agent |
| PATCH /agents/:id | Create | Change an agent's name, model, prompt or status |
| DELETE /agents/:id | Delete | Delete an agent |
| POST /agents/:id/messages | Run | Send a message. Answers at once with the ids to ask about |
| GET /conversations/:id/turns/:messageId | Read | Is the turn still running, or how did it end |
| POST /conversations/:id/stop | Run | Stop the turn that is running |
| GET /projects/:id/conversations | Read | A project's chats |
| GET /conversations/:id/messages | Read | A chat's messages |
| POST /projects/:id/runs | Run | Start a run |
| GET /projects/:id/runs | Read | A project's runs |
| GET /runs/:id | Read | A run with its status and result |
| POST /runs/:id/cancel | Run | Cancel a run |
| GET /projects/:id/data | Read | A project's databases |
| GET /projects/:id/data/:databaseId/schema | Read | Tables and columns |
| GET /projects/:id/data/:databaseId/tables/:table/rows | Read | Rows, a page at a time |
| GET /projects/:id/files | Read | The files in a project's workspace |
| GET /projects/:id/files/content | Read | One file, as it is |
A call that makes something (a project, an agent, a message, a run) takes an Idempotency-Key header. If your connection breaks and you send the call again under the same key, you get the first call's answer and nothing is made twice.
Errors and limits
One shape, a word to branch on
{ "error": { "code": "permission_denied", "message": "This key cannot run agents." } }| code | Status | Meaning |
|---|---|---|
| invalid_api_key | 401 | The key is missing, wrong, revoked or ended. |
| permission_denied | 403 | The key lacks the permission, or is limited to one project. |
| plan_limit | 403 | The plan's number of projects, agents or runs is reached. |
| not_found | 404 | No such thing, or it is not yours. |
| invalid_request | 400 | A field is missing or wrong. The message says which. |
| insufficient_credit, low_balance | 402 | The account cannot pay for the turn. |
| rate_limited | 429 | Too many requests. The answer says how long to wait. |
| too_many_turns | 429 | The account's keys have as many turns running as its plan allows at once. |
| daily_limit | 429 | The key has started its turns for today (UTC). |
| workspace_starting | 429 | The account's server is starting. |
| idempotency_key_reused | 422 | That Idempotency-Key belongs to another request. |
| request_in_progress | 409 | The first call with that Idempotency-Key is still running. |
| conflict | 409 | It cannot be done in that state. The message says why: an agent that has runs cannot be deleted. |
| api_off | 503 | The API is switched off for the moment. |
Each plan has its own pace. Requests a minute and turns at once count all of an account's keys together. Turns a day count each key, and a key can be made with a lower number. A run counts as a turn.
| Plan | Keys | Requests a minute | Turns at once | Turns a day, per key |
|---|---|---|---|---|
| Solo | 2 | 30 | 1 | 100 |
| Team | 5 | 60 | 2 | 300 |
| Scale | 20 | 120 | 5 | 1,000 |
| Enterprise | No limit | 120 | 5 | 2,000 |
- Asking how a turn ended counts as a request too. Ask every few seconds, and after a 429 wait the time it names in
Retry-After. - A message is text, up to 100,000 characters.
What it does not do yet
The first version is small on purpose
- No attachments with a message.
- No writing of rows or files. Reading only: your agents write, your program reads.
- No live stream of an answer. You ask how the turn ended.
- No events sent to a server of yours.
- One client, in TypeScript. Every call is plain HTTP, from any language.
Make a key and send the first message
Keys are under Account & Security in the app. One takes a minute to make and can be revoked at any time.