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

# Read File

> Read the contents of a file

## Request

<ParamField query="sessionId" type="string" required>
  Session ID containing the file
</ParamField>

<ParamField query="path" type="string" required>
  File path relative to /workspace
</ParamField>

<ParamField header="Authorization" type="string" required>
  Bearer token with your API key
</ParamField>

## Response

Returns the raw file content with appropriate Content-Type header.

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.buntime.sh/files/read?sessionId=ses_abc123&path=hello.ts" \
    -H "Authorization: Bearer $BUNTIME_API_KEY"
  ```

  ```typescript TypeScript theme={null}
  const content = await client.files.read({
    sessionId: 'ses_abc123',
    path: 'hello.ts'
  });

  console.log(content);
  ```
</RequestExample>
