skip to content
superbot.gg

List cloud runs

Part of Runs, 7 operations. The overview covers keys, scopes and errors.

GET /v1/runs

This account’s cloud runs from every source, oldest first, paged by run id.

A caller key holding runs:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.

Operation id listRuns in Runs.

Query parameters

  • limit integer optional

    Items per page, 1-100.

  • after_id string optional

    Return the page after this resource id (the previous page’s last_id).

  • before_id string optional

    Return the page before this resource id (the next page’s first_id).

  • status string optional

    Only runs in this status. One of queued, running, done, failed, needs_merge, cancelled.

  • source string optional

    Only runs started by this source. One of app, api, cli, routine, slack, linear, jira, github.

Response 200

A page of runs.

application/json: RunList.

  • object string required

    One of list.

  • data array of Run required
    19 fields
    • id string required
    • object string required

      One of run.

    • status string required

      queued, running, then one of done, failed, needs_merge (the work is on branch and waits for a merge) or cancelled. One of queued, running, done, failed, needs_merge, cancelled.

    • source string required

      What started the run. Runs started here are api. One of app, api, cli, routine, slack, linear, jira, github.

    • project string required

      The project the run works on.

    • prompt string | null required

      The prompt, which is also the run’s title: show this to name the run. Null under zero data retention.

    • mode string required

      One of agent, plan, debug.

    • landing string required

      main lands the work on the default branch; pr opens a pull request. One of main, pr.

    • budget RunBudget required

      What the run may spend: wall time, USD and legs.

      4 fields
      • max_wall_ms integer required
      • max_usd number required
      • max_legs integer required
      • leg_ms integer required
    • usd_spent number | null required
    • served_model string | null

      The model that served the run, as the runner reported it when the run settled (the same served_model the swarm reports). Null until then, and on a run that settled before this field existed.

    • served_lane string | null

      Who served the run’s model calls (the same served_lane the swarm reports). Every cloud run is platform: Superbot’s own model key, charged in credits to the account. Null on a run that predates this field. One of platform, null.

    • branch string | null required

      The branch the work sits on, when it did not land directly.

    • landed_commit string | null required
    • summary string | null required

      The runner’s end-of-run diagnostic once it settles, a machine-readable line for debugging and for telling a failed run from a finished one (for example done — sandbox fence-only, 127 tool call(s), local space sp_…), and it can name internal ids. It is not a title and not the run’s answer: name the run by prompt, and do not show this text to end users. Null under zero data retention.

    • pr_url string | null required
    • url string | null required

      A deep link that opens the run’s project in the Superbot app (superbot://project/<id>), when the project id is linkable.

    • created_at string required
    • updated_at string required
  • has_more boolean required
  • first_id string | null required

    Id of the first item on this page; pass as before_id for the previous page.

  • last_id string | null required

    Id of the last item on this page; pass as after_id for the next page.

Errors

StatusCodeWhat to change
400invalid_request

A parameter or body field is invalid; param names it and issues lists every problem.

401unauthorized

Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.

403insufficient_scope

The key lacks the scope in required_scopes; mint a key that holds it.

429rate_limited

Over the per-key request bucket; retry after x-ratelimit-reset.

view .mdopenapi
Request

curl

curl -sS -X GET "https://superbot.gg/v1/runs" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"

JavaScript

const res = await fetch(`https://superbot.gg/v1/runs`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());

Python

import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response

200 A page of runs.

{
  "object": "list",
  "data": [
    {
      "id": "run_3k9x0q2m1v",
      "object": "run",
      "status": "queued",
      "source": "app",
      "project": "your-project",
      "prompt": "your-prompt",
      "mode": "agent",
      "landing": "main",
      "budget": {
        "max_wall_ms": 0,
        "max_usd": 0,
        "max_legs": 0,
        "leg_ms": 0
      },
      "usd_spent": 0,
      "served_model": "your-served-model",
      "served_lane": "platform",
      "branch": "your-branch",
      "landed_commit": "your-landed-commit",
      "summary": "your-summary",
      "pr_url": "https://example.com",
      "url": "https://example.com",
      "created_at": "your-created-at",
      "updated_at": "your-updated-at"
    }
  ],
  "has_more": true,
  "first_id": "your-first-id",
  "last_id": "your-last-id"
}

400 The request is malformed or a parameter is invalid; `param` names the field.

{
  "error": "invalid_request",
  "message": "A parameter or body field is invalid; param names it and issues lists every problem.",
  "doc_url": "https://superbot.gg/developers#errors-invalid_request",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

401 The bearer is missing, malformed or unknown.

{
  "error": "unauthorized",
  "message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
  "doc_url": "https://superbot.gg/developers#errors-unauthorized",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.

{
  "error": "insufficient_scope",
  "message": "The key lacks the scope in required_scopes; mint a key that holds it.",
  "doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}

429 Over the per-key request bucket; retry after x-ratelimit-reset.

{
  "error": "rate_limited",
  "message": "Over the per-key request bucket; retry after x-ratelimit-reset.",
  "doc_url": "https://superbot.gg/developers#errors-rate_limited",
  "request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}