curl --request POST \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"title": "Prices 2026",
"type": "text",
"chunk_tokens": 256
}
'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases"
payload = {
"content": "<string>",
"title": "Prices 2026",
"type": "text",
"chunk_tokens": 256
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', title: 'Prices 2026', type: 'text', chunk_tokens: 256})
};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"chunk_tokens": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"status": "active",
"title": "<string>",
"type": "text",
"updated_at": "2023-11-07T05:31:56Z",
"version": 123,
"crawled_pages": 123,
"error": "<string>",
"filenames": [
"<string>"
],
"max_pages": 123,
"notify_emails": [
"<string>"
],
"schedule": {
"interval": "daily",
"days": [
3
],
"time": "03:00"
},
"url": "<string>",
"url_pattern": "<string>"
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}Create a knowledge base
Create a knowledge base from a text (type: text) or a site (type: url).
The answer is 202 with status: indexing: the platform reads it in the
background. Read it again until status is active. It costs an
embedding of each chunk, and a site also costs a crawl of each page. A
schedule crawls the site again by itself, and each crawl costs. The
plan of the account limits the knowledge bases of a brand.
curl --request POST \
--url https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"title": "Prices 2026",
"type": "text",
"chunk_tokens": 256
}
'import requests
url = "https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases"
payload = {
"content": "<string>",
"title": "Prices 2026",
"type": "text",
"chunk_tokens": 256
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', title: 'Prices 2026', type: 'text', chunk_tokens: 256})
};
fetch('https://app.backend.genezio.ai/customer/v1/brands/{brand_id}/knowledge-bases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"chunk_tokens": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"status": "active",
"title": "<string>",
"type": "text",
"updated_at": "2023-11-07T05:31:56Z",
"version": 123,
"crawled_pages": 123,
"error": "<string>",
"filenames": [
"<string>"
],
"max_pages": 123,
"notify_emails": [
"<string>"
],
"schedule": {
"interval": "daily",
"days": [
3
],
"time": "03:00"
},
"url": "<string>",
"url_pattern": "<string>"
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}{
"error": {
"code": "brand_access_denied",
"message": "This API key has no access to this brand",
"details": [
{
"field": "page_size",
"message": "Input should be less than or equal to 100"
}
],
"request_id": "4f3c2e1a-9b7d-4c1e-8f2a-1d3e5b7c9a0f"
}
}Authorizations
An API key of your account, from Settings > API Keys. It starts with gnz-.
Headers
Any unique string, such as a UUID. Send the same key again to get the first answer and not a second write. The API keeps an answer for 24 hours.
Path Parameters
Body
- TextKnowledgeBaseCreate
- UrlKnowledgeBaseCreate
Response
Successful Response
indexing: the platform reads it now. active: the check of the facts reads it.
active, indexing, error, cancelled text, url, file Each crawl again makes a new version.
The pages of the last crawl.
When the platform crawls the site again, in UTC.
Show child attributes
Show child attributes