Skip to main content
GET
Get a decision's model cost, per evaluation and in total

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer <key>. Each operation lists the scope its key needs: decisions:evaluate (evaluate and read evaluations), decisions:feedback (your app's feedback) or decisions:develop (everything else, including owner feedback and the review queue). An operation listing no scope takes any scoped key. A key with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.

Path Parameters

decision_id
string
required

A name you choose for this decision, such as refund-exception: a lowercase letter, then up to 127 of a-z 0-9 _ . -. Unique in your organization and shared by its test and production keys. The first registration or evaluation under a new one creates the decision.

Pattern: ^[a-z][a-z0-9_.-]{0,127}$

Query Parameters

since
string<date-time>

Start of the window, inclusive. Default: until - 30 days.

until
string<date-time>

End of the window, exclusive. Default: now.

Response

The decision's cost report

decision_id
string
required

A name you choose for this decision, such as refund-exception: a lowercase letter, then up to 127 of a-z 0-9 _ . -. Unique in your organization and shared by its test and production keys. The first registration or evaluation under a new one creates the decision.

Pattern: ^[a-z][a-z0-9_.-]{0,127}$
environment
enum<string>
required

The environment of the key that made the call: production or test. Evaluations, feedback, reviews and suggestions are separate per environment; decisions and their versions belong to the whole organization.

Available options:
production,
test
window
object
required
evaluations
object[]
required

One group per model.profile and assignment mode, ordered by both. Spend whose evaluation is gone is grouped under the profile unknown, as is dry-run spend, which has no evaluation.

models
object[]
required

One group per resolved model and adapter, from the per-call traces. Evaluations stored before traces existed and dry runs contribute none.

other_spend
object[]
required

Spend that is not an evaluation, one group per kind, kept out of the per-evaluation numbers.

total
object
required

Everything recorded above: evaluations, other spend and previews.

previews
object
required

Stored preview runs in the window (mb test, previews, and the one preview each generated suggestion runs), which write no evaluations. Generation's exploratory replays and model call are in other_spend, as is a preview run that stored nothing (uncommitted).