Skip to content

Reference

API: Private endpoints

Markdown version

MethodPathWhat it doesScope
GET/v1/private-endpointsYour own model servers (private/<slug>): each one's address, model, limits, capabilities and last probe. A key is never shown.gateway:read
POST/v1/private-endpointsAdd your own OpenAI-compatible server (web app only): its https address must be public; the key is sealed and never shown again. It's probed at once. (web app only)gateway:write
DELETE/v1/private-endpoints/:idDelete a private endpoint (web app only); its sealed key goes with it (web app only)gateway:write
GET/v1/private-endpoints/:idOne private endpointgateway:read
PATCH/v1/private-endpoints/:idRename, change limits or capabilities, or disable a private endpoint. Changing its address or key and re-enabling it are done by a person in the web app.gateway:write
POST/v1/private-endpoints/:id/probeProbe a private endpoint now: GET {base_url}/models with its key (5 s). The result is stored and shown; routing isn't blocked by it.gateway:write

Examples

GET /v1/private-endpoints

Your own model servers (private/<slug>): each one's address, model, limits, capabilities and last probe. A key is never shown.

curl -s "https://manage.restolayer.com/v1/private-endpoints" \
  -H "Authorization: Bearer $LG_API_KEY"
const res = await fetch(`https://manage.restolayer.com/v1/private-endpoints`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.LG_API_KEY}` },
});
const data = await res.json();

GET /v1/private-endpoints/$ID

One private endpoint

curl -s "https://manage.restolayer.com/v1/private-endpoints/$ID" \
  -H "Authorization: Bearer $LG_API_KEY"
const res = await fetch(`https://manage.restolayer.com/v1/private-endpoints/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.LG_API_KEY}` },
});
const data = await res.json();

PATCH /v1/private-endpoints/$ID

Rename, change limits or capabilities, or disable a private endpoint. Changing its address or key and re-enabling it are done by a person in the web app.

curl -s -X PATCH "https://manage.restolayer.com/v1/private-endpoints/$ID" \
  -H "Authorization: Bearer $LG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://manage.restolayer.com/v1/private-endpoints/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.LG_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/private-endpoints/$ID/probe

Probe a private endpoint now: GET {base_url}/models with its key (5 s). The result is stored and shown; routing isn't blocked by it.

curl -s -X POST "https://manage.restolayer.com/v1/private-endpoints/$ID/probe" \
  -H "Authorization: Bearer $LG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://manage.restolayer.com/v1/private-endpoints/${id}/probe`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.LG_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.restolayer.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.