Model Discovery and Catalog
Public model and price lookup APIs, plus organization-scoped real-time pricing.
Inference Space provides three APIs for discovering available models and looking up prices:
- Models the current Key can call:
GET /v1/models, OpenAI compatible, and the one used most often during integration. - Public batch model and price lookup: No authentication required, CDN-friendly, and suitable for website and pricing-page displays.
- Organization-scoped real-time pricing: Requires a gateway API Key and returns the effective price catalog for the organization that owns the Key.
Specific model IDs, availability, and unit prices change as the console is updated. Manage model IDs as configuration and switch versions with console updates instead of hard-coding them into application logic.
Models the current Key can call (/v1/models)
Returns the model IDs that the organization owning this Key can actually call; the OpenAI SDK's client.models.list() works with it directly. The Key needs one of the ai:llm, ai:image, ai:video, or ai:* scopes; otherwise the request returns 403 insufficient_scope.
# China region, accelerated route; China international route is https://global.inf.space, Global region is https://ai.inf.space
curl "https://cn.inf.space/v1/models" \
-H "Authorization: Bearer $INFERENCE_SPACE_API_KEY"{
"object": "list",
"data": [
{ "id": "gpt-5.6-sol", "object": "model", "created": 0, "owned_by": "..." },
{ "id": "gpt-image-2", "object": "model", "created": 0, "owned_by": "..." }
]
}- Query a single model:
GET /v1/models/{model}. - Gemini tools can use
GET /v1beta/modelsto get a Gemini-shaped list. - The list only says what is "callable" and contains no prices; for prices, use
/v1/pricing/lookupbelow.
Public batch model and price lookup
Look up model metadata and prices in the requested currency for a batch of model IDs. Authentication is not required; the response includes CORS and cache headers, making the API suitable for direct use by marketing sites and pricing pages.
Global region: use https://ai.inf.space
POST https://cn.inf.space/v1/public/models/lookup?currency=CNY- The
currencyquery parameter is required and must be a three-letter ISO 4217 currency code such asUSDorCNY. Missing or invalid values return400. - The body is
{"modelIds": [...]}with at most 200 IDs; more than 200 returns413. - No
Authorizationheader is required.
Every route domain serves this endpoint (cn.inf.space / global.inf.space / ai.inf.space) at the same path. It queries the public catalog: some aliases and models enabled individually for an organization are not included and return null, but this does not affect actual calls. To confirm which models you can call, use GET /v1/models.
Request
# China region, accelerated route; China international route is https://global.inf.space, Global region is https://ai.inf.space
curl "https://cn.inf.space/v1/public/models/lookup?currency=CNY" \
-H "Content-Type: application/json" \
-d '{
"modelIds": ["qwen-turbo", "qwen-max", "non-existent-id"]
}'import requests
resp = requests.post(
# China region, accelerated route; China international route is https://global.inf.space, Global region is https://ai.inf.space
"https://cn.inf.space/v1/public/models/lookup",
params={"currency": "CNY"},
json={"modelIds": ["qwen-turbo", "qwen-max", "non-existent-id"]},
)
print(resp.json())const resp = await fetch(
// China region, accelerated route; China international route is https://global.inf.space, Global region is https://ai.inf.space
"https://cn.inf.space/v1/public/models/lookup?currency=CNY",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
modelIds: ["qwen-turbo", "qwen-max", "non-existent-id"],
}),
},
);
console.log(await resp.json());Response
The response has the shape { models, currency, asOf }. models is a map keyed by the model IDs in the request: a found ID maps to a model entry, and an unknown ID maps to null.
{
"models": {
"qwen-turbo": {
"id": "qwen-turbo",
"label": "Qwen Turbo",
"labelEn": "Qwen Turbo",
"labelZh": "通义千问 Turbo",
"capabilityId": "llm",
"contextWindow": 1000000,
"supportsVision": false,
"pricing": {
"currency": "CNY",
"inputPerMillionTokens": "0.3",
"outputPerMillionTokens": "0.6",
"cachedInputPerMillionTokens": null,
"lastChangedAt": "2026-05-13T09:58:35.973Z"
}
},
"qwen-max": {
"id": "qwen-max",
"label": "Qwen Max",
"labelEn": "Qwen Max",
"labelZh": "通义千问 Max",
"capabilityId": "llm",
"contextWindow": 32768,
"supportsVision": false,
"pricing": {
"currency": "CNY",
"inputPerMillionTokens": "2.4",
"outputPerMillionTokens": "9.6",
"cachedInputPerMillionTokens": null,
"lastChangedAt": "2026-05-13T09:58:35.973Z"
}
},
"non-existent-id": null
},
"currency": "CNY",
"asOf": "2026-06-16T02:10:24.193Z"
}Model entry fields:
| Field | Description |
|---|---|
id | Model ID |
label | Display name (follows the request / site language) |
labelEn | English display name (always returned) |
labelZh | Chinese display name (always returned) |
capabilityId | Capability ID (llm / image / asr / tts / ocr / vision-segment) |
contextWindow | Context window in tokens (may be null) |
supportsVision | Whether visual input is supported |
pricing | Price in the requested currency: currency, inputPerMillionTokens, outputPerMillionTokens, cachedInputPerMillionTokens (null when no explicit cache price exists), and lastChangedAt (prices are per 1M tokens) |
The caller (your site) decides which models to display — pass in the list of model IDs you want to show, and the API only resolves their metadata and prices in the requested currency. Unknown IDs return null for convenient filtering.
Organization-scoped real-time pricing
Look up the effective price catalog for the organization that owns the current gateway API Key (system prices merged with organization-specific overrides). Authentication is required, and the scope is the Key's organization.
Global region: use https://ai.inf.space
GET https://cn.inf.space/v1/pricing/lookup?capability=llm&model=claude-sonnet-4-6- Every route domain serves this endpoint (
cn.inf.space/global.inf.space/ai.inf.space) at the same path. - Authenticate with
Authorization: Bearer gk_...; results are scoped to the organization that owns the Key. - Use the
capabilityandmodelquery parameters as filters (combine them as needed). - The response has the shape
{ currency, entries, version }.
# China region, accelerated route; China international route is https://global.inf.space, Global region is https://ai.inf.space
curl "https://cn.inf.space/v1/pricing/lookup?capability=llm&model=claude-sonnet-4-6" \
-H "Authorization: Bearer $INFERENCE_SPACE_API_KEY"import os, requests
resp = requests.get(
# China region, accelerated route; China international route is https://global.inf.space, Global region is https://ai.inf.space
"https://cn.inf.space/v1/pricing/lookup",
params={
"capability": "llm",
"model": "claude-sonnet-4-6",
},
headers={"Authorization": f"Bearer {os.environ['INFERENCE_SPACE_API_KEY']}"},
)
print(resp.json())// China region, accelerated route; China international route is https://global.inf.space, Global region is https://ai.inf.space
const url = new URL("https://cn.inf.space/v1/pricing/lookup");
url.search = new URLSearchParams({
capability: "llm",
model: "claude-sonnet-4-6",
}).toString();
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.INFERENCE_SPACE_API_KEY}` },
});
console.log(await resp.json());entries contains the price entries in the organization's effective catalog that match the filters. currency is the organization's billing currency, and version identifies the catalog version.
Leading foreign LLMs are hidden from unauthorized organizations by default. Anthropic, OpenAI, Gemini, and other leading brands appear in an organization's catalog only after the organization is explicitly authorized, keeping "visible" and "callable" aligned. If a model is absent from /v1/pricing/lookup results, the organization usually has not yet been authorized for that model.
Choosing between the three APIs
| Use case | API |
|---|---|
| Confirm in code which models this Key can call | Authenticated GET https://cn.inf.space/v1/models |
| Display a set of models and prices on a website or pricing page (no login state, caching, cross-origin) | Public POST https://cn.inf.space/v1/public/models/lookup |
| Confirm the real-time effective prices within your own organization (including organization-specific overrides and authorization scope) | Authenticated GET https://cn.inf.space/v1/pricing/lookup |
Actual unit prices, available models, and discounts are determined by the console and organization pricing. Organization-specific prices, contract discounts, and real-time console prices take precedence. Manage model IDs as configuration so versions can be switched smoothly as the console changes.
Related
NewAPI Compatibility
Model discovery, audio aliases, balance, request log, and daily consumption endpoints you can keep using when migrating from NewAPI.
Chat Completions API
OpenAI-compatible POST /v1/chat/completions — minimal example, parameters, streaming, tool calls, multimodal input, usage, and errors.