# Read output chunks Read bounded output pages with exact base64 data and a text preview. `GET /v1/tool-runs/{run_id}/outputs/{name}/chunks` ## Read part of a large output Request an offset and length. Decode content\_base64 for exact bytes, then continue at next\_offset until it is null. ## What to do next text\_preview is convenient for display; it is not a byte-for-byte substitute. [Read the step-by-step guide →](https://www.security.run/docs/visibility.html) ### Parameters #### `run_id` · `path · string` · required #### `name` · `path · string` · required #### `offset` · `query · integer` #### `length` · `query · integer` #### `authorization` · `header · string | null` · required ### Responses - `200` Successful Response - `422` Validation Error ## Request ```bash curl -X GET "$SECURITY_RUN_URL/v1/tool-runs/toolrun_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/outputs/native-stdout.bin/chunks?offset=0&length=16384" \ -H "Authorization: Bearer $SECURITY_RUN_API_KEY" ``` ## Request ```python import os, httpx headers = {} headers["Authorization"] = "Bearer " + os.environ["SECURITY_RUN_API_KEY"] response = httpx.request('GET', os.environ["SECURITY_RUN_URL"].rstrip("/") + '/v1/tool-runs/toolrun_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/outputs/native-stdout.bin/chunks?offset=0&length=16384', headers=headers) response.raise_for_status() print(response.text) ``` ## Request ```javascript const base = process.env.SECURITY_RUN_URL.replace(/\/$/, ""); const headers = {}; headers.Authorization = `Bearer ${process.env.SECURITY_RUN_API_KEY}`; const response = await fetch(base + "/v1/tool-runs/toolrun_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/outputs/native-stdout.bin/chunks?offset=0&length=16384", { method: "GET", headers }); if (!response.ok) throw new Error(`HTTP ${response.status}`); console.log(await response.text()); ```