Skip to content

Models and versions

This page explains how the Inola API names models and versions, which models answer in real time and which in real time only while they are running, how a version is pinned, and what happens when a version is deprecated or retired. Listing models needs an API key with the models:read permission.

modelwhat it doesreal-timebatchrequest form
cordon-minidetects prompt injection in a text: verdict and scoreyesyesInola Cordon, API reference
decider-minianswers questions about a documentwhile runningyesInola Decider, API reference

Which ways a model is served is set per processing region: a model may be served in real time and through batches, only through batches, or not at all in your region (the processing region of your organization). A model available only through batches in your region answers a real-time request with 400 batch_only; a model available only in real time answers POST /v1/batches with 400 online_only.

A model served in real time in your region may not be running at the moment of a request — it runs on on-demand capacity, or its regular capacity is down for a while. Its real-time request is then either held while the model starts — the first request after an idle period can take several minutes, so allow your client a timeout of at least 11 minutes — or answered with 429 serverless_cold, depending on the service’s setting at the moment. A key of the Free plan never starts a model: its real-time request is answered while the model is running and gets 429 serverless_cold at once otherwise. For documents that do not need an answer in real time use the Batch API where your region offers it.

The documentation describes models, not their state at a given moment: GET /v1/models gives the availability of each model in your region (below).

A model has a name (cordon-mini) and versions (2.2.1). The plain name resolves to the current default version of the model. To use a specific version, POST /v1/infer takes the name and a separate field, "model": "cordon-mini", "version": "2.2.1"; the name with the version, "model": "cordon-mini-2.2.1", is accepted too.

The model and version fields of a response always name the exact version that answered. Every model is called through the same POST /v1/infer: a new model or version needs no new endpoint, only its name in model.

An organization can pin a version of a model in the console. Then the plain name resolves to the pinned version for every key of the organization, and default_version in GET /v1/models shows it. A request that names a version explicitly gets that version, pinned or not.

statusbehaviour
previewavailable for testing; may change
activestable
deprecatedstill served; responses carry the headers Deprecation: true and Sunset: <date> (the date the version is retired)
retirednot served: requests return 410 version_retired; the version is no longer listed

When every version of a model is retired, the model is removed from the catalog: requests that name it return 410 model_retired, and GET /v1/models no longer lists it. The changelog names the models removed and the ones to use instead.

A deprecated version keeps working until its Sunset date. Code that reads the Deprecation header can report it before the version is retired.

GET /v1/models lists the models available on your plan with their versions. The list is under data; models holds the same entries, for clients that read the list under that name. GET /v1/models/{id} returns one model.

fieldmeaning
data[].idthe model name, such as cordon-mini; data[].name repeats it
data[].descriptionwhat the model does; may be empty
data[].release_dateYYYY-MM-DD: the release date of data[].default_version; empty when the date is not known
data[].default_versionthe version the plain name resolves to for your organization (the pinned one, if any)
data[].versions[]the versions that are not retired
data[].versions[].versionthe version, such as 2.2.1
data[].versions[].statuspreview, active or deprecated
data[].versions[].retires_atwhen a deprecated version is retired; null otherwise
data[].versions[].context_windowthe maximum document length in tokens
data[].versions[].output_schema_idthe form of output in /v1/infer, such as decision.v1
data[].availabilityin your region: online (real-time; batches too unless POST /v1/batches answers online_only), batch (batches only) or none (not served in your region at the moment)
data[].versions[].availabilitythe same value as data[].availability, repeated on every version
data[].pricethe prices of the model on your plan, the minimum billed tokens per real-time request, the batch price; see Tokens and billing
data[].limitsthe limits of your plan for the model; see Limits and retries

A model with availability: none answers real-time requests and POST /v1/batches with 503 unavailable and a Retry-After header.

Terminal window
curl -sS "https://api.inola.ai/v1/models" -H "Authorization: Bearer $INOLA_API_KEY"
import os
import sys
import requests
API_URL = "https://api.inola.ai"
API_KEY = os.environ["INOLA_API_KEY"]
response = requests.get(f"{API_URL}/v1/models", headers={"Authorization": f"Bearer {API_KEY}"}, timeout=30)
if response.status_code != 200:
error = response.json()["error"]
sys.exit(f"{response.status_code} {error['code']}: {error['message']}")
for model in response.json()["data"]:
for version in model["versions"]:
default = " (default)" if version["version"] == model["default_version"] else ""
print(model["id"], version["version"], version["status"], version["availability"], default)
const API_URL = "https://api.inola.ai";
const response = await fetch(`${API_URL}/v1/models`, {
headers: { Authorization: `Bearer ${process.env.INOLA_API_KEY}` },
});
const body = await response.json();
if (!response.ok) {
console.error(`${response.status} ${body.error.code}: ${body.error.message}`);
process.exit(1);
}
for (const model of body.data) {
for (const version of model.versions) {
const isDefault = version.version === model.default_version ? " (default)" : "";
console.log(model.id, version.version, version.status, version.availability, isDefault);
}
}

The output lists one line per version, for example:

cordon-mini 2.2.1 active online (default)
statuscodecause
400batch_onlya real-time request to a model available only through batches in your region
400online_onlyPOST /v1/batches for a model available only in real time in your region
404model_not_foundno such model, or not on your plan
410version_retiredthe version is retired
410model_retiredevery version of the model is retired: the model is removed from the catalog
503unavailablethe model is not served at the moment; retry after Retry-After
429serverless_colda real-time request to a model that is not running now (most often a serverless one); retry after Retry-After or use the Batch API
  • Verdicts and scores — what cordon-mini returns.
  • Batches — the way to use a model available only through batches in your region, or one that is not running at the moment.
  • API reference — every field of every endpoint.