Skip to main content
POST
Create knowledge base
Creates a knowledge base. Send JSON to create it empty, or a multipart form to create it with its first files in the same call.

Create it empty (JSON)

string
required
Its name, 1 to 255 characters. Surrounding spaces are trimmed.
Then upload files or add text to it.

Create it with files (multipart)

string
required
Its name, 1 to 255 characters.
file
required
A file to upload. Repeat the field for each file: up to 25 files, together up to 25 MB. Uploading files lists the types.
The request is all or nothing: if a file is refused, the knowledge base is not created either, and the error names the file.

Response

201 Created with the knowledge base object. Created with files, it also carries files: each file object, in the order you sent them, processing.
Read the knowledge base until processing_count is 0, then attach it to an assistant.

Errors

And the errors every route can give.