Create source
curl --request POST \
--url https://sync.trychroma.com/api/v1/sources \
--header 'Content-Type: application/json' \
--header 'x-chroma-token: <api-key>' \
--data '
{
"github": {
"repository": "<string>",
"app_id": "<string>",
"include_globs": [
"<string>"
]
},
"database_name": "<string>",
"chunking": {
"type": "tree_sitter",
"max_size_bytes": 1
},
"embedding": {
"sparse": {
"key": "<string>"
}
},
"embedding_model": {
"model": "Qwen/Qwen3-Embedding-0.6B",
"task": {
"task_name": "<string>",
"document_prompt": "<string>",
"query_prompt": "<string>"
}
}
}
'import requests
url = "https://sync.trychroma.com/api/v1/sources"
payload = {
"github": {
"repository": "<string>",
"app_id": "<string>",
"include_globs": ["<string>"]
},
"database_name": "<string>",
"chunking": {
"type": "tree_sitter",
"max_size_bytes": 1
},
"embedding": { "sparse": { "key": "<string>" } },
"embedding_model": {
"model": "Qwen/Qwen3-Embedding-0.6B",
"task": {
"task_name": "<string>",
"document_prompt": "<string>",
"query_prompt": "<string>"
}
}
}
headers = {
"x-chroma-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-chroma-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
github: {repository: '<string>', app_id: '<string>', include_globs: ['<string>']},
database_name: '<string>',
chunking: {type: 'tree_sitter', max_size_bytes: 1},
embedding: {sparse: {key: '<string>'}},
embedding_model: {
model: 'Qwen/Qwen3-Embedding-0.6B',
task: {task_name: '<string>', document_prompt: '<string>', query_prompt: '<string>'}
}
})
};
fetch('https://sync.trychroma.com/api/v1/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));false{
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Source
Create source
Creates a new sync source.
POST
/
api
/
v1
/
sources
Create source
curl --request POST \
--url https://sync.trychroma.com/api/v1/sources \
--header 'Content-Type: application/json' \
--header 'x-chroma-token: <api-key>' \
--data '
{
"github": {
"repository": "<string>",
"app_id": "<string>",
"include_globs": [
"<string>"
]
},
"database_name": "<string>",
"chunking": {
"type": "tree_sitter",
"max_size_bytes": 1
},
"embedding": {
"sparse": {
"key": "<string>"
}
},
"embedding_model": {
"model": "Qwen/Qwen3-Embedding-0.6B",
"task": {
"task_name": "<string>",
"document_prompt": "<string>",
"query_prompt": "<string>"
}
}
}
'import requests
url = "https://sync.trychroma.com/api/v1/sources"
payload = {
"github": {
"repository": "<string>",
"app_id": "<string>",
"include_globs": ["<string>"]
},
"database_name": "<string>",
"chunking": {
"type": "tree_sitter",
"max_size_bytes": 1
},
"embedding": { "sparse": { "key": "<string>" } },
"embedding_model": {
"model": "Qwen/Qwen3-Embedding-0.6B",
"task": {
"task_name": "<string>",
"document_prompt": "<string>",
"query_prompt": "<string>"
}
}
}
headers = {
"x-chroma-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-chroma-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
github: {repository: '<string>', app_id: '<string>', include_globs: ['<string>']},
database_name: '<string>',
chunking: {type: 'tree_sitter', max_size_bytes: 1},
embedding: {sparse: {key: '<string>'}},
embedding_model: {
model: 'Qwen/Qwen3-Embedding-0.6B',
task: {task_name: '<string>', document_prompt: '<string>', query_prompt: '<string>'}
}
})
};
fetch('https://sync.trychroma.com/api/v1/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));false{
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Body
application/json
Response
Source creation successful
Source ID
Was this page helpful?
⌘I