> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metaphi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Files

> Upload input files and download output files. API version 2026-11-25.

A `file` is an input you uploaded (`purpose: input`) or the output of a request that succeeded (`purpose: output`).

## The file object

| Field | Type | Description |
| - | - | - |
| `id` | string | Unique identifier, prefixed `file_` |
| `object` | string | `file` |
| `purpose` | enum | `input` or `output` |
| `filename` | string or null | Its name. `null` once forgotten |
| `bytes` | integer | Size |
| `sha256` | string or null | An output's SHA-256, in hex. `null` for an input |
| `created_at` | integer | Creation time, in Unix seconds |
| `expires_at` | integer or null | Time an output can no longer be downloaded: 30 days after its request succeeded. `null` for an input |
| `downloaded_at` | integer or null | Time an output was first downloaded whole in one request. A range request does not count |
| `livemode` | boolean | `false` in test mode |

## Upload a file

`POST /v1/kennet/files`

Send `multipart/form-data` with the trace as `file`: JSON, JSON Lines or UTF-8 text. **Returns** an input `file`.

## Retrieve a file

`GET /v1/kennet/files/{file_id}`

## List files

`GET /v1/kennet/files`

Inputs, and outputs still within 30 days, newest first. `limit` 1 to 100; `starting_after` a file id; `purpose` `input` or `output`.

## Download a file's content

`GET /v1/kennet/files/{file_id}/content`

An output's content, for 30 days after its request succeeded; then `410 resource_expired`. A single `Range` resumes a download; check the whole file against `sha256`.

## Delete a file

`DELETE /v1/kennet/files/{file_id}`

Deletes an input no batch has taken. `409 resource_state` once a batch has taken it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.