tdx models#

Models callers can request from this gateway.

Models callers can request from this gateway: list them, toggle several at once, and manage who serves each one (providers), routers that pick between models, the aliases callers send, and custom models served from your own endpoint.

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

Commands#

CommandDescriptionType
tdx models listList catalogue models.Read
tdx models toggleEnable, disable, list or unlist providers and routers together.Write
tdx models providersWho serves a model on one client API.Group
tdx models providers listList provider configurations.Read
tdx models providers showShow the provider order of a provider configuration.Read
tdx models providers enableEnable a provider configuration.Write
tdx models providers disableDisable a provider configuration.Write
tdx models providers editEdit enabled or listing state, or provider routing, of a provider configuration.Write
tdx models providers editsManage stale provider configuration edits.Group
tdx models providers edits removeRemove a saved provider configuration edit.Write
tdx models routersIds that pick one of several models per request.Group
tdx models routers listList routers.Read
tdx models routers setCreate or replace an operator router.Write
tdx models routers previewPreview how an operator router would rank its members.Read
tdx models routers removeRemove an operator router.Write
tdx models routers editEdit a reviewed router.Write
tdx models routers editsManage stale reviewed router edits.Group
tdx models routers edits removeRemove a saved reviewed router edit.Write
tdx models routers strategiesWays a router can pick its model.Group
tdx models routers strategies listList operator strategies.Read
tdx models routers strategies explainExplain an operator strategy.Read
tdx models routers strategies setCreate or replace an operator strategy.Write
tdx models routers strategies removeRemove an operator strategy.Write
tdx models aliasesModel ids callers send, per client API.Group
tdx models aliases listList aliases.Read
tdx models aliases setPoint an alias at a provider configuration or router.Write
tdx models aliases removeRestore a reviewed default alias.Write
tdx models aliases previewPreview how an alias change would reach provider configurations.Read
tdx models customAdd models from a provider or your own server.Group
tdx models custom providersList the providers a model can be added from.Read
tdx models custom poolsList configured pools for server models.Read
tdx models custom listList custom model declarations.Read
tdx models custom statusInspect runtime status of custom models.Read
tdx models custom createAdd a model from a provider, or from a file.Write
tdx models custom editReplace one custom model declaration.Write
tdx models custom visibilityShow or hide a provider-hosted model in discovery.Write
tdx models custom qualifyQualify a custom model with human approval.Write
tdx models custom qualify cancelCancel one exact accepted qualification run.Write
tdx models custom removeRemove a custom model declaration.Write

tdx models list#

List catalogue models.

Reads

Read the public catalogue model list with client dialects and kinds. See Catalogue reads.

Shell
# GET /control/v1/catalogue/models
tdx models list [flags]

Output fields (inside data)

FieldTypeDescription
modelsmasked-catalogue-model[]Catalogue model id, client dialects and kind.

Examples

List catalogue model ids:

Shell
tdx models list --json=models

tdx models toggle#

Enable, disable, list or unlist providers and routers together.

Writes

Apply up to the gateway limit of toggle changes in one publication. Each change names its kind, its id, enabled and/or listed, and the expected current {enabled, listed}; kind group is a provider configuration (a catalogue Group) and kind modelGroup is a router. The gateway refuses stale expectations. The file must be a JSON object with a changes array. See Catalogue changes and Catalogue republishing.

Shell
# PATCH /control/compiled/toggles
tdx models toggle --body-file <path> [flags]

Required flags

FlagTypeDefaultDescription
--body-filepathToggle changes file: {"changes": [...]}; regular file, or stdin with --body-file=-; UTF-8 JSON, at most 1 MiB.

Output fields (inside data)

FieldTypeDescription
updatedintegerNumber of toggle changes applied.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Preview several toggles:

Shell
tdx models toggle --body-file ./toggles.json --dry-run --json

tdx models providers#

Who serves a model on one client API.

Who serves one model on one client API (a catalogue Group): turn it on or off, and list or unlist it. Ids are Group ids, called groupId in output. Provider credentials are managed separately with providers keys.

tdx models providers list#

List provider configurations.

Reads

Read the compiled Group inventory: reviewed provider configurations, routers and unreviewed custom provider configurations. See Catalogue reads.

Shell
# GET /control/v1/catalogue/groups
tdx models providers list [flags]

Output fields (inside data)

FieldTypeDescription
providersmasked-group[]Reviewed provider configurations (catalogue Groups).
routersmasked-model-group[]Routers (ModelGroups) by client dialect.
unreviewedmasked-group[]Operator-declared custom provider configurations.
bindingsDigeststringDigest of the client dialect bindings.

Examples

List provider configurations:

Shell
tdx models providers list --json=providers

tdx models providers show#

Show the provider order of a provider configuration.

Reads

Read one compiled Group from the inventory and print the order it tries its providers in: each provider with whether it is ready here and its catalogue list price, the routing strategy, and who set the order (catalogue or operator). The catalogue's default order is the cheapest blended list price first, then the model's own (first-party) provider, then provider id A-Z; with an operator's order set, defaultOrder lists the default it replaced. A route serves one client API, so each of a model's API formats has its own order, including multi-provider custom models. Models providers list names the routes. A request's x-tokedex-provider-order header puts its providers first and wins over this order. See Catalogue reads.

Shell
# GET /control/v1/catalogue/groups
tdx models providers show --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Output fields (inside data)

FieldTypeDescription
providermasked-provider-orderThe groupId, publicModelId, clientDialectId, strategy, setBy, order [{providerId, providerName, ready, price}] and defaultOrder when an operator set the order.

Examples

Show the order a provider configuration tries its providers in:

Shell
tdx models providers show --id <group-id> --json

tdx models providers enable#

Enable a provider configuration.

Writes

Send {"enabled": true} for one reviewed Group id. See Catalogue changes and Catalogue republishing.

Shell
# PATCH /control/compiled/groups/:groupId
tdx models providers enable --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Output fields (inside data)

FieldTypeDescription
providermasked-groupThe reviewed provider configuration (source Group) after the change.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Preview enabling a provider configuration:

Shell
tdx models providers enable --id <group-id> --dry-run --json

tdx models providers disable#

Disable a provider configuration.

Writes

Send {"enabled": false} for one reviewed Group id. See Catalogue changes and Catalogue republishing.

Shell
# PATCH /control/compiled/groups/:groupId
tdx models providers disable --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Output fields (inside data)

FieldTypeDescription
providermasked-groupThe reviewed provider configuration (source Group) after the change.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Preview disabling a provider configuration:

Shell
tdx models providers disable --id <group-id> --dry-run --json

tdx models providers edit#

Edit enabled or listing state, or provider routing, of a provider configuration.

Writes

Save a source edit with at least one of --enabled, --listed, --provider-order and --default-order. --provider-order sends requests to the first provider it names and moves to the next when one fails; providers it leaves out follow in the default order (cheapest, then first-party, then A-Z). --default-order removes that order. The order is set per API format: a Group serves one client API, so set it on each of a model's Groups you want ordered, and read it back with models providers show. Custom routes accept provider order, and models custom visibility controls their discovery setting. A route with one provider has no order to set, and the gateway refuses --provider-order for it. A request's x-tokedex-provider-order header puts its providers first and wins over this order. See Catalogue changes and Catalogue republishing.

Shell
# PATCH /control/compiled/source-edits/:groupId
tdx models providers edit --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Optional flags

FlagTypeDefaultDescription
--enabledone of true, falseEnabled state.
--listedone of true, falseListing state.
--provider-orderstringCatalogue provider id to try next; repeat in order, first tried first. Repeatable.
--default-orderbooleanfalseRestore the default provider order.

Constraints

  • --enabled is required unless --listed or --provider-order or --default-order
  • At most one of --provider-order, --default-order

Output fields (inside data)

FieldTypeDescription
viewmasked-addresses-viewMasked compiled aliases (addresses) view after the write.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Keep a provider configuration serving but unlisted:

Shell
tdx models providers edit --id <group-id> --listed false --json

Send requests to one provider first, then the others:

Shell
tdx models providers edit --id <group-id> --provider-order <provider-id> --json

Restore the default provider order:

Shell
tdx models providers edit --id <group-id> --default-order --json

tdx models providers edits#

Manage stale provider configuration edits.

Remove saved provider configuration edits whose Group the catalogue no longer has.

tdx models providers edits remove#

Remove a saved provider configuration edit.

Writes

Remove a saved source edit. The gateway removes an edit only when the catalogue no longer has its Group, and refuses one for an existing Group with a usage error; to change a live one, use models providers edit. See Catalogue changes and Catalogue republishing.

Shell
# DELETE /control/compiled/source-edits/:groupId
tdx models providers edits remove --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Output fields (inside data)

FieldTypeDescription
viewmasked-addresses-viewMasked compiled aliases (addresses) view after the write.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Remove a stale provider configuration edit:

Shell
tdx models providers edits remove --id <group-id> --json

tdx models routers#

Ids that pick one of several models per request.

A router is an id that picks one of several models for each request (called a ModelGroup in gateway output). Members are catalogue models; an operator router may also name declared custom models: one on your own server serves only on its own protocol, one from a provider on any client API. set creates or replaces an operator router; edit changes a reviewed one.

tdx models routers list#

List routers.

Reads

There is no dedicated router read route; this reads the compiled aliases (addresses) view and prints only its routers (modelGroups in the gateway view). See Catalogue reads.

Shell
# GET /control/compiled/addresses
tdx models routers list [flags]

Output fields (inside data)

FieldTypeDescription
routersmasked-model-group[]Reviewed and operator routers (ModelGroups).
settingsobjectSaved operator router settings, including router and member provider selections.

Examples

List reviewed and operator routers:

Shell
tdx models routers list --json

tdx models routers set#

Create or replace an operator router.

Writes

Send the file's JSON object as the operator router (ModelGroup) definition; the gateway validates it. Each member is {"sourceGroupIds": {"<client-dialect>": "<group-id>"}} for a catalogue model or {"customModel": "<custom model public id>"} for a declared custom model; keep at least one catalogue member. A custom member on your own server serves only on its custom model's protocol and only for keys that name that custom model; one from a provider serves on any client API, for any key whose model scope admits it, and a fact-ranked strategy leaves it out. Set providers on the router and/or each catalogue member to a list of provider ids for Selected providers; omit providers for All providers. A router with custom members takes no router providers. An empty list permits no provider. Router, member, key and workspace limits intersect. Use set again to edit these settings; list shows the saved settings. See Catalogue changes and Catalogue republishing.

Shell
# PUT /control/compiled/model-groups/:modelGroupId
tdx models routers set --id <string> --body-file <path> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.
--body-filepathRouter (ModelGroup) JSON object file; regular file, or stdin with --body-file=-; UTF-8 JSON, at most 1 MiB.

Output fields (inside data)

FieldTypeDescription
viewmasked-addresses-viewMasked compiled aliases (addresses) view after the write.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Preview a router definition:

Shell
tdx models routers set --id <router-id> --body-file ./router.json --dry-run --json

tdx models routers preview#

Preview how an operator router would rank its members.

Reads

Ask the gateway to check a router definition as a set would and explain how its strategy orders the members, without saving or auditing it. This is a read, not a dry-run: it sends the request, including with --dry-run. The gateway derives it like a publication, which can take several seconds on a large catalogue, so the request deadline is 30 seconds; any failure, including a timeout or gateway 5xx, is reported as a failed read, never as an applied or possibly applied change. The file is validated before any profile or gateway access. See Catalogue reads.

Shell
# POST /control/compiled/model-groups/preview
tdx models routers preview --body-file <path> [flags]

Required flags

FlagTypeDefaultDescription
--body-filepathRouter (ModelGroup) JSON object file; regular file, or stdin with --body-file=-; UTF-8 JSON, at most 1 MiB.

Output fields (inside data)

FieldTypeDescription
membersmasked-member[]Each catalogue member's model and ranking variants, in the order sent.
customMembersmasked-member[]Each custom model member: its position, the model id it ranks as, and whether it serves now with the reason when not.
explanationmasked-explanationEach member's position, or why the strategy leaves it out.

Examples

Check a router before saving it:

Shell
tdx models routers preview --body-file ./router.json --json

tdx models routers remove#

Remove an operator router.

Writes

Remove an operator router; the gateway refuses while an alias points at it. See Catalogue changes and Catalogue republishing.

Shell
# DELETE /control/compiled/model-groups/:modelGroupId
tdx models routers remove --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Output fields (inside data)

FieldTypeDescription
viewmasked-addresses-viewMasked compiled aliases (addresses) view after the write.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Remove an operator router:

Shell
tdx models routers remove --id <router-id> --json

tdx models routers edit#

Edit a reviewed router.

Writes

Save an enabled or listing edit for a reviewed router, with at least one of --enabled and --listed. See Catalogue changes and Catalogue republishing.

Shell
# PATCH /control/compiled/model-group-edits/:modelGroupId
tdx models routers edit --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Optional flags

FlagTypeDefaultDescription
--enabledone of true, falseEnabled state.
--listedone of true, falseListing state.

Constraints

  • --enabled is required unless --listed

Output fields (inside data)

FieldTypeDescription
viewmasked-addresses-viewMasked compiled aliases (addresses) view after the write.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Disable a reviewed router:

Shell
tdx models routers edit --id <router-id> --enabled false --json

tdx models routers edits#

Manage stale reviewed router edits.

Remove saved reviewed router edits whose ModelGroup the catalogue no longer has.

tdx models routers edits remove#

Remove a saved reviewed router edit.

Writes

Remove a saved reviewed router edit. The gateway removes an edit only when the catalogue no longer has its ModelGroup, and refuses one for an existing ModelGroup with a usage error; to change a live one, use models routers edit. See Catalogue changes and Catalogue republishing.

Shell
# DELETE /control/compiled/model-group-edits/:modelGroupId
tdx models routers edits remove --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Output fields (inside data)

FieldTypeDescription
viewmasked-addresses-viewMasked compiled aliases (addresses) view after the write.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Remove a stale router edit:

Shell
tdx models routers edits remove --id <router-id> --json

tdx models routers strategies#

Ways a router can pick its model.

The ways a router can pick its model, shared by routers: list, explain, create, replace and remove operator strategies that order router members.

tdx models routers strategies list#

List operator strategies.

Reads

Read the strategy language, its limits and saved operator definitions. See Catalogue reads.

Shell
# GET /control/compiled/model-group-strategies
tdx models routers strategies list [flags]

Output fields (inside data)

FieldTypeDescription
strategiesmasked-strategy-viewMasked strategy language, limits and definitions.

Examples

List operator strategies:

Shell
tdx models routers strategies list --json

tdx models routers strategies explain#

Explain an operator strategy.

Reads

Explain how a saved strategy orders the members of each router using it, or only --router. See Catalogue reads.

Shell
# GET /control/compiled/model-group-strategies/:strategyId/explain
tdx models routers strategies explain --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Optional flags

FlagTypeDefaultDescription
--routerstringOnly explain this router (ModelGroup id).

Output fields (inside data)

FieldTypeDescription
explanationsmasked-explanation[]Per router availability and member order.

Examples

Explain one router:

Shell
tdx models routers strategies explain --id <strategy-id> --router <router-id> --json

tdx models routers strategies set#

Create or replace an operator strategy.

Writes

Send the file's JSON object as the strategy definition; the gateway validates it. See Catalogue changes and Catalogue republishing.

Shell
# PUT /control/compiled/model-group-strategies/:strategyId
tdx models routers strategies set --id <string> --body-file <path> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.
--body-filepathStrategy tree JSON object file; regular file, or stdin with --body-file=-; UTF-8 JSON, at most 1 MiB.

Output fields (inside data)

FieldTypeDescription
strategiesmasked-strategy-viewMasked strategy language, limits and definitions.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Preview a strategy definition:

Shell
tdx models routers strategies set --id <strategy-id> --body-file ./strategy.json --dry-run --json

tdx models routers strategies remove#

Remove an operator strategy.

Writes

Remove a saved operator strategy. See Catalogue changes and Catalogue republishing.

Shell
# DELETE /control/compiled/model-group-strategies/:strategyId
tdx models routers strategies remove --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Output fields (inside data)

FieldTypeDescription
strategiesmasked-strategy-viewMasked strategy language, limits and definitions.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Remove an operator strategy:

Shell
tdx models routers strategies remove --id <strategy-id> --json

tdx models aliases#

Model ids callers send, per client API.

An alias is a model id callers send, and what it points at (a provider configuration or a router), per client API; it is not the id sent to the provider. The gateway calls these addresses. List, set, restore and preview them.

tdx models aliases list#

List aliases.

Reads

Read the compiled addresses view: reviewed sources, saved intent, effective aliases, routers, problems and serving reach. See Catalogue reads.

Shell
# GET /control/compiled/addresses
tdx models aliases list [flags]

Output fields (inside data)

FieldTypeDescription
sourcesmasked-source[]Reviewed provider configurations (source Groups).
intentmasked-intentSaved operator intent.
aliasesmasked-address[]Effective aliases (addresses) per client dialect.
routersmasked-model-group[]Reviewed and operator routers (ModelGroups).
problemsstring[]Saved entries disabled by catalogue references.
servingmasked-reachHow reviewed provider configurations are reached.

Examples

List effective aliases and problems:

Shell
tdx models aliases list --json=aliases,problems

tdx models aliases set#

Point an alias at a provider configuration or router.

Writes

Point an alias at exactly one of --group, --router or --release. --release clears the target and requires --replaces; a released alias cannot set --listed. See Catalogue changes and Catalogue republishing.

Shell
# PATCH /control/compiled/addresses
tdx models aliases set --client-dialect <string> --address <string> [flags]

Required flags

FlagTypeDefaultDescription
--client-dialectstringClient API (client dialect) id.
--addressstringAlias: the model id callers send.

Optional flags

FlagTypeDefaultDescription
--groupstringProvider configuration (catalogue Group) id.
--routerstringRouter (ModelGroup) id.
--releasebooleanfalseRelease the alias.
--replacesstringReviewed holder id.
--listedone of true, falseListing state.

Constraints

  • Exactly one of --group, --router, --release
  • --release requires --replaces
  • At most one of --release, --listed

Output fields (inside data)

FieldTypeDescription
viewmasked-addresses-viewMasked compiled aliases (addresses) view after the write.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Preview an alias:

Shell
tdx models aliases set --client-dialect <dialect> --address <alias> --group <group-id> --dry-run --json

tdx models aliases remove#

Restore a reviewed default alias.

Writes

Remove the saved alias entry, restoring the reviewed default. See Catalogue changes and Catalogue republishing.

Shell
# PATCH /control/compiled/addresses
tdx models aliases remove --client-dialect <string> --address <string> [flags]

Required flags

FlagTypeDefaultDescription
--client-dialectstringClient API (client dialect) id.
--addressstringAlias: the model id callers send.

Output fields (inside data)

FieldTypeDescription
viewmasked-addresses-viewMasked compiled aliases (addresses) view after the write.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Restore a reviewed default:

Shell
tdx models aliases remove --client-dialect <dialect> --address <alias> --json

tdx models aliases preview#

Preview how an alias change would reach provider configurations.

Reads

Ask the gateway how reviewed provider configurations would be reached after one alias change, with exactly one of --group, --router, --release or --restore. The gateway derives the result without saving or auditing it. This is a read, not a dry-run: it sends the request, including with --dry-run. The gateway derives it like a publication, which can take several seconds on a large catalogue, so the request deadline is 30 seconds; any failure, including a timeout or gateway 5xx, is reported as a failed read, never as an applied or possibly applied change. --restore cannot set --replaces or --listed. Input is validated before any profile or gateway access. See Catalogue reads.

Shell
# POST /control/compiled/addresses/preview
tdx models aliases preview --client-dialect <string> --address <string> [flags]

Required flags

FlagTypeDefaultDescription
--client-dialectstringClient API (client dialect) id.
--addressstringAlias: the model id callers send.

Optional flags

FlagTypeDefaultDescription
--groupstringProvider configuration (catalogue Group) id.
--routerstringRouter (ModelGroup) id.
--releasebooleanfalseRelease the alias.
--replacesstringReviewed holder id.
--listedone of true, falseListing state.
--restorebooleanfalsePreview restoring the reviewed default.

Constraints

  • Exactly one of --group, --router, --release, --restore
  • --release requires --replaces
  • At most one of --release, --listed
  • At most one of --restore, --listed
  • At most one of --restore, --replaces

Output fields (inside data)

FieldTypeDescription
memberOnlymasked-reach[]Provider configurations reached only as router members or fallbacks.
unaddressedstring[]Provider configurations no alias would reach.

Examples

Preview reach before saving:

Shell
tdx models aliases preview --client-dialect <dialect> --address <alias> --router <router-id> --json

tdx models custom#

Add models from a provider or your own server.

Add, list, edit, qualify and remove custom models. One gateway model ID can contain a declaration for each of several providers. A declaration names the provider and its upstream model ID: it is served through the provider's own API and key, under the provider's id, as soon as it is saved, and its calls are recorded unpriced until it has a price. A model on your own server names its base URL and native protocol (Chat Completions, stateless Responses or conservative Messages); it is pending and not served until a qualification that a person approves, with spend consent, passes. upstreamModelId is sent unchanged. Aliases never point at a custom model, but an operator router may list one: on its own protocol for a model on your own server, on any client API for a model from a provider. Declarations name where the gateway reads a credential, never its value.

tdx models custom providers#

List the providers a model can be added from.

Reads

Read every catalogue provider with the APIs a model added from it can use (protocols, empty when it can use none) and any reason the reviewed binding or credentials are unavailable. Requires catalogue.read and credentials.read. No credential names or values are returned. Without --workspace-id, workspace-dependent eligibility is provisional. No provider calls.

Shell
# GET /control/compiled/custom-model-providers
tdx models custom providers [flags]

Optional flags

FlagTypeDefaultDescription
--workspace-idstringOptional final workspace scope for provider key eligibility.

Output fields (inside data)

FieldTypeDescription
providersprovider-choice[]ProviderId, label, protocols, workspaceDependent and optional unavailableReason.

Examples

List the providers a model can be added from:

Shell
tdx models custom providers --json

tdx models custom pools#

List configured pools for server models.

Reads

List dedicated server pools configured on the gateway. Each choice shows its ID, origin, native protocol and availability. The full base URL and protocol must match the pool configuration when you select it in a model declaration. Requires catalogue.read and credentials.read. No provider calls.

Shell
# GET /control/compiled/custom-model-pools
tdx models custom pools [flags]

Optional flags

FlagTypeDefaultDescription
--workspace-idstringOptional workspace for pool eligibility.

Output fields (inside data)

FieldTypeDescription
poolscustom-model-pool[]Id, origin-only baseUrl, protocol, available and optional unavailableReason.

Examples

List configured server pools:

Shell
tdx models custom pools --json

tdx models custom list#

List custom model declarations.

Reads

Read operator custom model declarations; requires catalogue.read and credentials.read. Valid entries show publicModelId, origin-only baseUrl (no private path), upstreamModelId, protocol, optional messages and price, listed and upstreamAuth (environment, custody, provider, pool or none). A dedicated pool also shows its ID. A model from a provider also shows provider and optional inputs; a model on your own server shows its server-owned qualification. Credential names are not shown. Qualification status is pending, testing, failed or enabled; it is not the runtime serving status. Isolated malformed entries instead show publicModelId, entryIndex, entryRevision and problem {code,message}, without declaration fields. See Catalogue reads.

Shell
# GET /control/compiled/custom-models
tdx models custom list [flags]

Output fields (inside data)

FieldTypeDescription
customModelsmasked-custom-model-or-invalid-entry[]Provider, protocol, revision, optional messages, price and qualification for each declaration, or the invalid declaration’s entry index, entry revision and problem.

Examples

List custom model declarations:

Shell
tdx models custom list --json

tdx models custom status#

Inspect runtime status of custom models.

Reads

Read each custom model's runtime status: serving or disabled, with an optional problem {code,message}. Pending, stale or invalid declarations are disabled; this is not qualification evidence or an activation command. See Catalogue reads.

Shell
# GET /control/v1/catalogue/custom-models
tdx models custom status [flags]

Output fields (inside data)

FieldTypeDescription
customModelsmasked-custom-model-status[]PublicModelId, the provider if hosted, status (serving or disabled) and optional problem {code,message}.

Examples

Inspect custom model status:

Shell
tdx models custom status --json

tdx models custom create#

Add a model from a provider, or from a file.

Writes

With --provider, add a model a catalogue provider serves that the catalogue does not list: --provider-model is the provider's id for it and --id the id clients send. It is served through the provider's API and key, under the provider's id, as soon as it is saved; no test is needed. Create another provider declaration with its own price under the same gateway model ID to add a fallback. Client APIs use the provider's reviewed projections. The serving provider reports approved translation losses, and strict requests require a lossless route. --api picks the provider API where it has several. A call to a Messages provider needs an output limit on the request or a reviewed or configured limit. Set max_tokens on Messages, max_completion_tokens (or max_tokens) on Chat Completions, or max_output_tokens on Responses. Use --max-output-tokens to configure a default. Before saving, it reads models custom providers and stops, saying what to change, on an unknown or unavailable provider, a missing or unserved --api, or a misplaced --max-output-tokens. Give each hosted declaration an explicit price with --free or both --price-input and --price-output. With rates, you can add --price-cached-input, --price-cache-write and --price-cache-write-long. A model the catalogue already serves on that provider is refused, naming the catalogue model. With --body-file, the file is one declaration object: either the same model from a provider ({"publicModelId", "provider", "upstreamModelId", "price"} with optional protocol, messages {"maxOutputTokens"}, inputs ["image","file"] and listed), or a model on your own server: publicModelId, baseUrl, upstreamModelId and protocol (openai.chat-completions, openai.responses or anthropic.messages). A Messages server you run also requires messages {"apiVersion": "2023-06-01", "maxOutputTokens": 16384}. Set price to {"input": "1", "output": "2"} or {"free": true}. Input, output and optional cachedInput, cacheWrite and cacheWriteLong are nonnegative decimal strings in USD per million tokens with up to six decimal places. Choose explicit free if both input and output rates are zero. A new model on your own server also needs a price. A cache rate left out is charged at the input rate, an hour-long write at the cache write rate. The first declaration defaults to listed, and adding a provider inherits the model's listing if listed is omitted. Use models custom visibility to change it. Optional credential is one of {"environment": NAME}, {"custody": NAME}, {"pool": ID}, or {"provider": ID}. Use models custom pools for dedicated pool IDs. A provider credential uses the provider's key or pool at its exact reviewed API address. baseUrl must be http(s) without userinfo, query or fragment; other URL, credential and rate rules remain the gateway's. A model on your own server is pending, not served, until qualification passes; never submit qualification: it is server-owned. Replies show origin-only baseUrl, protocol, optional provider, inputs, messages and price, listed, upstreamAuth and qualification; dry-run stays offline and shows the requested declaration without server evidence. See Catalogue changes and Catalogue republishing. Example declaration: {"publicModelId": "synthetic/endpoint", "baseUrl": "https://synthetic.invalid", "upstreamModelId": "synthetic-upstream", "protocol": "openai.chat-completions", "price": {"input": "1", "output": "2"}}.

Shell
# POST /control/compiled/custom-models
tdx models custom create [flags]

Optional flags

FlagTypeDefaultDescription
--providerstringCatalogue provider id from models custom providers: the model is served through its API and key.
--provider-modelstringThe provider's own model id, sent to it unchanged.
--idstringGateway model id: the id clients send.
--apione of chat-completions, responses, messages, gemini, bedrock-converseThe provider API to call when more than one is available.
--max-output-tokensintegerSet a default output limit for calls to a Messages provider, from 1 to 1000000.
--inputsstringInputs beyond text and tools it accepts: image, file or image,file.
--price-inputstringInput USD per million tokens, a decimal string such as 0.60.
--price-outputstringOutput USD per million tokens, a decimal string such as 2.50.
--price-cached-inputstringCached input (a prompt-cache read) USD per million tokens; without it, charged at --price-input.
--price-cache-writestringPrompt-cache write USD per million tokens; without it, charged at --price-input.
--price-cache-write-longstringHour-long prompt-cache write USD per million tokens; without it, charged at --price-cache-write.
--freebooleanfalseRecord its calls as free.
--unlistedbooleanfalseCreate an unlisted model. Added providers inherit visibility when omitted.
--body-filepathDeclaration file, in place of the flags above; regular file, or stdin with --body-file=-; UTF-8 JSON, at most 1 MiB.

Constraints

  • Exactly one of --provider, --body-file
  • --provider-model requires --provider
  • --provider requires --provider-model
  • --id requires --provider
  • --provider requires --id
  • --api requires --provider
  • --max-output-tokens requires --provider
  • --inputs requires --provider
  • --unlisted requires --provider
  • --free requires --provider
  • --price-input requires --price-output
  • --price-output requires --price-input
  • --price-input requires --provider
  • At most one of --free, --price-input
  • --price-cached-input requires --price-input
  • --price-cache-write requires --price-input
  • --price-cache-write-long requires --price-input
  • --price-input is required unless --free or --body-file

Output fields (inside data)

FieldTypeDescription
customModelmasked-custom-modelPublicModelId, optional provider, origin-only baseUrl, upstreamModelId, protocol, price, optional inputs and messages, listed, upstreamAuth and, on your own server, server-owned pending qualification.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Preview a model from a provider:

Shell
tdx models custom create --provider <provider> --provider-model <provider-model-id> --id <gateway-model-id> --price-input 1 --price-output 2 --dry-run --json

Preview a custom model declaration:

Shell
tdx models custom create --body-file ./custom-model.json --dry-run --json

tdx models custom edit#

Replace one custom model declaration.

Writes

Edit one declaration selected by model ID and provider. Use models custom list to find the current revision. Include a price when editing a priced hosted model. An existing unpriced hosted model can keep its current pricing or receive a price. Use models custom visibility to change listing for a provider-hosted model. See Catalogue changes and Catalogue republishing.

Shell
# PUT /control/compiled/custom-models/:publicModelId
tdx models custom edit --id <string> --revision <string> --body-file <path> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.
--revisionstringCurrent declaration revision from models custom list.
--body-filepathComplete replacement declaration; regular file, or stdin with --body-file=-; UTF-8 JSON, at most 1 MiB.

Optional flags

FlagTypeDefaultDescription
--providerstringProvider to edit when several serve the model.

Output fields (inside data)

FieldTypeDescription
customModelmasked-custom-modelThe updated declaration.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Preview updating one provider:

Shell
tdx models custom edit --id <public-model-id> --provider <provider-id> --revision <revision> --body-file ./custom-model.json --dry-run --json

tdx models custom visibility#

Show or hide a provider-hosted model in discovery.

Writes

Update discovery visibility for all providers under one model ID. Authorized callers can invoke a hidden model by ID. See Catalogue changes and Catalogue republishing.

Shell
# PATCH /control/compiled/custom-models/:publicModelId
tdx models custom visibility --id <string> --listed <true|false> --expected-listed <true|false> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.
--listedone of true, falseNew listing state.
--expected-listedone of true, falseCurrent listing state from models custom list.

Output fields (inside data)

FieldTypeDescription
customModelmasked-custom-model-visibilityThe model ID and its new listed state.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Hide a model from discovery:

Shell
tdx models custom visibility --id <public-model-id> --listed false --expected-listed true --json

tdx models custom qualify#

Qualify a custom model with human approval.

Writes

Requires explicit --consent. Opens dashboard device approval when no fresh human qualification session exists. Admin keys, API keys and master keys cannot substitute for browser human approval. Fresh approval lasts at most ten minutes and ends on browser session expiry/revocation. Fixed suite: at most four calls of 128 output tokens, on a temporary model-restricted API key with total budget equal to the explicit cap (0 < capUsd <= 0.10). Reports the exact accepted run, testing and then enabled or failed. Starts are never retried; inspect dashboard state after an ambiguous acknowledgement. Transport interruption is not cancellation. Dry-run stays offline.

Shell
# POST /control/compiled/custom-models/:publicModelId/qualification
tdx models custom qualify <publicModelId> <command> --cap-usd <usd> --workspace <string> [flags]

Arguments

ArgumentTypeDescription
publicModelIdstringRequired. Custom model public ID.

Required flags

FlagTypeDefaultDescription
--cap-usdusdExplicit total budget: more than USD 0, at most USD 0.10.
--workspacestringWorkspace charged by the temporary restricted API key.

Optional flags

FlagTypeDefaultDescription
--providerstringProvider to qualify when several serve the model.
--consentbooleanfalseApprove at most four calls, each at most 128 output tokens, with total budget equal to cap-usd.

Output fields (inside data)

FieldTypeDescription
publicModelIdstringRequested model.
providerstringThe qualified provider, when applicable.
runIdstring|nullExact accepted run ID.
statusstringTesting, enabled or failed.
failurestring|nullSafe qualification failure category.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

tdx models custom qualify cancel#

Cancel one exact accepted qualification run.

Writes

Requires the human-approved qualification session and the exact accepted --run-id. Never cancels a guessed current run; transport abort is not cancellation. Dry-run sends nothing.

Shell
# POST /control/compiled/custom-models/:publicModelId/qualification/cancel
tdx models custom qualify cancel <publicModelId> --run-id <string> [flags]

Arguments

ArgumentTypeDescription
publicModelIdstringRequired. Custom model public ID.

Required flags

FlagTypeDefaultDescription
--run-idstringExact accepted qualification run ID.

Optional flags

FlagTypeDefaultDescription
--providerstringProvider whose run to cancel.

Output fields (inside data)

FieldTypeDescription
publicModelIdstringRequested model.
providerstringThe provider selected for cancellation, when given.
runIdstringExact cancellation target.
cancelledbooleanGateway acknowledged cancellation.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

tdx models custom remove#

Remove a custom model declaration.

Writes

Remove one declaration by public model ID and provider if the model has several providers. See Catalogue changes and Catalogue republishing.

Shell
# DELETE /control/compiled/custom-models/:publicModelId
tdx models custom remove --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringPublic resource id; never a credential.

Optional flags

FlagTypeDefaultDescription
--providerstringProvider to remove when several serve the model.
--revisionstringRequire this current declaration revision.

Output fields (inside data)

FieldTypeDescription
removedstringRemoved public model id.
providerstringProvider selected for removal, when given.
previewwrite-preview|nullRequested change, unchecked by the gateway; null after execution.

Examples

Remove a custom model:

Shell
tdx models custom remove --id <public-model-id> --json