Skip to main content
GET
List files

Overview

Lists your files, newest first by default. Filter with purpose=batch for uploads or purpose=batch_output for the output and error files batches produce. after is an integer offset, not an object id: add limit to it for each next page.

Authorizations

Authorization
string
header
required

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

Query Parameters

purpose
enum<string>

Filter to uploads (batch) or generated results (batch_output). Only return files with this purpose.

Available options:
batch,
batch_output
Example:

"batch"

order
enum<string>
default:desc

Oldest first (asc) or newest first (desc). Sort by created_at. Default desc.

Available options:
asc,
desc
Example:

"desc"

limit
integer
default:20

How many files to return in this page. Files per page. Default 20, max 10,000.

Required range: 1 <= x <= 10000
Example:

20

after
integer

Pagination offset into your files. An integer count, not an object id, so page manually rather than with the SDK auto-paginator. Offset cursor: how many files to skip. Add limit to it for each next page.

Required range: x >= 0
Example:

20

Response

The requested page of files.

A page of files.

object
string
required

Object type, always list.

Example:

"list"

data
object[]
required

Files in this page, newest first by default.

Example:
first_id
string
required

Id of the first file in this page. Empty when the page is empty.

Example:

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

last_id
string
required

Id of the last file in this page. Empty when the page is empty.

Example:

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

has_more
boolean
required

Whether another page exists after this one.

Example:

false