Skip to content
Navigation

Get a run

Run object, or SSE with Last-Event-ID replay.

GET
https://{org}.cloudraker.run/_run/{id}
Try it
Path parameters
Header parameters
Live API request

Authorization

  • bearer
    HTTP
    required

Path parameters

  • id
    string
    required

Header parameters

  • Accept
    optional
    application/json
    or
    text/event-stream

    text/event-stream streams the run.

  • Last-Event-ID
    optional
    integer

    Resume the stream after this seq.

Returns

200

The run object, or the event stream from Last-Event-ID.

JSON
  • id
    string
    required
  • agent
    string
    required
  • mode
    zeroshot
    or
    turns
    or
    machine
    required
  • status
    queued
    or
    running
    or
    waiting
    or
    completed
    or
    failed
    or
    cancelled
    +1 more
    required
  • turn
    integer
    required
  • deployment
    object
    required
    • sha
      optional
      string
    • deployed_at
      optional
      string
      format: date-time
  • created_at
    string
    required
    format: date-time
  • updated_at
    string
    required
    format: date-time
  • last_seq
    integer
    required
  • metadata
    map of
    string
    required

    Max 20 keys, string values, 1 KB in total. Echoed on every event and webhook. end_user scopes data store records.

  • stream_url
    string
    required
    format: uri
  • expires_at
    optional
    string | null

    Set while a turns or machine run is waiting.

    format: date-time
  • read_token
    optional
    string

    rrt_ token. Reads this run only. Present on the start answer.

  • result
    optional
    unknown

    The done payload after run.completed.

  • error
    optional
    object | null
    • code
      optional
      string
    • message
      optional
      string
  • usage
    optional
    object
    • input_tokens
      optional
      integer
    • cached_input_tokens
      optional
      integer
    • output_tokens
      optional
      integer
    • reasoning_tokens
      optional
      integer
    • model_steps
      optional
      integer
    • code_calls
      optional
      integer
    • code_cpu_ms
      optional
      integer
    • egress_requests
      optional
      integer
    • egress_bytes
      optional
      integer
    • duration_ms
      optional
      integer
    • credits
      optional
      integer
    • dynamic_worker_ids
      optional
      integer
    • inference
      optional
      cloudraker
      or
      byok
      or
      gateway
    • model_cost_usd
      optional
      number | null

      Raw model cost in USD from the AI Gateway logs of CloudRaker inference. Null until a cost is known. Not credits.

    • model_cost_complete
      optional
      boolean

      False while a step cost is not known yet, or when a step has no reported cost (byok, custom gateway).

  • parent_run_id
    optional
    string

    A child run only: the run that delegated the task.

  • root_run_id
    optional
    string

    A child run only: the first run of the run tree.

  • depth
    optional
    integer

    A child run only: 1 for a child of the root run.

    minimum: 1
  • waiting_for
    optional
    children

    Set while the run waits for the reports of its child runs.

  • tree_credits
    optional
    number

    A run with child runs only: the credits of the run and of all its child runs.

EVENT-STREAM
string

4XX

Error. See the code table in the guides.
JSON
  • error
    object
    required
    • code
      string
      required
    • message
      string
      required
    • run_id
      optional
      string
    • details
      optional
      unknown

Type to search…

↑↓ navigate↵ selectEsc close