Skip to main content
The veri deployments group creates and manages inference endpoints. Each deployment exposes an OpenAI-compatible /chat/completions API backed by a Veri-trained or HuggingFace model.

Commands

Create from a config

The config must declare kind = "deploy". See the config schema.

Create inline

Two mutually exclusive modes — deploy a training job’s output, or deploy a HuggingFace model directly.
See Replicas, autoscaling, and scale to zero for how the bounds behave.

Smoke-test with chat

The fastest way to confirm a deployment is healthy:
The CLI calls the OpenAI-compatible endpoint with a single user message and prints the assistant’s reply. For programmatic chat, point any OpenAI-compatible client at the deployment’s endpoint_url (visible in veri deployments get).

Replicas, autoscaling, and scale to zero

One endpoint can be served by several GPU boxes behind a load-balancing router. The replica bounds decide how the fleet behaves:
The deployment reports serving once at least one replica is up. list and get show the fleet as ready/desired (for example 2/3 while a scale-up is still provisioning). A replica that dies is replaced automatically; the deployment keeps serving at reduced capacity in the meantime.

Autoscaling

With min-replicas below max-replicas, the fleet targets --concurrency-target in-flight requests per replica (default 8). Scale-up is fast (within about a minute of sustained load); scale-down is deliberately slow (about 15 minutes of sustained low load per step) because a wrong scale-down costs a multi-minute GPU boot. Lower the target for latency-sensitive chat; raise it for batch throughput.

Scale to zero

With --min-replicas 0, a deployment idle past --scale-to-zero-window (default 1 hour) parks: replicas terminate, billing stops, status becomes scaled_to_zero. The next chat request wakes it. While the GPU boots (a few minutes), the server answers that request with 503, a Retry-After header, and error code deployment_waking. The SDK and CLI absorb this for you: veri deployments chat prints a “waking from zero” note and waits for the answer, and the Python SDK’s chat() retries in the background until the deployment is up (see chat and waking for the knobs). Only raw HTTP clients need to handle the 503 themselves. To hide the cold start from your users, pre-warm on a predictive signal instead:
Then poll veri deployments get dep_abc until it’s serving. Optionally set --idle-delete-after N to auto-stop a deployment that stays parked with no traffic for N days.

Change scaling on a live deployment

update returns immediately with the new desired state; the fleet converges in the background (watch the replicas column approach desired/desired). Model, GPU, and provider are immutable — recreate the deployment to change those.

Session affinity

  • With --session-id <key> (or the OpenAI user field, which sets the X-Veri-Session-Id header), a conversation is pinned to one replica so its KV cache stays warm across turns. The same key always lands on the same replica; if that replica is unavailable, the request fails over to another.
  • Without a session key, requests go to the least-loaded replica.
Reuse the same --session-id for every turn of a conversation to keep it on its cache-warm replica.

Stop to end billing

stop ends billing and is final — a stopped deployment can’t wake; bring it back by creating a new one. For a deployment you’ll come back to, prefer --min-replicas 0 and let it park instead.
start, rollback, and history are Phase-2. Each depends on backend work that is not yet shipped.

Inspect traffic

Returns aggregate counters: total_requests, total_prompt_tokens, total_completion_tokens, avg_latency_ms, error_rate, uptime_seconds. JSON output is dict-shaped (suitable for jq):
Recent requests:

List, get

list shows your deployments, most recent first. Filter and paginate with the flags below.
A deployment bills while either serving or unhealthy, so to catch everything holding a GPU, list both (or list without --status and scan the status column).

Exit codes

What’s next

Evaluate the endpoint

Run scorers against your deployed model.

The run verb

Deploy from a TOML config.