Upload a Document (file) to a Dataset
Upload a document directly and specify chunk size/overlap, and metadata. Limit to 100MB uploads
The tester above and examples on the right side of this page will not work since this API uses mutlipart form data. See bottom of page for examples.
Path Parameters
Dataset ID
Header
Baseplate API key. Must be in the format βBearer $BASEPLATE_API_KEYβ
Use multipart/form-data
Body
Chunk size to chunk documents. Defaults to 1000 characters. Limited to 2000 for hybrid and 5000 for standard datasets.
Overlap size for chunks. Must be smaller than chunk size.
Attach a file to the request form-data. PDFs and csvs are automatically parsed. For csv files, if you need certain cells to be added as metadata, make sure the metadata columms already exist in the dataset.
For csv files, make sure there is a column named βtextβ, or else no embeddings will be generated. This column is the one you want embedded.
The document ID to create for this file. If none is provided, a uuidv4 ID is generated for you.
JSON stringified metadata to attach to the document. Must be a valid JSON string. Supported metadata value types are: string, number, boolean, and array of strings.
Responses
Examples
Replace BASEPLATE_API_KEY with your own values.