POST
/
api
/
datasets
/
{id}
/
documents
curl --request POST \
  --url https://app.baseplate.ai/api/datasets/{id}/documents \
  --header 'Authorization: Bearer <token>' \
  --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
required

Dataset ID

Authorization
string

Baseplate API key. Must be in the format “Bearer $BASEPLATE_API_KEY”

Body

id
string
required

The 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.