files management

Upload File

Upload a file for persistent storage.

Returns a file_id that can be used in subsequent API calls to /v3/universal-ai.

Files are stored securely and only accessible by the file owner. Default expiration is 30 days, maximum 30 days.

post/v3/upload

Request

  • Base URL
    https://api.edenai.run
  • Auth
    HTTP bearer

Request body multipart/form-data

filestring binary required

File to upload

expires_in_daysinteger

Expiration in days (1-30)

purposestring

Purpose of the file

Response

Successful Response

file_idstring uuid required

Unique file identifier for use in API calls

file_namestring required

Original filename

file_sizeinteger required

File size in bytes

file_mimetypestring required

Detected MIME type

purposestring required

Purpose of the file (e.g., 'general', 'assistants')

metadataobject

File metadata (e.g., page_count for PDFs/documents)

created_atstring date-time required

Upload timestamp

expires_atstring date-time nullable

Expiration timestamp

Example response

{
  "created_at": "2025-12-08T10:30:00Z",
  "expires_at": "2026-01-07T10:30:00Z",
  "file_id": "550e8400-e29b-41d4-a716-446655440000",
  "file_mimetype": "application/pdf",
  "file_name": "invoice.pdf",
  "file_size": 1048576,
  "metadata": {
    "page_count": 5
  },
  "purpose": "general"
}

Changes

No recorded changes to this operation across all 1 revision of this API.