Skip to main content
POST
Upload a file to create a knowledge base that can be used to provide contextual information to your AI agents. Supported file formats include PDF, Word documents, text files, and more.

Headers

string
required
Your API key for authentication.
string
required
Must be multipart/form-data for file uploads.

Body Parameters (multipart/form-data)

string
default:"file"
required
Must be "file" for file uploads.
string
KB name (defaults to filename if not provided).
string
Optional description of the knowledge base content.
file
required
The file to upload and process into a knowledge base.

Response

object
The created knowledge base object.
string
Unique identifier for the knowledge base.
string
Name of the knowledge base.
string
Description of the knowledge base (if provided).
string
Current status: "PROCESSING", "COMPLETED", "FAILED", or "DELETED".
string
Will be "FILE" for file-based knowledge bases.
string
ISO timestamp of creation.
string
ISO timestamp of last update.
string
Error message if status is "FAILED".
object
File information for the uploaded file.
string
Original filename.
number
File size in bytes.
string
MIME type of the file.
null
Will be null on successful creation.

Docs for agents: llms.txt