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

# Files

> Use OpenAI-compatible files routes through the Planck AI Gateway.

Planck exposes OpenAI-compatible files routes for provider file management.

| Operation             | Route                             |
| --------------------- | --------------------------------- |
| List files            | `GET /v1/files`                   |
| Upload file           | `POST /v1/files`                  |
| Retrieve file         | `GET /v1/files/{file_id}`         |
| Delete file           | `DELETE /v1/files/{file_id}`      |
| Retrieve file content | `GET /v1/files/{file_id}/content` |

## List Files

```bash theme={null}
curl https://api.inquantum.ai/v1/files \
  -H "Authorization: Bearer $PLANCK_API_KEY"
```

## Upload File

```bash theme={null}
curl https://api.inquantum.ai/v1/files \
  -H "Authorization: Bearer $PLANCK_API_KEY" \
  -F purpose="assistants" \
  -F file="@input.jsonl"
```

## BYOK

Files are provider management operations rather than token-usage operations. They follow the same credential selection as other gateway routes: stored BYOK first by default, then PTB when available. Use `Planck-Billing-Mode` to force `byok` or `ptb`.

`X-Provider-Key` and `Planck-Provider-Key` are still supported as explicit per-request BYOK overrides.
