API Reference
API Reference
Every endpoint, schema, and example payload.
The Levain Labs API lets you manage agents, trigger runs, inspect sandboxes, and track cost — everything the dashboard does, exposed over HTTPS.
All endpoints live under https://api.levainlabs.com/api/v1/ and require a
bearer token:
Authorization: Bearer YOUR_API_KEYSee Authentication for how to create and manage keys.
Resources
| Resource | What it covers |
|---|---|
| Agents | Create, version, list, update, and archive agents. |
| Runs | Trigger a run, poll status, stream logs, cancel. |
| Sandboxes | Inspect the isolated environment a run is executing in. |
| Authentication | API keys, workspace identity. |
| BYOK | Register and manage your own model-provider keys. |
| Analytics | Usage summaries, billing roll-ups, and per-run cost breakdowns. |
Every endpoint page includes request and response schemas, example payloads, and the exact error shapes you should expect.