Create Knowledge Brain Corpus
curl --request POST \
--url https://api.zerodrive.dev/v1/brain/corpora \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "marketing-copy",
"template_id": "<string>",
"name": "Marketing Copy",
"description": "<string>",
"include_paths": [
"<string>"
],
"exclude_paths": [
"<string>"
],
"buckets": [
"<string>"
],
"extensions": [
"<string>"
],
"instructions": "<string>",
"web_fallback": "auto",
"local_ocr": true,
"local_transcribe": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'marketing-copy',
template_id: '<string>',
name: 'Marketing Copy',
description: '<string>',
include_paths: ['<string>'],
exclude_paths: ['<string>'],
buckets: ['<string>'],
extensions: ['<string>'],
instructions: '<string>',
web_fallback: 'auto',
local_ocr: true,
local_transcribe: true
})
};
fetch('https://api.zerodrive.dev/v1/brain/corpora', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/brain/corpora"
payload = {
"id": "marketing-copy",
"template_id": "<string>",
"name": "Marketing Copy",
"description": "<string>",
"include_paths": ["<string>"],
"exclude_paths": ["<string>"],
"buckets": ["<string>"],
"extensions": ["<string>"],
"instructions": "<string>",
"web_fallback": "auto",
"local_ocr": True,
"local_transcribe": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Create Knowledge Brain Corpus
Create a custom scoped Knowledge Brain corpus (max 50 per account) or instantiate one from a starter template.
POST
https://api.zerodrive.dev
/
v1
/
brain
/
corpora
Create Knowledge Brain Corpus
curl --request POST \
--url https://api.zerodrive.dev/v1/brain/corpora \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "marketing-copy",
"template_id": "<string>",
"name": "Marketing Copy",
"description": "<string>",
"include_paths": [
"<string>"
],
"exclude_paths": [
"<string>"
],
"buckets": [
"<string>"
],
"extensions": [
"<string>"
],
"instructions": "<string>",
"web_fallback": "auto",
"local_ocr": true,
"local_transcribe": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'marketing-copy',
template_id: '<string>',
name: 'Marketing Copy',
description: '<string>',
include_paths: ['<string>'],
exclude_paths: ['<string>'],
buckets: ['<string>'],
extensions: ['<string>'],
instructions: '<string>',
web_fallback: 'auto',
local_ocr: true,
local_transcribe: true
})
};
fetch('https://api.zerodrive.dev/v1/brain/corpora', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/brain/corpora"
payload = {
"id": "marketing-copy",
"template_id": "<string>",
"name": "Marketing Copy",
"description": "<string>",
"include_paths": ["<string>"],
"exclude_paths": ["<string>"],
"buckets": ["<string>"],
"extensions": ["<string>"],
"instructions": "<string>",
"web_fallback": "auto",
"local_ocr": True,
"local_transcribe": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Body
application/json
Response
Corpus created

