Files
Retry failed files
Process failed files again from the bytes Verbeo already holds: one file, or up to 25 of a knowledge base.
POST
/
knowledge-base
/
{id}
/
files
/
retry
Retry failed files
curl --request POST \
--url https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_ids": [
"<string>"
]
}
'import requests
url = "https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry"
payload = { "file_ids": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_ids: ['<string>']})
};
fetch('https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry"
payload := strings.NewReader("{\n \"file_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyProcesses failed files again, from the bytes Verbeo already holds: for a temporary failure such as
EMBEDDING_FAILED, or after you have made room under a plan limit. A file that has not failed is answered as it is. Retrying counts its passages toward the month again.
A file whose error is in the file itself (ENCRYPTED, NO_TEXT, CORRUPT…) fails the same way again: fix it and upload it instead.
Several files
Each file is retried on its own: a refused one is listed inrefused with its reason, and the others still run.
curl -X POST "https://api.verbeo.ai/v1/knowledge-base/5df09066-0842-4c92-8ef0-6cf2ff6d7455/files/retry" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "file_ids": ["c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0", "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d"] }'
200 OK: the files that run again, as they now are, and each one refused.
{
"success": true,
"data": {
"files": [
{ "id": "c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0", "status": "processing", "…": "every field of the file object" }
],
"refused": [
{
"id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
"message": "This knowledge base already has 100 files, the most your plan allows. Delete a file first.",
"code": "KB_FILE_LIMIT"
}
]
}
}
One file
POST /knowledge-base/files/{fileId}/retry, with no body, retries one file and answers its file object with 200 OK. A refusal is the error itself.
curl -X POST "https://api.verbeo.ai/v1/knowledge-base/files/c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0/retry" \
-H "Authorization: Bearer YOUR_API_KEY"
Errors
| Code | Status | When |
|---|---|---|
VALIDATION_FAILED | 422 | file_ids: must name at least one file, file_ids: must name at most 25 files, file_ids: must name each file once. |
NOT_FOUND | 404 | No such knowledge base, or an id that is not one of its files: nothing is retried. |
KB_FILE_LIMIT, KB_DUPLICATE_FILE, KB_UPLOAD_AGAIN | 409 | One file: why it cannot run again. |
CONFLICT | 409 | This file is no longer stored. Upload it again. |
Was this page helpful?
⌘I
Retry failed files
curl --request POST \
--url https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_ids": [
"<string>"
]
}
'import requests
url = "https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry"
payload = { "file_ids": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_ids: ['<string>']})
};
fetch('https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry"
payload := strings.NewReader("{\n \"file_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbeo.ai/v1/knowledge-base/{id}/files/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body