Upload File
curl --request POST \
--url https://api.example.com/api/files \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {}
}'{
"id": "<string>",
"filename": "<string>",
"path": "<string>",
"user_id": "<string>",
"meta": {
"name": "<string>",
"content_type": "<string>",
"size": 123,
"data": {}
},
"data": {
"status": "<string>",
"content": "<string>",
"error": "<string>"
},
"status": true,
"created_at": 123,
"updated_at": 123
}Files & Media
Upload File
POST
/
api
/
files
Upload File
curl --request POST \
--url https://api.example.com/api/files \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {}
}'{
"id": "<string>",
"filename": "<string>",
"path": "<string>",
"user_id": "<string>",
"meta": {
"name": "<string>",
"content_type": "<string>",
"size": 123,
"data": {}
},
"data": {
"status": "<string>",
"content": "<string>",
"error": "<string>"
},
"status": true,
"created_at": 123,
"updated_at": 123
}Upload a file to Open WebUI. The file can be processed in the background for content extraction and embedding generation.
Request
Headers
Bearer token for authentication
Body
The file to upload. File type must be allowed based on server configuration.
Optional metadata for the file. Can be a JSON object or JSON string.Properties:
channel_id(string): Associate file with a channellanguage(string): Language hint for audio transcription- Additional custom metadata as needed
Whether to process the file for content extraction
Whether to process the file in the background. If
false, processing happens synchronously.Response
Unique identifier for the uploaded file
Original filename
Storage path of the file
ID of the user who uploaded the file
Always
true for successful uploadsUnix timestamp of when the file was created
Unix timestamp of when the file was last updated
Example
curl -X POST https://your-domain.com/api/files \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@document.pdf" \
-F 'metadata={"language":"en"}'
Response
{
"status": true,
"id": "550e8400-e29b-41d4-a716-446655440000",
"filename": "document.pdf",
"path": "550e8400-e29b-41d4-a716-446655440000_document.pdf",
"user_id": "user123",
"meta": {
"name": "document.pdf",
"content_type": "application/pdf",
"size": 153600,
"data": {
"language": "en"
}
},
"data": {
"status": "pending"
},
"created_at": 1709856000,
"updated_at": 1709856000
}
File Processing
Whenprocess=true, the file is automatically processed based on its content type:
- Audio files: Transcribed using configured STT engine
- Documents: Text extracted for embedding and search
- Images/Videos: Processed if external content extraction is enabled
GET /api/files/{id}/process/status.⌘I