> ## 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

<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>

Retrieves metadata for a specific file, including its size, status, and expiration date.

## Path Parameters

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

## Response

<ResponseField name="id" type="string">
  A unique identifier for the file.
</ResponseField>

<ResponseField name="object" type="string">
  The object type, which is always `file`.
</ResponseField>

<ResponseField name="filename" type="string">
  The name of the uploaded file.
</ResponseField>

<ResponseField name="purpose" type="string">
  The intended purpose of the file.
</ResponseField>

<ResponseField name="bytes" type="integer">
  The size of the file in bytes.
</ResponseField>

<ResponseField name="created_at" type="integer">
  The Unix timestamp (in seconds) of when the file was created.
</ResponseField>

<ResponseField name="expires_at" type="integer">
  The Unix timestamp (in seconds) of when the file will be automatically deleted.
</ResponseField>

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

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

  file = client.files.retrieve("file_123")

  print(file)
  ```

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

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

  async function main() {
    const file = await client.files.retrieve("file_123");

    console.log(file);
  }

  main();
  ```

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

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "file_123",
    "object": "file",
    "bytes": 1048576,
    "filename": "batch-requests.jsonl",
    "created_at": 1726315200,
    "expires_at": 1726920000,
    "purpose": "batch"
  }
  ```
</ResponseExample>
