Documents
Create a Document
POST
/
api
/
datasets
/
{id}
/
documents
Authorization
Header
Path
Body
curl --request POST \
--url https://app.baseplate.ai/api/datasets/{id}/documents \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"id": "<string>",
"filename": "<string>",
"url": "<string>",
"content": "<string>",
"parse_url": true,
"chunk_size": 123,
"chunk_overlap": 123,
"metadata": {}
}'
Path Parameters
id
string
requiredDataset ID
Header
Authorization
string
Baseplate API key. Must be in the format βBearer $BASEPLATE_API_KEYβ
Body
id
string
requiredThe document ID to create. Must be unique within a dataset.
filename
string
The name of the file
url
string
The url of the file
content
string
Content of a document to add.
parse_url
boolean
If true, will GET the url and parse the response as a document.
chunk_size
number
default: "1000"Sets the chunk size if parse_url or content is set.
chunk_overlap
number
default: "100"Sets the chunk overlap if parse_url or content is set.
metadata
object
Metadata to add to every row in the document. Optional.
curl --request POST \
--url https://app.baseplate.ai/api/datasets/{id}/documents \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"id": "<string>",
"filename": "<string>",
"url": "<string>",
"content": "<string>",
"parse_url": true,
"chunk_size": 123,
"chunk_overlap": 123,
"metadata": {}
}'