---
title: "Read a run's output"
method: GET
path: "/v1/code/runs/{id}/output"
tags: ["code"]
---

# Read a run's output

`GET /v1/code/runs/{id}/output`

## Request

- Base URL: `https://api.pomerado.ai`
- URL: `https://api.pomerado.ai/v1/code/runs/{id}/output`
- Auth: HTTP bearer

Read what a run from the Code editor printed, while it runs and after it ends.

- Business accounts only, with jobs:read. You read the runs whose job you can read with GET /v1/jobs/{id}, and any other run is not found.
- Each chunk is the run's stdout (out) or stderr (err). A cut chunk, with no text, means the run printed more than the 4 MiB kept.
- Send the last seq you read as after. more is true when more was printed already, so read again at once.
- Output is kept until 60 minutes after the run ends.

## Path parameters

- `id` string, required

## Query parameters

- `after` string

## Response `200`

What the run printed

- CodeRunOutput
  - `chunks` object[], required
    - `seq` integer, required: The chunk's position; send it as after to read what follows
    - `stream` 'out' | 'err' | 'cut', required: out: the run's stdout. err: its stderr. cut: the run printed more than the 4 MiB kept
    - `at` string, required: a string to be decoded into a Date
    - `text` string, required: What the run printed; empty for cut
  - `more` boolean, required: Whether more was printed already: read again at once

## Other responses

- `400`: invalid_request
- `401`: unauthorized, reauthentication_required
- `403`: business_account_required, forbidden
- `404`: not_found
- `429`: run_view_throttled
- `500`: internal_error
- `503`: temporarily_unavailable

---

[API](https://skmtc.dev/pomerado/apis/pomerado-api.md) · [All operations](https://skmtc.dev/pomerado/apis/pomerado-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pomerado/apis/pomerado-api/revisions/48dac2a3143e?raw)
