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

# Retrieve file content

<Callout icon="lock" color="#b2b1b1ff" iconType="regular">
  This feature is in [Private Preview](/support/preview-releases). For access or more information, [contact us](https://www.cerebras.ai/contact) or reach out to your account representative.
</Callout>

Downloads the raw content of a file. Use this endpoint to retrieve the actual file data rather than just metadata.

## Path Parameters

<ParamField path="file_id" type="string" required="true">
  The ID of the file whose content to retrieve.
</ParamField>

## Response

Returns the raw file contents. The `Content-Type` header indicates the file type:

* JSONL files: `application/x-ndjson`

<RequestExample>
  ```python Python theme={null}
  from cerebras.cloud.sdk import Cerebras
  import os

  client = Cerebras(
      api_key=os.environ.get("CEREBRAS_API_KEY"),
  )

  content = client.files.retrieve_content("file_123")

  # Save to file
  with open("downloaded-file.jsonl", "wb") as f:
      f.write(content)

  print("File downloaded successfully")
  ```

  ```javascript Node.js theme={null}
  import Cerebras from '@cerebras/cerebras_cloud_sdk';
  import * as fs from 'fs';

  const client = new Cerebras({
    apiKey: process.env['CEREBRAS_API_KEY'],
  });

  async function main() {
    const content = await client.files.retrieveContent("file_123");

    // Save to file
    fs.writeFileSync("downloaded-file.jsonl", content);

    console.log("File downloaded successfully");
  }

  main();
  ```

  ```bash cURL theme={null}
  curl --location 'https://api.cerebras.ai/v1/files/file_123/content' \
  --header "Authorization: Bearer ${CEREBRAS_API_KEY}" \
  --output downloaded-file.jsonl
  ```
</RequestExample>

<ResponseExample>
  ```text Response theme={null}
  Returns raw file content with appropriate Content-Type header.
  For JSONL files, returns newline-delimited JSON.
  ```
</ResponseExample>
