tdx pricing#

Inspect prices and manage price overrides.

Read effective deployment prices and coverage, and manage operator price overrides.

Every command also takes the global flags and reads the environment variables that the command reference lists once.

Commands#

CommandDescriptionType
tdx pricing listList deployment prices and overrides.Read
tdx pricing overridesManage price overrides.Group
tdx pricing overrides setSet a price override for a provider model.Write
tdx pricing overrides editReplace a price override.Write
tdx pricing overrides removeRemove a price override.Write
tdx pricing unpricedPrice calls made with no price.Group
tdx pricing unpriced listList calls served with no price, by provider model.Read
tdx pricing unpriced priceCharge a provider model's calls with no price at the price covering it now.Write

tdx pricing list#

List deployment prices and overrides.

Reads

Read effective deployment prices, coverage, this month's call counts, model reach and price overrides. See Catalogue reads.

Shell
# GET /control/v1/pricing
tdx pricing list [flags]

Output fields (inside data)

FieldTypeDescription
catalogueRevisionstring|nullCatalogue price revision.
coveragemasked-coveragePriced and unpriced deployments.
monthmasked-monthThis month's call counts.
deploymentsmasked-price[]Effective price per deployment.
modelsmasked-reach[]Deployments answering each model id.
overridesmasked-override[]Saved price overrides.

Examples

Inspect price coverage and overrides:

Shell
tdx pricing list --json=coverage,overrides

tdx pricing overrides#

Manage price overrides.

Set, replace or remove a price override for one provider model, identified as provider:model.

tdx pricing overrides set#

Set a price override for a provider model.

Writes

Send exactly one of a --price-file JSON object or --free, with an optional --note. With --apply-to-unpriced, the calls the provider model already served with no price are priced too, at this price, each in the day, week and month it was made; a call that had a price keeps it. See Catalogue changes.

Shell
# POST /control/v1/pricing/overrides
tdx pricing overrides set --provider <string> --model <string> [flags]

Required flags

FlagTypeDefaultDescription
--providerstringProvider id from pricing list.
--modelstringProvider model id from pricing list.

Optional flags

FlagTypeDefaultDescription
--price-filepathPrice card JSON object file; regular file, or stdin with --price-file=-; at most 1 MiB.
--freebooleanfalseMark the model free instead of supplying a price.
--notestringNon-secret note.
--apply-to-unpricedbooleanfalseAlso price the calls this provider model served with no price, at this price.

Constraints

  • Exactly one of --price-file, --free

Output fields (inside data)

FieldTypeDescription
overridemasked-overrideSaved price override.
repricedrepriced|nullWith --apply-to-unpriced: calls priced, those priced from an estimate, calls still with no price, the cost added (null when hidden) and the workspaces charged.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Preview a price override:

Shell
tdx pricing overrides set --provider <provider> --model <model> --price-file ./price.json --dry-run --json

Set a price and charge it to the calls already made:

Shell
tdx pricing overrides set --provider <provider> --model <model> --price-file ./price.json --apply-to-unpriced --json

tdx pricing overrides edit#

Replace a price override.

Writes

Replace the price of an existing override with exactly one of --price-file or --free, with an optional --note. Omitting --note clears any saved note. See Catalogue changes.

Shell
# PATCH /control/v1/pricing/overrides/:overrideId
tdx pricing overrides edit --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPrice override id (provider:model) from pricing list.

Optional flags

FlagTypeDefaultDescription
--price-filepathPrice card JSON object file; regular file, or stdin with --price-file=-; at most 1 MiB.
--freebooleanfalseMark the model free instead of supplying a price.
--notestringNon-secret note.
--apply-to-unpricedbooleanfalseAlso price the calls this provider model served with no price, at this price.

Constraints

  • Exactly one of --price-file, --free

Output fields (inside data)

FieldTypeDescription
overridemasked-overrideSaved price override.
repricedrepriced|nullWith --apply-to-unpriced: calls priced, those priced from an estimate, calls still with no price, the cost added (null when hidden) and the workspaces charged.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Mark an overridden model free:

Shell
tdx pricing overrides edit --id <provider:model> --free --json

tdx pricing overrides remove#

Remove a price override.

Writes

Remove a price override, restoring the catalogue price. See Catalogue changes.

Shell
# DELETE /control/v1/pricing/overrides/:overrideId
tdx pricing overrides remove --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPrice override id (provider:model) from pricing list.

Output fields (inside data)

FieldTypeDescription
removedstringRemoved price override id.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Remove a price override:

Shell
tdx pricing overrides remove --id <provider:model> --json

tdx pricing unpriced#

Price calls made with no price.

List the calls models served before they had a price, by provider model, and charge them once a price covers the model.

tdx pricing unpriced list#

List calls served with no price, by provider model.

Reads

Read the calls the gateway recorded with no price, by provider and provider model ID: how many, their tokens, when they were made, the gateway model IDs that served them, and the price that covers them now, if any. Such calls are kept to be priced for retentionDays days. See Catalogue reads.

Shell
# GET /control/v1/pricing/unpriced
tdx pricing unpriced list [flags]

Optional flags

FlagTypeDefaultDescription
--sincestringOnly calls made at or after this: an ISO time, or a number of days back such as 30d.

Output fields (inside data)

FieldTypeDescription
retentionDaysnumberHow long a call with no price is kept to be priced.
modelsmasked-unpriced[]Calls with no price per provider model: counts, tokens, first and last call, gateway model ids, the price covering them now, and uncoveredCalls, those no price covers yet.

Examples

List the last 30 days of calls with no price:

Shell
tdx pricing unpriced list --since 30d --json

tdx pricing unpriced price#

Charge a provider model's calls with no price at the price covering it now.

Writes

Charge the calls this provider model served with no price at the price that covers it now (its own, an override, or the catalogue's), each in the day, week and month it was made. A call is priced once; a call that had a price keeps it. With --preview the gateway says what that would charge and prices nothing. When no price covers the model yet the gateway refuses, and nothing is priced. See Catalogue changes.

Shell
# POST /control/v1/pricing/unpriced/reprice
tdx pricing unpriced price --provider <string> --model <string> [flags]

Required flags

FlagTypeDefaultDescription
--providerstringProvider id from pricing unpriced list.
--modelstringProvider model id from pricing unpriced list.

Optional flags

FlagTypeDefaultDescription
--previewbooleanfalseSay what pricing would charge, and price nothing.

Output fields (inside data)

FieldTypeDescription
pricedrepricedWhether it was a preview, calls priced, those priced from an estimate, calls still with no price, the cost added (null when hidden) and the workspaces charged.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

See what pricing the calls would charge:

Shell
tdx pricing unpriced price --provider <provider> --model <provider-model-id> --preview --json