curl --request POST \
--url https://nemonist.com/api/v1/private-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"base_url": "<string>",
"key": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"formats": [],
"declared_zdr": true,
"upstream_model_id": "<string>",
"activate": true
}
'import requests
url = "https://nemonist.com/api/v1/private-endpoints"
payload = {
"slug": "<string>",
"base_url": "<string>",
"key": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"formats": [],
"declared_zdr": True,
"upstream_model_id": "<string>",
"activate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: '<string>',
base_url: '<string>',
key: '<string>',
workspace_id: '<string>',
name: '<string>',
formats: [],
declared_zdr: true,
upstream_model_id: '<string>',
activate: true
})
};
fetch('https://nemonist.com/api/v1/private-endpoints', 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": 123,
"message": "<string>"
},
"data": {
"endpoint": {
"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>"
}
]
}
},
"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": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 502,
"message": "Provider returned error"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}Create a private endpoint
Creates a custom endpoint as a draft. Drafts are not routed: validate one with POST /private-endpoints//validate, then activate it. Pass activate to do all three in one call; if validation fails the draft is kept and answered with 422 and its checks. Send an Idempotency-Key header to make retries safe: the same key and body return the first endpoint; the same key with another body answers 422 idempotency_key_reused. Management key required.
curl --request POST \
--url https://nemonist.com/api/v1/private-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "<string>",
"base_url": "<string>",
"key": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"formats": [],
"declared_zdr": true,
"upstream_model_id": "<string>",
"activate": true
}
'import requests
url = "https://nemonist.com/api/v1/private-endpoints"
payload = {
"slug": "<string>",
"base_url": "<string>",
"key": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"formats": [],
"declared_zdr": True,
"upstream_model_id": "<string>",
"activate": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: '<string>',
base_url: '<string>',
key: '<string>',
workspace_id: '<string>',
name: '<string>',
formats: [],
declared_zdr: true,
upstream_model_id: '<string>',
activate: true
})
};
fetch('https://nemonist.com/api/v1/private-endpoints', 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": 123,
"message": "<string>"
},
"data": {
"endpoint": {
"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>"
}
]
}
},
"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": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 502,
"message": "Provider returned error"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}Authorizations
Headers
Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, pricing, or declared parameters) is rejected with 422 idempotency_key_reused. Declared parameters are compared as a set, so a retry that reorders or repeats a name replays the endpoint. activate and settings are not compared, and later edits to the endpoint do not affect the comparison. settings is still validated before the replay, so a retry with invalid settings returns 400 settings_invalid instead of the endpoint.
1 - 255"wayfair-gpt-4o-eastus-2026-09"
Body
A new custom endpoint. 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.