API reference · Models
Models
Schema models: the bases you can run on and create endpoints on. The base flagged default: true is used when base is omitted; a retired base rejects runs, creations, and serves with 422 capability_unavailable (upgrade endpoints still on one). Enterprise fine-tunes appear in this list for the owning organization only, and are served behind ordinary endpoints.
One rate for every Schema model: every base bills at the same rate, and switching an endpoint to a newer base (upgrade) never changes its rate.
Routes
List models
GET
/v2/modelsReturns the Schema models available to your organization.
GET/v2/models
curl 'https://api.schemalabs.ai/v2/models' \
-H "Authorization: Bearer $SCHEMA_API_KEY"import os
import requests
SCHEMA_API_KEY = os.environ["SCHEMA_API_KEY"]
r = requests.get(
"https://api.schemalabs.ai/v2/models",
headers={"Authorization": f"Bearer {SCHEMA_API_KEY}"},
)
r.raise_for_status()
result = r.json()const res = await fetch('https://api.schemalabs.ai/v2/models', {
headers: {
Authorization: `Bearer ${process.env.SCHEMA_API_KEY}`,
},
});
if (!res.ok) throw new Error(`Schema API error ${res.status}`);
const result = await res.json();{
"models": [
{ "id": "schema-2", "name": "Schema-2", "status": "available", "default": true }
],
"request_id": "req_a4c07b"
}Returns
A list of model objects, latest first.
Response fields 1
modelsarray of objectsModel objects.Item properties 4
idstringBase name (schema-{n}) or an Enterprise fine-tune id.namestringDisplay name.statusstringavailable. Listed bases accept runs, creations, and serves; a base that has been retired answers with422 capability_unavailableand is moved on withPOST /v2/endpoints/:id/upgrade.defaultbooleanThe base used when a request omitsbase.