Upload and reference files in requests.
Upload a file once and reference it by id in later requests instead of re-sending the bytes each time. Files also holds what your key sends and gets back. Uploads, storage and downloads are free, and a stored file never expires. Full guide: Files.
POST https://opendunes.com/v1/filesAuthenticate every request with your key: Authorization: Bearer $OPENDUNES_API_KEY.
curl https://opendunes.com/v1/files \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-F "file=@photo.png"| Method | Path | Description |
|---|---|---|
| POST | /v1/files | Upload a file (multipart, field file). |
| GET | /v1/files | List your files, oldest first (limit, cursor, after). |
| GET | /v1/files/{id} | Retrieve a file's metadata. |
| DELETE | /v1/files/{id} | Delete a file. |
| GET | /v1/files/{id}/content | Download the raw bytes. |
Reference an uploaded file in chat completions with a { "type": "file", "file": { "file_id": "…" } } content part. Limits and supported types are documented in the Files guide.