Skip to main content

What This Example Shows

  • Listing the available decision models and their prices with GET /v1/decision/models
  • Choosing between the jev-latest alias and a pinned version
  • Estimating a request’s cost from its token count, and checking it against usage.total_cost

Why This Matters

The model list changes as models are added and versions ship, so read prices from the endpoint instead of copying them into your code. The same prices let you budget a job before you run it: a decision model is billed per token, so a request’s cost is its token count times the model’s price.

Step 1: List the Models

The response from production on 2026-10-08:
Prices are in USD per 1M tokens. release_date is always an empty string; it is there for TypeSafe SDK compatibility.

Step 2: Choose jev-latest or a Pinned Version

jev-latest is an alias, and it is the default when you leave out model_name. The version behind it can change, so every completion’s model field shows which version actually answered:
On 2026-11-03, jev-latest was answered by jev-1.14.0, a newer version than the pinned jev-1.13.0 in the list. Only names in the list can be requested; any other returns 400.
  • Use jev-latest to get new versions without changing your code.
  • Pin a listed version such as jev-1.13.0 when answers must stay comparable over time, for example when you tuned routing thresholds on its probabilities.

Step 3: Estimate a Request’s Cost

A request costs input_tokens × input_cost_per_1m / 1,000,000, plus the same for output tokens:
A request with 387 input and 71 output tokens costs 387 × $0.0483 / 1M = $0.0000187, since output tokens are free. A job of 10,000 requests at about 400 input tokens each costs about $0.19.
The TypeSafe SDK’s client.models.list() gets this same list from GET /v1/models, so code written against the TypeSafe SDK sees the Swarms prices without changes.

Next Steps