Skip to content
OpenSmartRoute
Documentation
Hosted platformREST API reference

Public endpoints

No API key required: deployment information, the model catalogue with live statistics, rankings and self-serve signup.

API version 1.0.0openapi.json

No API key required: deployment information, the model catalogue with live statistics, rankings and self-serve signup.

get/api/v1/catalogue

Catalogue

No authentication.

Responses

200Successful Response
Requestbash
curl -s "$OSR_URL/api/v1/catalogue"

post/api/v1/estimate

Estimate Public

Quote a request before sending it: tokens, cost per candidate and the recommended pick. Works without a key (rate limited per client, no tenant rules) and with one (metered as `estimate, workspace tenants and plan applied). monthly_requests` adds a monthly projection.

Requires an API key.

Parameters

NameInTypeDefaultDescription
x-osr-tenantheaderstring | null

Request bodyEstimateIn

FieldTypeDefaultDescription
constraintsobject
contextobject
executebooleanfalse
historyobject<string>[]
kindsstring[] | null
monthly_requestsinteger | null
objectiveobject<number>
output_tokensinteger | null
planbooleanfalse
profileobject
text(required)string
top_kinteger3

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/estimate" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "constraints": {}, "context": {}, "history": [], "kinds": [], "monthly_requests": 1, "objective": {}, "output_tokens": 1, "profile": {} }'
Bodyjson
{
  "constraints": {},
  "context": {},
  "history": [],
  "kinds": [],
  "monthly_requests": 1,
  "objective": {},
  "output_tokens": 1,
  "profile": {}
}

get/api/v1/info

Info

No authentication.

Responses

200Successful Response
Requestbash
curl -s "$OSR_URL/api/v1/info"

get/api/v1/llms

Llms

The reference LLM catalogue: real vendors, prices per million tokens, context windows, modalities. Independent of what this deployment routes to; `routed_by lists the routing targets that resolve to each model. Sorted by newest (default), name, price, price-desc, context or intelligence`.

No authentication.

Parameters

NameInTypeDefaultDescription
qquerystring""
vendorquerystring | null
modalityquerystring | null
toolsqueryboolean | null
reasoningqueryboolean | null
open_weightsqueryboolean | null
freequeryboolean | null
sortquerystring"newest"
limitqueryinteger500
offsetqueryinteger0

Responses

200Successful Response
422Validation ErrorHTTPValidationError
Requestbash
curl -s "$OSR_URL/api/v1/llms?q=&sort=newest"

get/api/v1/llms/{vendor}/{model}

Llm

One reference model with the routing targets that resolve to it and its vendor siblings.

No authentication.

Parameters

NameInTypeDefaultDescription
vendor(required)pathstring
model(required)pathstring

Responses

200Successful Response
422Validation ErrorHTTPValidationError
Requestbash
curl -s "$OSR_URL/api/v1/llms/<vendor>/<model>"

get/api/v1/models

Models

No authentication.

Parameters

NameInTypeDefaultDescription
daysqueryinteger7

Responses

200Successful Response
422Validation ErrorHTTPValidationError
Requestbash
curl -s "$OSR_URL/api/v1/models?days=7"

get/api/v1/models/{model_id}

Model

No authentication.

Parameters

NameInTypeDefaultDescription
model_id(required)pathstring
daysqueryinteger30

Responses

200Successful Response
422Validation ErrorHTTPValidationError
Requestbash
curl -s "$OSR_URL/api/v1/models/<model_id>?days=30"

post/api/v1/newsletter/subscribe

Newsletter Subscribe

Subscribe an address to the newsletter. Always `202`; a confirmation with the one-click unsubscribe link is emailed. Re-subscribing an address re-activates it.

No authentication.

Request bodyNewsletterSubscribeIn

FieldTypeDefaultDescription
email(required)string
sourcestring""

Responses

202Successful Response
422Validation ErrorHTTPValidationError
Requestbash
curl -s -X POST "$OSR_URL/api/v1/newsletter/subscribe" \
  -H "Content-Type: application/json" \
  -d '{ "email": "ada@example.com" }'
Bodyjson
{
  "email": "ada@example.com"
}

post/api/v1/newsletter/unsubscribe

Newsletter Unsubscribe

One-click unsubscribe with the token from any newsletter message.

No authentication.

Request bodyNewsletterUnsubscribeIn

FieldTypeDefaultDescription
token(required)string

Responses

200Successful Response
422Validation ErrorHTTPValidationError
Requestbash
curl -s -X POST "$OSR_URL/api/v1/newsletter/unsubscribe" \
  -H "Content-Type: application/json" \
  -d '{ "token": "string" }'
Bodyjson
{
  "token": "string"
}

get/api/v1/rankings

Rankings

No authentication.

Parameters

NameInTypeDefaultDescription
daysqueryinteger7
domainquerystring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
Requestbash
curl -s "$OSR_URL/api/v1/rankings?days=7"

post/api/v1/signup

Signup

No authentication.

Request bodySignupIn

FieldTypeDefaultDescription
email(required)string
namestring""
passwordstring | null

Responses

201Successful Response
422Validation ErrorHTTPValidationError
Requestbash
curl -s -X POST "$OSR_URL/api/v1/signup" \
  -H "Content-Type: application/json" \
  -d '{ "email": "ada@example.com" }'
Bodyjson
{
  "email": "ada@example.com"
}

get/api/v1/stats/public

Stats Public

No authentication.

Responses

200Successful Response
Requestbash
curl -s "$OSR_URL/api/v1/stats/public"

get/api/v1/status

Status

Readiness checks, uptime and the observability controls of this deployment (no key needed). The same checks as `GET /readyz` with the edition, versions and tracing state added; the status code is 503 while a check fails so status pages can poll it directly.

No authentication.

Responses

200Successful Response
Requestbash
curl -s "$OSR_URL/api/v1/status"