Skip to main content
GET
Retrieve a file

Overview

Returns a file’s size, purpose, and expires_at. Use the content endpoint to download the bytes.

Authorizations

Authorization
string
header
required

Morph API key, passed as Authorization: Bearer sk-.... Create keys at https://www.morphllm.com/dashboard/api-keys.

Path Parameters

file_id
string
required

Identifies the file to read. The file_ prefixed id of the file whose metadata you want.

Example:

"file_9c2c1c3e-5b6a-4f0e-8d0f-2a1b3c4d5e6f"

Response

File metadata.

A file you uploaded, or one a batch wrote for you.

id
string
required

File identifier, file_ prefixed. Pass it as input_file_id when creating a batch.

Example:

"file_9c2c1c3e-5b6a-4f0e-8d0f-2a1b3c4d5e6f"

object
string
required

Object type, always file.

Example:

"file"

bytes
integer
required

Size of the file in bytes.

Example:

48211

created_at
integer
required

Unix timestamp (seconds) for when the file was uploaded.

Example:

1780000000

expires_at
integer | null
required

Unix timestamp (seconds) for when the file and its content are deleted. Defaults to 30 days after upload (24 hours on zero-data-retention accounts).

Example:

1782592000

filename
string
required

The filename you uploaded, or the generated name for batch output and error files.

Example:

"requests.jsonl"

purpose
enum<string>
required

batch for files you upload; batch_output for the output and error files a batch produces.

Available options:
batch,
batch_output
Example:

"batch"

status
enum<string>
required

Deprecated OpenAI field, kept for SDK compatibility. Always uploaded.

Available options:
uploaded,
processed,
error
Example:

"uploaded"