---
title: "Upload a file"
method: POST
path: "/files"
---

# Upload a file

`POST /files`

## Request

- Base URL: `https://scifig.ai/api/v1`
- URL: `https://scifig.ai/api/v1/files`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://scifig.ai/api/auth/oauth2/authorize`, token URL `https://scifig.ai/api/auth/oauth2/token`, scopes: `files:write`)

## Response `201`

Uploaded

- object
  - `file_id` string, uuid, required
  - `purpose` string, required
  - `content_type` string, required
  - `size_bytes` integer, required
  - `expires_at` string, date-time, nullable, required
  - `created_at` string, date-time, required

## Other responses

- `413`: The request body or an uploaded file is over the limit (details.max_bytes).
- `429`: RATE_LIMITED (per-minute window, or a daily limit named in details.reason, e.g. DAILY_CONVERSION_LIMIT) or CONCURRENCY_LIMITED (too many running tasks). Wait Retry-After seconds and retry with the same Idempotency-Key.
- `default`: Error. Branch on error.code; never parse message. 503 responses carry Retry-After.

---

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