Skip to main content
POST
Create a private endpoint

Authorizations

Authorization
string
header
required

A Nemonist key (sk-nm-...) as a bearer token in the Authorization header.

Headers

idempotency-key
string

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.

Required string length: 1 - 255
Example:

"wayfair-gpt-4o-eastus-2026-09"

HTTP-Referer
string

The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.

X-OpenRouter-Title
string

The app display name allows you to customize how your app appears in OpenRouter's dashboard.

X-OpenRouter-Categories
string

Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.

Body

application/json

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.

slug
string
required

Model prefix, 2-40 lower-case letters, digits and dashes; not a catalog vendor's name (such as openai).

Pattern: ^[a-z0-9][a-z0-9-]{1,39}$
base_url
string
required

Public HTTPS base URL of the OpenAI-compatible server, such as https://host/v1. Private and loopback addresses are refused.

key
string
required

The server's API key, sent to it as a bearer token; stored sealed and never returned.

Maximum string length: 8000
workspace_id
string

The workspace it serves; omitted: the account's default workspace.

name
string

Display name; empty uses the slug.

Maximum string length: 100
formats
enum<string>[]

APIs the server speaks: chat (/chat/completions) always, plus responses (/responses) and messages (/messages) when listed.

Available options:
chat,
responses,
messages
declared_zdr
boolean | null

Your word that the server keeps no prompt or completion data; null is undeclared.

upstream_model_id
string

The model validation calls, as the server names it; empty uses the first model its GET /models lists.

Maximum string length: 200
activate

true, or {workspace_id}, validates and activates in the same call; a failed validation keeps the draft and answers 422.

Response

The created endpoint: a draft, or active when activate was passed

The created endpoint: a draft, or active when activate was passed.

data
object
required

The created endpoint: a draft, or active when activate was passed.