The core resource. Create a run, read it back with its trace, delete it when you are done. Base URL: https://api.myndlabs.ai
[ 01 ]Create a run
/v1/runsCreates and executes a run. The call is synchronous for y0-fast and returns 201 with the completed run; y0-deep runs may return status "running" — poll with GET until completed. Pass an Idempotency-Key header to make retries safe.
| param | type | req | description |
|---|---|---|---|
| model | string | required | Execution model — "y0-fast" or "y0-deep". |
| prompt | string | required | What the run should accomplish. 1–4,000 characters. |
| context | string[] | optional | Context sources to attach — any of "calendar", "documents", "finance". Defaults to none. |
| max_steps | integer | optional | Hard ceiling on plan-and-act steps, 1–16. Defaults to 4. Enforced, not advisory. |
| metadata | object | optional | Up to 16 string key–value pairs, echoed back on the run and in webhooks. |
{
"model": "y0-fast",
"prompt": "Prepare my Thursday.",
"context": ["calendar", "documents"],
"max_steps": 4
}{
"id": "run_4af2c19e",
"object": "run",
"status": "completed",
"model": "y0-fast",
"steps_used": 2,
"max_steps": 4,
"created_at": "2026-06-10T07:31:04Z",
"result": {
"summary": "Thursday brief drafted — 1 deadline, 1 invoice, 1 draft.",
"artifacts": ["doc_thursday_brief"]
}
}[ 02 ]Retrieve a run
/v1/runs/:idReturns the run with its full trace: the plan, every context fetch and the scope that authorized it, every step, and the result. Traces are replayable — the same trace renders identically forever.
| param | type | req | description |
|---|---|---|---|
| id | string | required | Run identifier from the create response, e.g. run_4af2c19e. Path parameter. |
| include_trace | boolean | optional | Query parameter. Include the full step-by-step trace. Defaults to true. |
{
"id": "run_4af2c19e",
"object": "run",
"status": "completed",
"trace": [
{ "type": "plan", "ms": 96, "steps": 2 },
{ "type": "context", "source": "calendar",
"scope": "calendar:read", "items": 3 },
{ "type": "step", "n": 1, "action": "collect_deadlines" },
{ "type": "step", "n": 2, "action": "draft_brief" },
{ "type": "result", "ms_total": 612 }
]
}[ 03 ]Delete a run
/v1/runs/:idPermanently removes the run record and its trace. The trust kernel's audit log entries are retained — deletion erases your data, not the record that an access happened.
| param | type | req | description |
|---|---|---|---|
| id | string | required | Run identifier. Path parameter. Deletion removes the run record and its trace; the audit log is retained. |
{
"id": "run_4af2c19e",
"object": "run",
"deleted": true
}[ 04 ]Errors
| status | code | meaning |
|---|---|---|
| 400 | invalid_request | A field failed validation. The errors object names each offending field. |
| 401 | unauthenticated | Missing or invalid API key in the Authorization header. |
| 403 | scope_denied | The run requested a context source your key's scopes do not allow. |
| 404 | not_found | No run with that id exists in this project. |
| 409 | already_deleted | The run was deleted; its trace is no longer available. |
| 422 | step_limit | The plan could not fit within max_steps. Raise the ceiling or narrow the prompt. |
| 429 | rate_limited | Too many requests. Honor the Retry-After header. |
| 500 | internal | Our fault. Retried safely — run creation is idempotent per Idempotency-Key header. |