curl --request POST \
--url https://api.anam.ai/v1/knowledge/documents/{id}/reprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": "recommended"
}
'{
"documentId": "<string>",
"knowledgeFolderId": "<string>",
"filename": "<string>",
"status": "PROCESSING"
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z"
}{
"error": "Service temporarily unavailable",
"message": "We could not check your API key. Please retry shortly."
}reprocess knowledge document
Reprocess a document with the current chunk settings and the
organization’s current embedding model. Use it after changing a
group’s chunk settings with PUT /v1/knowledge/groups/{id}, or to
retry a FAILED document.
The document’s current content stays searchable until the new version
is READY. Poll GET /v1/knowledge/documents/{id} for the outcome.
A document with its own chunkSize or chunkOverlap keeps them by
default. Send settings: "recommended" to use Anam’s recommended
chunk settings and clear the document’s own, or a chunkSize and
chunkOverlap to save that pair as the document’s own.
A document can be reprocessed 24 hours after it last started
processing, or 1 hour after a failure; reprocessAvailableAt on the
document says when. Each reprocess counts the file’s size (the larger
of its recorded size and its size in storage) against the
organization’s monthly knowledge allowance, which uploads share,
whether it succeeds or fails.
curl --request POST \
--url https://api.anam.ai/v1/knowledge/documents/{id}/reprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": "recommended"
}
'{
"documentId": "<string>",
"knowledgeFolderId": "<string>",
"filename": "<string>",
"status": "PROCESSING"
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z"
}{
"error": "Service temporarily unavailable",
"message": "We could not check your API key. Please retry shortly."
}Authorizations
Body
Optional. An empty body is current. Give either settings, or chunkSize and chunkOverlap together, not both.
current uses each document's own chunkSize and chunkOverlap if it has them, else its group's. recommended uses Anam's recommended chunk settings (350 and 0) whatever the document or group sets, and clears the document's own, so it follows its group again on later reprocesses. On a group it also sets the group's chunk settings to the recommended ones. Every reprocess embeds with the organization's current embedding model.
current, recommended With chunkOverlap, the chunk pair to use instead of settings, in tokens, as on upload. On a document it becomes the document's own chunk settings. On a group it becomes the group's, and its documents drop their own and follow it. JSON documents are kept whole (split only when large) whatever the pair.
100 <= x <= 2000
