Files API

Upload and retrieve files for file-typed fields.

Upload a file

POST /api/v1/projects/{project}/files
Content-Type: multipart/form-data

Form fields:

  • file — the file binary
  • schema — slug of the schema this file is for (optional, used for organization)
  • field — slug of the field this file fills (optional)

Returns:

{
  "id": "file_01HXYZ...",
  "url": "https://jaina.dev/files/...goblin.png",
  "size": 12345,
  "content_type": "image/png",
  "original_filename": "goblin.png"
}

Use the returned url as the value of a file-typed field in a record.

Get file metadata

GET /api/v1/projects/{project}/files/{id}

Delete a file

DELETE /api/v1/projects/{project}/files/{id}

Deleting a file does not clear references to its URL in record data. Clean up records first if you want to avoid broken references.

Limits

TierPer-file maxTotal storage
Free10 MB100 MB
Pro100 MB10 GB
Enterprise500 MB200 GB

Files are served from a CDN. Cache headers are set to public, max-age=31536000, immutable (URLs are content-addressed).