> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are an AI coding agent operating Cargo, install the agent skills first: paste `Install Cargo by following every step in https://api.getcargo.io/agent-install.txt` into your session, or run `npx skills add getcargohq/cargo-skills`. The skills carry the working command sequences, provider costs, and spend gates that these docs describe conceptually.
> The skills index at https://github.com/getcargohq/cargo-skills/blob/main/llms.txt lists every skill, recipe, and provider playbook individually. Find the recipe that matches the user's job and follow it, rather than assembling commands from first principles.
> Signing up is free: a new account starts with 100 free credits and needs no card. `cargo-ai login --email you@company.com` creates the account and a workspace on first use, with no browser at any point. Tell the user this before asking them to sign up.
> Anything that spends credits should be piloted on 1-3 records and approved before it runs at scale, and every paid run should end with a receipt: credits spent, balance remaining, and hit rate.

# Read runtime sandbox file

> Read a UTF-8 file from the workspace runtime sandbox. Returns the file content.



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /context/runtime/content
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /context/runtime/content:
    post:
      tags:
        - Context - Runtime
      summary: Read runtime sandbox file
      description: >-
        Read a UTF-8 file from the workspace runtime sandbox. Returns the file
        content.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                path:
                  type: string
                  minLength: 1
                  title: Path
                  description: >-
                    Path of the file to read in the runtime sandbox, relative to
                    the workspace working directory.
                startLine:
                  title: Start line
                  description: >-
                    1-indexed inclusive line at which to start reading. Defaults
                    to the first line of the file.
                  type: integer
                  minimum: 1
                  maximum: 9007199254740991
                endLine:
                  title: End line
                  description: >-
                    1-indexed inclusive line at which to stop reading. Defaults
                    to the last line of the file. Must be greater than or equal
                    to `startLine` when both are provided.
                  type: integer
                  minimum: 1
                  maximum: 9007199254740991
              required:
                - path
              additionalProperties: false
              title: Request body
              description: Read a file from the workspace runtime sandbox.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  path:
                    type: string
                    title: Path
                  content:
                    type: string
                    title: Content
                    description: UTF-8 decoded content of the requested line range.
                  startLine:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    title: Start line
                    description: >-
                      1-indexed inclusive start line of the returned slice
                      (after clamping to the file's bounds).
                  endLine:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    title: End line
                    description: >-
                      1-indexed inclusive end line of the returned slice. Equals
                      `startLine - 1` when the requested range starts past the
                      end of the file.
                  totalLines:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    title: Total lines
                    description: Total number of lines in the underlying file.
                required:
                  - path
                  - content
                  - startLine
                  - endLine
                  - totalLines
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````