curl --request PUT \
--url https://api.contextual.ai/v1/datastores/{datastore_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"configuration": {}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}curl --request PUT \
--url https://api.contextual.ai/v1/datastores/{datastore_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"configuration": {}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of the datastore to edit
Input model for editing a datastore.
Name of the datastore
Configuration of the datastore. If not provided, current configuration is retained.
Show child attributes
Configuration for document parsing
Show child attributes
Prompt to use for generating image captions. Must be non-empty if figure_caption_mode is custom. Otherwise, must be null.
Mode for figure captioning. Options are default, custom, or ignore. Set to ignore to disable figure captioning. Set to default to use the default figure prompt, which generates a detailed caption for each figure. Set to custom to use a custom prompt.
default, custom, ignore Whether to enable table splitting, which splits large tables into smaller tables with at most max_split_table_cells cells each. In each split table, the table headers are reproduced as the first row(s). This is useful for preserving context when tables are too large to fit into one chunk.
Maximum number of cells for split tables. Ignored if enable_split_tables is False.
Configuration for document chunking
Show child attributes
Chunking mode to use. Options are: hierarchy_depth, hierarchy_heading, static_length, page_level. hierarchy_depth groups chunks of the same hierarchy level or below, additionally merging or splitting based on length constraints. hierarchy_heading splits chunks at every heading in the document hierarchy, additionally merging or splitting based on length constraints. static_length creates chunks of a fixed length. page_level creates chunks that cannot run over page boundaries.
hierarchy_depth, hierarchy_heading, static_length, page_level Target maximum length of text tokens chunks for chunking. Chunk length may exceed this value in some edge cases.
512 <= x <= 4096Target minimum length of chunks in tokens. Must be at least 384 tokens less than max_chunk_length_tokens. Chunk length may be shorter than this value in some edge cases. Ignored if chunking_mode is page_level.
128 <= x <= 3712Whether to enable section-based contextualization for chunking
Configuration for HTML Extraction
Show child attributes
Target maximum length of text tokens chunks for chunking. Chunk length may exceed this value in some edge cases.
512 <= x <= 4096Successful Response
ID of the datastore
Was this page helpful?