Skip to main content

Services Catalog

The services catalog is MarginFront’s record of every model and non-LLM service it can calculate cost for. When you fire a usage event with model and modelProvider, MarginFront looks up the catalog entry that matches and uses its rate to compute cost.
Use this endpoint to discover canonical names BEFORE firing events. If your service is in the catalog, send model: '<canonicalName>' and modelProvider: '<provider>' and cost auto-resolves on ingest. If not, the event still lands but cost stays null (NEEDS_COST_BACKFILL). The POST /v1/events/map-model endpoint can then redirect an unknown name to an existing catalog entry. It cannot create new rates.
The catalog is global. It is not org-scoped. Every authenticated caller sees the same entries. The catalog is read-only via the API. Entries are managed by an internal sync script that pulls from OpenRouter, LiteLLM, and a hand-curated list of non-LLM services.

List services

Returns paginated catalog entries. Filter by provider, service type, LLM-vs-non-LLM, or full-text search. Method & URL:
Headers:
Query parameters: Example: list every Google service
Example: find every non-LLM API in the Compute category
Example: search by name
Response:
Field reference:

Get a single service

Returns the full record for one catalog entry by its UUID. Same shape as one row in the list response. Example:
Errors:

Using the catalog in your integration

Pattern that avoids the NEEDS_COST_BACKFILL cycle:
  1. Before adding a new service to your code, call GET /v1/services?search=<your-service-name> (or ?provider=<provider>).
  2. If the response has a matching entry, use its canonicalName as model and its provider as modelProvider.
  3. Fire usage events. Cost auto-resolves on ingest.
If no matching entry exists, two paths:
  • Map an existing entry. If your service is similar to one in the catalog (e.g. a Google Places sub-endpoint mapping to the bundled google-places entry), use POST /v1/events/map-model to redirect your unknown name to the existing entry. Cost backfills retroactively for events already saved with cost = null.
  • Catalog gap. If nothing in the catalog represents your service accurately, fire events anyway. Events are saved with cost = null and eventStatus = NEEDS_COST_BACKFILL. Email [email protected] with the service name and your provider’s pricing page; we’ll add it to the catalog.

Programmatic access

The same catalog is available via:
  • Node SDK: client.services.list(...) and client.services.get(id). Documented in the SDK reference.
  • MCP: the list_catalog_services tool. Documented in the MCP tools reference.