Administration

Models and pricing

Publish models, configure integer pricing, and enable safe automatic routing.

Deeplinq does not maintain an independent provider-synchronized model table. Its model catalog is the governed intersection of connector capacity, runtime pricing, and organization grants.

Pricing units

Machine API prices use integer micro-USD per one million tokens:

  • 1,000,000 micro-USD = USD 1;
  • input_micro_usd_per_mtok prices one million input tokens;
  • output_micro_usd_per_mtok prices one million output tokens;
  • margin_pct is applied after provider token cost;
  • tier is economy, standard, or frontier.

The browser console presents exact decimal USD-per-million values. The machine API uses integers so ledger arithmetic never depends on floating point.

Add or replace a price

curl --user "$ADMIN_USER:$ADMIN_PASSWORD" \
  -H "Content-Type: application/json" \
  -X PUT "$BASE_URL/v1/admin/pricing/claude-sonnet-4-5" -d '{
  "provider":"anthropic",
  "input_micro_usd_per_mtok":3000000,
  "output_micro_usd_per_mtok":15000000,
  "margin_pct":20,
  "tier":"standard"
}'

This example represents USD 3 per million input tokens and USD 15 per million output tokens before the 20% margin. Verify current upstream prices yourself; provider pricing changes independently from Deeplinq.

The next request uses the committed price. Repricing does not rewrite historical ledger entries.

Cost model

For ordinary uncached usage:

provider cost =
  input tokens × input price / 1,000,000
  + output tokens × output price / 1,000,000

tenant debit = provider cost × (100 + margin_pct) / 100

Prompt-cache token classes are priced with provider-family multipliers when real cache usage is reported. Preflight reservations remain conservative at the full input rate, then settle against actual usage.

Partial provider usage can still be charged if a provider fails after reporting tokens. Settlement is idempotent by request ID.

List and retire

GET    /v1/admin/pricing
DELETE /v1/admin/pricing/{model}

Deleting the row stops new requests for that model at billing preflight. It does not erase connector configuration, organization grants, or historical usage.

Automatic routing

When a request specifies "model":"auto", Deeplinq:

  1. classifies prompt complexity with deterministic heuristics;
  2. optionally refines the classification with a router connector;
  3. selects the cheapest entitled model in the chosen tier.

The router never expands an organization's grants. Grant the special auto model and suitable concrete models before using it.

Use tiers intentionally:

TierIntended use
economyLow-cost extraction, classification, and simple chat
standardGeneral application work
frontierHighest-capability and complex reasoning workloads

Troubleshooting

SymptomCheck
Model absent from /v1/modelsConnector enabled, model list match, organization grant
model_not_pricedAdd the runtime pricing row
model_not_permittedAdd the organization grant
Provider rejects model nameConnector models and request ID must use the real upstream identifier
auto has no candidateGrant concrete models in the required tier and verify their prices

Log X-Request-ID with every failure; it joins provider, audit, and ledger evidence.

On this page