Create a namespace
curl --request POST \
--url https://api.conare.ai/namespaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "docs"
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'docs'})
};
fetch('https://api.conare.ai/namespaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.conare.ai/namespaces"
payload = { "name": "docs" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"name": "docs",
"embedding_model": "conare-embed-1",
"rerank_model": "conare-rerank-1"
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}Namespaces
Create a namespace
Creates a namespace embedded by a model other than the default; any write creates one with the default.
- Idempotent; a namespace’s model never changes, so creating it again with another model is 409.
POST
https://api.conare.ai
/
namespaces
Create a namespace
curl --request POST \
--url https://api.conare.ai/namespaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "docs"
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'docs'})
};
fetch('https://api.conare.ai/namespaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.conare.ai/namespaces"
payload = { "name": "docs" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"name": "docs",
"embedding_model": "conare-embed-1",
"rerank_model": "conare-rerank-1"
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}Autorisierungen
A key from conare.ai/dashboard/keys with full access, some namespaces, or models only (/embed, /rerank, /v1, /v2/rerank, /parse).
Header
One key (a UUID) per logical write, sent again on each retry: a repeat within 24 hours replays the first successful answer.
Required string length:
1 - 255Pattern:
^[\x21-\x7e]+$Body
application/json
Antwort
The namespace exists with this model.
War diese Seite hilfreich?