For the complete documentation index, see llms.txt. This page is also available as Markdown.

GET /v2/runs

List Runs

get

List runs in accessible projects newest first.

How to use

Use this for run history or reconciliation. Follow next_cursor with unchanged filters. created_by_id is the exact returned actor ID; personal-key runs use the owner ID. Status filters use lowercase v2 values.

Authentication and permissions

Required permissions: analytics.read. Resource and owner access checks also apply.

Authorizations
AuthorizationstringRequired

Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.

Query parameters
project_idstring · nullableOptional

Only return runs of this project.

statusstring · enum · nullableOptional

Only return runs currently in this status.

Possible values:
run_typestring · enum · nullableOptional

Only return runs started this way. unknown is not filterable because it represents an unpublished value.

Possible values:
created_by_idstring · nullableOptional

Filter by the exact created_by.id returned on a run: a user ID, organization ID, or end-user ID. Personal API-key runs use the owner's user ID.

created_at__gtestring · date-time · nullableOptional

Only return runs created at or after this time.

created_at__ltestring · date-time · nullableOptional

Only return runs created at or before this time.

cursorstring · nullableOptional

Opaque identifier for the page to return, taken from a previous response's next_cursor. Omit it to read the first page.

page_sizeinteger · min: 1 · max: 1000Optional

Number of runs to return in the page.

Default: 50
Responses
200

Successful Response

application/json
response_codestring · nullableOptional

Machine-readable response code, when provided.

next_cursorstring · nullableOptional
prev_cursorstring · nullableOptional
current_cursorstring · nullableOptional
get/v2/runs
curl
curl --fail-with-body -sS \
  "$STACKAI_BASE_URL/v2/runs" \
  -H "Authorization: Bearer $STACKAI_API_KEY"
{
  "response_code": "text",
  "meta": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "data": [
    {
      "run_id": "123e4567-e89b-12d3-a456-426614174000",
      "project_id": "text",
      "project_version": 1,
      "status": "queued",
      "error": "text",
      "created_at": "2026-01-01T00:00:00.000Z",
      "started_at": "2026-01-01T00:00:00.000Z",
      "completed_at": "2026-01-01T00:00:00.000Z",
      "run_type": "workflow_builder",
      "created_by": {
        "type": "user",
        "id": "text"
      },
      "usage": {
        "total_tokens": 1,
        "details": [
          {
            "provider": "text",
            "model_id": "text",
            "connection_id": "123e4567-e89b-12d3-a456-426614174000",
            "input_tokens": 1,
            "output_tokens": 1
          }
        ]
      },
      "parent_run_id": "123e4567-e89b-12d3-a456-426614174000",
      "parent_project_id": "text"
    }
  ],
  "next_cursor": "text",
  "prev_cursor": "text",
  "current_cursor": "text"
}

Last updated

Was this helpful?