Token FactoryAPI Reference

Models

List the model catalog and read one listing.

Models

Prefix: /api/v1/model-catalog

See Overview for authentication and pagination.

id on a catalog row is the catalog listing id. Use that id for the detail call and for Playground Try (configModelId).

Endpoint summary

MethodPath
GET/model-catalog
GET/model-catalog/{listingId}

List models

GET /api/v1/model-catalog?page=0&size=20&sortBy=popularity
Authorization: Bearer YOUR_API_TOKEN
QueryDefaultDescription
page00-based page index
size20Page size, clamped to 1–100
searchCase-insensitive match across the model search text
sortBypopularitypopularity, name, author, modality, or price. Any other value sorts as popularity
directionDESC when sortBy is popularityASC or DESC
authorsComma-separated author UUIDs
modalitiesComma-separated modality UUIDs
complianceComma-separated compliance UUIDs
categoriesComma-separated category UUIDs
capabilitiesComma-separated capability UUIDs
quantizationsComma-separated quantization UUIDs
gpusComma-separated GPU SKU values
costMinMinimum average price per million tokens
costMaxMaximum average price per million tokens
latencyfast (under 500 ms), medium (500 ms up to under 2000 ms), or slow (2000 ms or more). Rows with no latency are omitted when this is set

Response 200 — StandardPageResponse of catalog rows. Fields that have no value are returned as null. The row also includes ids and labels for license, region, framework, serving mode, compliance, and modalities.

{
  "items": [
    {
      "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "name": "gpt-4o",
      "authorId": "11111111-1111-1111-1111-111111111111",
      "author": "OpenAI",
      "description": "General purpose model",
      "configModelId": "22222222-2222-2222-2222-222222222222",
      "configModelName": "gpt-4o",
      "catalogModelId": "33333333-3333-3333-3333-333333333333",
      "modalityId": "44444444-4444-4444-4444-444444444444",
      "modalityLabel": "Text",
      "inputCostPerToken": 0.0000025,
      "outputCostPerToken": 0.00001,
      "cachedInputCostPerToken": 0.00000125,
      "pricingKind": "SIMPLE",
      "contextWindow": 128000,
      "latencyMs": 420,
      "ttftMs": 180,
      "throughputTokensSec": 90,
      "qualityScore": 0.91,
      "listingStatus": "Active",
      "capabilityLabels": ["Reasoning", "Code"],
      "inputModalityLabels": ["Text"],
      "outputModalityLabels": ["Text"]
    }
  ],
  "page": 0,
  "size": 20,
  "totalElements": 1,
  "totalPages": 1
}

pricingKind is SIMPLE, ADVANCED, or NONE.


Get one model

GET /api/v1/model-catalog/{listingId}
Authorization: Bearer YOUR_API_TOKEN

listingId is the catalog row id from the list.

Response 200

{
  "listing": {
    "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "name": "gpt-4o",
    "author": "OpenAI",
    "inputCostPerToken": 0.0000025,
    "outputCostPerToken": 0.00001,
    "pricingKind": "SIMPLE"
  },
  "pricingKind": "SIMPLE",
  "serviceId": "55555555-5555-5555-5555-555555555555",
  "matrixRates": [
    {
      "matrixRowId": "66666666-6666-6666-6666-666666666666",
      "dimensionName": "Input_Tokens",
      "unitRatePerToken": 0.0000025,
      "unitRatePerMillion": 2.5,
      "priceMethod": "QUANTITY",
      "pricingKind": "SIMPLE",
      "unitRate": 0.0000025
    }
  ],
  "vendor": {},
  "model": {},
  "quantization": {},
  "configModel": {}
}

listing is the same catalog row as the list. matrixRates is the service rate card. vendor, model, quantization, and configModel are the raw records linked to that listing.

A missing or governance-hidden listing returns 400:

{
  "status": 400,
  "error": "Validation Error",
  "message": "Listing not found: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
}