API reference

Files

Upload a file

POST https://antarya.ai/v1/files

Send the file as multipart form data in the field file. Antarya returns the file object, with its id, which you put in a file part of a message. The guide shows the whole path.

Headers

Header Value
Authorization Bearer $ANTARYA_API_KEY
Content-Type multipart/form-data, set by your client
curl https://antarya.ai/v1/files \
  -H "Authorization: Bearer $ANTARYA_API_KEY" \
  -F file=@agreement.pdf
Output
{
  "id": "file_01",
  "filename": "agreement.pdf",
  "size": 48213,
  "created_at": "2026-11-27T09:30:00Z"
}
NameTypeRequiredDescription
filefileYesRequiredThe file to upload.

The file object

NameTypeRequiredDescription
idtextYesRequiredThe id to use in a message part, such as file_01.
filenametextYesRequiredThe name the file was uploaded with.
sizenumberYesRequiredThe size in bytes.
created_attextYesRequiredWhen the file was uploaded, as an ISO 8601 time.

List, fetch and delete

Request Does
GET /v1/files Lists your files, newest first.
GET /v1/files/{id} Returns one file object.
DELETE /v1/files/{id} Deletes the file. Messages that already used it keep their replies.
curl https://antarya.ai/v1/files \
  -H "Authorization: Bearer $ANTARYA_API_KEY"

curl -X DELETE https://antarya.ai/v1/files/file_01 \
  -H "Authorization: Bearer $ANTARYA_API_KEY"
Output
{"id": "file_01", "deleted": true}

The file object is {id, object, filename, media_type, size, created_at}, and id starts with file_. Deleting a file returns {"id": "file_01", "deleted": true}.

A message with a file or an image is refused when the model's files or images capability is false.

Limits

A file can be up to 10 MB and an account can store up to 100 MB during early access. A file or an upload over either limit gets a 413.

Limit Value
File size 10 MB a file
File types txt, md, csv, json, pdf, docx, doc, xlsx
Stored per account 100 MB in total

Next steps