API reference

API reference · API

Download a file's contents

GET/v1/files/{id}/contentAPI key

An input file as uploaded, or a batch's output or error file as JSONL: one {id, custom_id, response: {status_code, request_id, body}, error} per line. A request that never ran carries a null response and an error code of batch_expired or batch_cancelled.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredstringThe file id.

Answer 200

The file's bytes.

The answer's fields are not named in the document.

Errors

  • 404OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter