Retrieve file

GET /files/{file_id}

Returns information about a specific file.

Path parameters

  • file_id string Required

    The ID of the file to use for this request.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string Required

      The file identifier, which can be referenced in the API endpoints.

    • bytes integer Required

      The size of the file, in bytes.

    • created_at integer Required

      The Unix timestamp (in seconds) for when the file was created.

    • filename string Required

      The name of the file.

    • object string Required

      The object type, which is always file.

      Value is file.

    • purpose string Required

      The intended purpose of the file. Supported values are assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results and vision.

      Values are assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results, or vision.

    • status string Required Deprecated

      Deprecated. The current status of the file, which can be either uploaded, processed, or error.

      Values are uploaded, processed, or error.

    • status_details string Deprecated

      Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job.

GET /files/{file_id}
curl \
 -X GET https://api.openai.com/v1/files/{file_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "id": "string",
  "bytes": 42,
  "created_at": 42,
  "filename": "string",
  "object": "file",
  "purpose": "assistants",
  "status": "uploaded",
  "status_details": "string"
}