Language
Inference Space Docs

Model Discovery and Catalog

Public model and price lookup APIs, plus organization-scoped real-time pricing.

Inference Space provides two APIs for discovering available models and looking up prices:

  • 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.

Available model IDs, access scope, and 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.

Public Batch Model and Price Lookup

Look up 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.

POST https://ai.inf.space/v1/public/models/lookup?currency=CNY
  • The currency query parameter is required and must be a three-letter ISO 4217 currency code such as USD or CNY. Missing or invalid values return 400.
  • The body must be {"modelIds": [...]} with at most 200 IDs; more than 200 returns 413.
  • No Authorization header is required.

This is a public catalog endpoint on the master/control-plane path at https://ai.inf.space. It queries the static public catalog: aliases such as -x “latest” aliases and database-registered IDs such as gpt-image-2 are not included in the static catalog and return null—but they can still be routed successfully for image generation and chat when called directly.

Request

curl "https://ai.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(
    "https://ai.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(
  "https://ai.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 maps each requested model ID to a model entry when found, or to null when not found.

{
  "models": {
    "qwen-turbo": {
      "id": "qwen-turbo",
      "label": "Qwen Turbo",
      "labelEn": "Qwen Turbo",
      "labelZh": "Qwen Turbo",
      "providerId": "dashscope",
      "providerLabel": "Alibaba Cloud Model Studio",
      "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": "Qwen Max",
      "providerId": "dashscope",
      "providerLabel": "Alibaba Cloud Model Studio",
      "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:

FieldDescription
idModel ID
labelDisplay name, following the request or site language
labelEnEnglish display name, always returned
labelZhChinese display name, always returned
providerIdProvider ID, such as dashscope, openai, or anthropic
providerLabelProvider display name
capabilityIdCapability ID: llm, image, asr, tts, ocr, or vision-segment
contextWindowContext window in tokens; may be null
supportsVisionWhether visual input is supported
pricingPrice in the requested currency: currency, inputPerMillionTokens, outputPerMillionTokens, cachedInputPerMillionTokens (null when no explicit cache price exists), and lastChangedAt; prices are per 1M tokens

The caller decides which models to display. Pass the model ID list you want to show; the API only resolves 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, combining system prices with organization-specific overrides. Authentication is required, and the scope is the Key's organization.

GET https://ai.inf.space/v1/pricing/lookup?capability=llm&provider=anthropic&model=claude-sonnet-4-x
  • This is a control-plane endpoint on https://ai.inf.space; use the documented /v1/pricing/lookup path.
  • Authenticate with Authorization: Bearer gk_...; results are scoped to the organization that owns the Key.
  • Use capability, provider, and model as optional filters in any combination.
  • The response has the shape { currency, entries, version }.
curl "https://ai.inf.space/v1/pricing/lookup?capability=llm&provider=anthropic&model=claude-sonnet-4-x" \
  -H "Authorization: Bearer $TOS_API_KEY"
import os, requests

resp = requests.get(
    "https://ai.inf.space/v1/pricing/lookup",
    params={
        "capability": "llm",
        "provider": "anthropic",
        "model": "claude-sonnet-4-x",
    },
    headers={"Authorization": f"Bearer {os.environ['TOS_API_KEY']}"},
)
print(resp.json())
const url = new URL("https://ai.inf.space/v1/pricing/lookup");
url.search = new URLSearchParams({
  capability: "llm",
  provider: "anthropic",
  model: "claude-sonnet-4-x",
}).toString();

const resp = await fetch(url, {
  headers: { Authorization: `Bearer ${process.env.TOS_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 LLM brands are hidden from unauthorized organizations by default. Anthropic, OpenAI, Gemini, and other leading brands appear in an organization's catalog only after explicit authorization, keeping “visible” and “callable” models aligned. If a model is absent from /v1/pricing/lookup, the organization usually has not been authorized to use it.

Choosing Between the APIs

Use caseAPI
Display a set of models and prices on a website or pricing page without login state, with caching and cross-origin accessPublic POST https://ai.inf.space/v1/public/models/lookup
Verify the effective prices in your organization, including organization-specific overrides and authorization scopeAuthenticated GET https://ai.inf.space/v1/pricing/lookup

Actual prices, available models, and discounts are determined by the console and organization pricing. Organization-specific prices, contract discounts, and current console prices take precedence. Manage model IDs as configuration so versions can be switched smoothly as the console changes.

On this page