---
title: "List files"
method: GET
path: "/v1/files"
tags: ["Files"]
---

# List files

`GET /v1/files`

## Request

- Base URL: `https://api.dexto.ai`
- URL: `https://api.dexto.ai/v1/files`
- Auth: HTTP bearer

List the API key's Cloud project's files in path order, optionally under a prefix and with a path containing a string.

## Query parameters

- `prefix` string
- `contains` string
- `after` string
- `limit` integer

## Response `200`

Successful response.

- object
  - `data` object[], required
    - `content_type` string, required
    - `created_at` string, date-time, required
    - `created_by` object, required: The key, agent or person that wrote the file first; a key or agent is null once deleted.
      - `agent_id` string, uuid, nullable, required
      - `api_key_id` string, uuid, nullable, required
      - `user_id` string, nullable, required: The person who wrote it, by their key or an OAuth token; null for agents and deployed code.
    - `expires_at` string, date-time, nullable, required
    - `id` string, uuid, required
    - `metadata` object, required
    - `object` 'file', required
    - `path` string, required
    - `sha256` string, required
    - `size_bytes` integer, required
    - `updated_at` string, date-time, required
  - `has_more` boolean, required
  - `next_after` string, nullable, required: An opaque cursor: pass it as `after` to read the next page. Null when there are no more.
  - `next_cursor` string, nullable, required: The same value as `next_after`; use that instead.
  - `object` 'list', required

## Other responses

- `400`: Invalid JSON or request fields.
- `401`: Missing or invalid API key.
- `402`: The account has insufficient credits.
- `403`: The account cannot perform this operation.
- `404`: The requested resource was not found.
- `409`: The request conflicts with existing resource state.
- `429`: The account exceeded this operation's request rate.
- `500`: Unexpected Dexto failure.
- `502`: The upstream model provider failed.
- `503`: A required Dexto service is temporarily unavailable.

---

[API](https://skmtc.dev/dexto/apis/dexto-api.md) - [All operations](https://skmtc.dev/dexto/apis/dexto-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dexto/apis/dexto-api/revisions/47eb880cffa5?raw)
