Update a private endpoint
curl --request PATCH \
--url https://nemonist.com/api/v1/private-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"base_url": "<string>",
"formats": [],
"declared_zdr": true,
"upstream_model_id": "<string>",
"key": "<string>"
}
'import requests
url = "https://nemonist.com/api/v1/private-endpoints/{id}"
payload = {
"name": "<string>",
"base_url": "<string>",
"formats": [],
"declared_zdr": True,
"upstream_model_id": "<string>",
"key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
base_url: '<string>',
formats: [],
declared_zdr: true,
upstream_model_id: '<string>',
key: '<string>'
})
};
fetch('https://nemonist.com/api/v1/private-endpoints/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"workspace_id": "<string>",
"slug": "<string>",
"name": "<string>",
"base_url": "<string>",
"formats": [
"chat"
],
"declared_zdr": true,
"upstream_model_id": "<string>",
"models": [
"<string>"
],
"status": "draft",
"created_at": "<string>",
"updated_at": "<string>",
"validation": {
"passed": true,
"validated_at": "<string>",
"checks": [
{
"name": "base_url",
"passed": true,
"reason": "invalid_base_url",
"upstream_status": 123,
"upstream_message": "<string>",
"actual_model": "<string>"
}
]
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters"
}
}{
"error": {
"code": 401,
"message": "Missing Authentication header"
}
}{
"error": {
"code": 403,
"message": "Only management keys can perform this operation"
}
}{
"error": {
"code": 404,
"message": "Resource not found"
}
}{
"error": {
"code": 408,
"message": "Operation timed out. Please try again later."
}
}{
"error": {
"code": 409,
"message": "Resource conflict. Please try again later."
}
}{
"error": {
"code": 422,
"message": "Invalid argument"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 502,
"message": "Provider returned error"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}Private Endpoints
Update a private endpoint
Changes a draft; the answer is the whole endpoint. A non-draft answers 409 not_draft: disable or delete and re-create instead. Management key required.
PATCH
/
private-endpoints
/
{id}
Update a private endpoint
curl --request PATCH \
--url https://nemonist.com/api/v1/private-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"base_url": "<string>",
"formats": [],
"declared_zdr": true,
"upstream_model_id": "<string>",
"key": "<string>"
}
'import requests
url = "https://nemonist.com/api/v1/private-endpoints/{id}"
payload = {
"name": "<string>",
"base_url": "<string>",
"formats": [],
"declared_zdr": True,
"upstream_model_id": "<string>",
"key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
base_url: '<string>',
formats: [],
declared_zdr: true,
upstream_model_id: '<string>',
key: '<string>'
})
};
fetch('https://nemonist.com/api/v1/private-endpoints/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"workspace_id": "<string>",
"slug": "<string>",
"name": "<string>",
"base_url": "<string>",
"formats": [
"chat"
],
"declared_zdr": true,
"upstream_model_id": "<string>",
"models": [
"<string>"
],
"status": "draft",
"created_at": "<string>",
"updated_at": "<string>",
"validation": {
"passed": true,
"validated_at": "<string>",
"checks": [
{
"name": "base_url",
"passed": true,
"reason": "invalid_base_url",
"upstream_status": 123,
"upstream_message": "<string>",
"actual_model": "<string>"
}
]
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters"
}
}{
"error": {
"code": 401,
"message": "Missing Authentication header"
}
}{
"error": {
"code": 403,
"message": "Only management keys can perform this operation"
}
}{
"error": {
"code": 404,
"message": "Resource not found"
}
}{
"error": {
"code": 408,
"message": "Operation timed out. Please try again later."
}
}{
"error": {
"code": 409,
"message": "Resource conflict. Please try again later."
}
}{
"error": {
"code": 422,
"message": "Invalid argument"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 502,
"message": "Provider returned error"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}Authorizations
Headers
Body
application/json
Fields to change on a draft; only those sent change, declared_zdr null clears it, and any change makes the last validation stale. slug, workspace_id and activate are refused with 400. model_permaslug, provider_slug, pricing and declared_region are refused with 400: a custom endpoint serves its own model names and is not billed.
Public HTTPS base URL of the OpenAI-compatible server, such as https://host/v1. Private and loopback addresses are refused.