Retrieve vector store file

GET /vector_stores/{vector_store_id}/files/{file_id}

Retrieves a vector store file.

Path parameters

  • vector_store_id string Required

    The ID of the vector store that the file belongs to.

  • file_id string Required

    The ID of the file being retrieved.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string Required

      The identifier, which can be referenced in API endpoints.

    • object string Required

      The object type, which is always vector_store.file.

      Value is vector_store.file.

    • usage_bytes integer Required

      The total vector store usage in bytes. Note that this may be different from the original file size.

    • created_at integer Required

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

    • vector_store_id string Required

      The ID of the vector store that the File is attached to.

    • status string Required

      The status of the vector store file, which can be either in_progress, completed, cancelled, or failed. The status completed indicates that the vector store file is ready for use.

      Values are in_progress, completed, cancelled, or failed.

    • last_error object | null Required

      The last error associated with this vector store file. Will be null if there are no errors.

      Hide last_error attributes Show last_error attributes object | null
      • code string Required

        One of server_error or rate_limit_exceeded.

        Values are internal_error, file_not_found, parsing_error, or unhandled_mime_type.

      • message string Required

        A human-readable description of the error.

    • chunking_strategy object

      One of:
GET /vector_stores/{vector_store_id}/files/{file_id}
curl \
 -X GET https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "id": "string",
  "object": "vector_store.file",
  "usage_bytes": 42,
  "created_at": 42,
  "vector_store_id": "string",
  "status": "in_progress",
  "last_error": {
    "code": "internal_error",
    "message": "string"
  },
  "chunking_strategy": {
    "type": "static",
    "static": {
      "max_chunk_size_tokens": 42,
      "chunk_overlap_tokens": 42
    }
  }
}