curl --request POST \
--url https://api.anam.ai/v1/knowledge/groups/{id}/reprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": "recommended"
}
'{
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z",
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z",
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z",
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"error": "Service temporarily unavailable",
"message": "We could not check your API key. Please retry shortly."
}reprocess knowledge group
Reprocess every document in a knowledge group with the group’s current
chunk settings and the organization’s current embedding model, for
example after changing the settings with PUT /v1/knowledge/groups/{id}.
Documents stay searchable until their new version is READY.
Documents with their own chunkSize or chunkOverlap keep them by
default. Send settings: "recommended", or a chunkSize and
chunkOverlap, to use that pair for every document instead. Once a
document is queued, the pair also becomes the group’s own chunk
settings (see folderSettingsUpdated).
The single-document limits apply to each document: a 24-hour cooldown
(1 hour after a failure), and each queued file’s size counts against
the monthly knowledge allowance. One request starts at most 500
documents. When the allowance can’t cover them all, documents
processed longest ago go first and FAILED documents last. Documents
left out are counted in skipped; call again after nextAvailableAt
to process them.
curl --request POST \
--url https://api.anam.ai/v1/knowledge/groups/{id}/reprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": "recommended"
}
'{
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z",
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z",
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"error": "<string>",
"reason": "in_progress",
"availableAt": "2023-11-07T05:31:56Z",
"knowledgeFolderId": "<string>",
"queuedCount": 123,
"documentIds": [
"<string>"
],
"skipped": {
"inProgress": 123,
"coolingDown": 123,
"overMonthlyLimit": 123,
"contended": 123,
"errored": 123,
"tooLarge": 123,
"deferred": 123
},
"nextAvailableAt": "2023-11-07T05:31:56Z",
"queuedBytes": 123,
"monthlyAllowance": {
"limitBytes": 123,
"remainingBytes": 123,
"resetsAt": "2023-11-07T05:31:56Z"
},
"folderSettingsUpdated": true
}{
"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 <= 2000Response
The group has no documents; nothing was queued.
With settings recommended or a chunkSize and chunkOverlap, whether the group's own chunk settings are now that pair. False if nothing was queued, if they were changed while this request ran (that change is kept), or if the update failed; check GET /v1/knowledge/groups/{id}. Always false for current.

