Post details of a given document that will enrich the chunk and be added to the context or just for filtering. If Just for filtering, start with ”_” in the key.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Datastore ID of the datastore from which to retrieve the document
Document ID of the document to retrieve details for
Metadata request in JSON format. custom_metadata
is a flat dictionary containing one or more key-value pairs, where each value must be a primitive type (str
, bool
, float
, or int
). The combined size of the metadata must not exceed 2 KB when encoded as JSON.
metadata_config
is an optional dictionary that defines how each metadata field should be used — e.g., whether it's included in chunk reranking (in_chunks
, default=False), included in the API response (returned_in_response
, default=False), or enabled for filtering (filterable
, default=True).
Example Request Body:
{
"custom_metadata": {
"topic": "science",
"difficulty": 3
},
"metadata_config": {
"topic": {
"in_chunks": true,
"returned_in_response": false,
"filterable": true
},
"difficulty": {
"filterable": true
}
}
}
Successful Response
Document description
Post details of a given document that will enrich the chunk and be added to the context or just for filtering. If Just for filtering, start with ”_” in the key.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Datastore ID of the datastore from which to retrieve the document
Document ID of the document to retrieve details for
Metadata request in JSON format. custom_metadata
is a flat dictionary containing one or more key-value pairs, where each value must be a primitive type (str
, bool
, float
, or int
). The combined size of the metadata must not exceed 2 KB when encoded as JSON.
metadata_config
is an optional dictionary that defines how each metadata field should be used — e.g., whether it's included in chunk reranking (in_chunks
, default=False), included in the API response (returned_in_response
, default=False), or enabled for filtering (filterable
, default=True).
Example Request Body:
{
"custom_metadata": {
"topic": "science",
"difficulty": 3
},
"metadata_config": {
"topic": {
"in_chunks": true,
"returned_in_response": false,
"filterable": true
},
"difficulty": {
"filterable": true
}
}
}
Successful Response
Document description