API

API reference

Start runs from your own systems and get results back.

Preview. The API opens with the studio launch. Endpoints and fields may change; the host name will be shared with your API key.

Authentication

Send your API key in the Authorization header. Keys are created per workspace in the studio and can be revoked at any time.

Authorization: Bearer YOUR_API_KEY

POST/v1/runs

Start a run of a deployed agent with your own input.

curl -X POST https://API_HOST/v1/runs \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent": "support-triage", "input": { "channel": "whatsapp", "text": "Where is my order?" } }'

GET/v1/runs/:id

Read a run: its status, each step's output, timing and cost.

{ "id": "run_8f2c", "status": "completed", "result": { "action": "reply", "text": "Your order shipped yesterday." }, "duration_ms": 1630 }

GET/v1/agents

List the agents in your workspace and their live versions.

Webhooks

Register a URL to be told when something happens:

  • run.completed: a run finished.
  • run.needs_approval: a run is waiting for a person.
  • run.failed: a run stopped with an error.

Errors

Errors use standard HTTP status codes with a JSON body that names the problem, for example 401 for a missing key and 429 when you send too many requests.