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.
Deploy a Hugging Face model in one step
veri deploy is the shortest path from a Hugging Face repo, or a finished training job, to a live endpoint. It accepts a bare repo id, a pasted huggingface.co link, or a completed job id:
lora_rank deploys the same way: Veri serves the merged weights it keeps next to the adapter. A job id skips the cache prompt below (the weights already live in Veri storage).
In a terminal, a Hugging Face deploy asks whether to cache the model in Veri storage for faster starts next time. Caching saves the downloaded weights to your model library in the background while the deployment serves; once the cached copy is ready, every later deploy of the same repo starts from Veri storage automatically instead of pulling from the Hugging Face hub.
Outside a terminal (scripts, CI) the prompt is skipped and caching stays off unless
--cache is explicit.
veri deploy is sugar for veri deployments create --from-hf (a repo) or --model (a job id); every other lifecycle command below applies to the resulting deployment.
Commands
Create from a config
kind = "deploy". See the config schema.
Flags passed alongside a config override the file’s values the same way --set does (the flag wins). --from-hf <repo> and --from-model <model-id> replace deployment.model and pin deployment.source (huggingface / custom_model); --gpu-count N replaces resources.gpu_count (GPUs per replica, default 1); --name, --gpu-type, and the replica and scaling flags below work the same way.
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. A workspace can run 2 active deployment replicas on the Free plan (4 on Pro, see Plans): a create, wake or update that would boot more fails with
429 (ACTIVE_DEPLOYMENT_LIMIT).
Smoke-test with chat
The fastest way to confirm a deployment is healthy:
For programmatic chat, use
https://api.veri.studio/v1/deployments/{id} as the OpenAI-compatible base_url with your Veri API key. The deployment’s endpoint_url (visible in veri deployments get) is that same platform URL with /chat/completions already appended, for direct HTTP calls.
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: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). When some replicas of a fleet die, the deployment keeps serving on the rest at reduced capacity while Veri launches replacements; replacements back off (the first at once, then 10, 20, 40 and 80 seconds after the previous) and pause after 5 in a row until you update the deployment. If the last box dies after the deployment has served, it shows provisioning (with failure_code replica_lost) while Veri replaces it, up to --self-heal-attempts times (default 3); once those are used up, a --min-replicas 0 deployment parks and any other deployment fails. See Self-healing.
Autoscaling
Withmin-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. When scaling down, replicas that are still loading (not yet serving) are removed first; a serving replica is only drained once there is no loading replica left to cancel.
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 idle window counts from when the deployment starts serving or from its last request (not from create or wake), and a park waits for in-flight requests to finish and for a fresh engine-metrics sample before terminating anything. Turning scale-to-zero on, or changing the window, starts a fresh idle window. 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:
veri deployments get 5b0e7c2d9a14 until it’s serving. Raising the floor also wakes it: veri deployments update 5b0e7c2d9a14 --min-replicas 1 on a parked deployment wakes it immediately. A wake (explicit, request-triggered, or from raising --min-replicas) relaunches min_replicas boxes (at least one; the autoscaler grows the fleet again if traffic returns) and is subject to the workspace active-replica limit, like a create: with no headroom it returns 429 with code ACTIVE_DEPLOYMENT_LIMIT and the deployment stays parked, so stop or scale down something else first. Optionally set --idle-delete-after N to auto-stop a deployment that stays parked with no traffic for N days.
A wake that fails (for example no GPU capacity) puts the deployment back to scaled_to_zero with the reason in its error, and the next wake waits out a backoff (1 minute, doubling up to 1 hour). With --min-replicas 0 the next request after the backoff retries it; with --min-replicas 1 or more Veri retries the wake itself once the backoff has passed, so the floor comes back without traffic (and as soon as there is room if the workspace active-replica limit is full). After 3 failed wakes in a row Veri stops retrying on its own and says so in error. veri deployments wake retries immediately whatever the count, and so does veri deployments update with --min-replicas of 1 or more.
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. A flag you leave out keeps its current setting; --clear-scale-to-zero-window and --clear-idle-delete-after put those two settings back to their defaults (each cannot be combined with its value flag). Clearing the window on a --min-replicas 0 deployment starts a fresh idle window, like changing it.
- Parked (
scaled_to_zero): raising--min-replicasto 1 or more wakes the deployment immediately and boots the new floor, likeveri deployments wake. It is checked against the workspace active-replica limit first: if the new floor does not fit,updatefails with429(ACTIVE_DEPLOYMENT_LIMIT) and nothing changes. Other settings are saved and apply from the next wake. - First boot (
provisioning): scaling changes apply once the deployment is serving; extra replicas launch after the first one serves.updateprints a note saying so. waking: no second wake; the new settings apply to the boot in progress, or once it serves.--self-heal-attemptsis not a boot setting: it applies at once in every status, the next time the deployment’s last box dies while serving (and any update restarts the replacement count). An update that only changes it prints that instead of the boot note.
Session affinity
- With
--session-id <key>(or the OpenAIuserfield, which sets theX-Veri-Session-Idheader), 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.
--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 or resume; bring it back by creating a new one. Running stop again on an already stopped (or failed) deployment is a no-op that returns the deployment unchanged. stop is not a pause. For a deployment you’ll come back to, prefer --min-replicas 0 and let it park instead.
Once a deployment is stopped (or failed), veri deployments delete <id> removes it and its request history for good. Deletion waits for the final billing settlement, so if you delete within a minute of stopping you may be asked to retry shortly.
start, rollback, and history are Phase-2. Each depends on backend work that is not yet shipped.Inspect traffic
total_requests, total_prompt_tokens, total_completion_tokens, uptime_seconds) and past-24-hour stats (avg_latency_ms, latency percentiles, error_rate); eval calls are excluded. JSON output is dict-shaped (suitable for jq):
--trace-bodies — see the
traces guide):
List, get
list shows your deployments, most recent first. Filter and paginate with the flags below.
A deployment holds GPU boxes while it is
provisioning or serving. A queued or waking deployment moves to provisioning as soon as its first box launches, and a scaled_to_zero one holds none. To catch everything holding or about to hold a GPU, list without --status and scan the status column.
The table (and --format csv) shows id, name, status, replicas, model, endpoint_url, cost_per_hour_usd and self_heal_attempts. With --format json, list and get also return the scaling settings (min_replicas, max_replicas, concurrency_target, scale_to_zero_window_seconds and idle_delete_after_days, where null means the default: a 3600-second idle window, never auto-stop), failure_code, and the wake state of a scale-to-zero deployment: last_wake_at, wake_failure_count and next_wake_not_before (see the deployment object). When wakes have been failing, the table output adds a line under the table:
Exit codes
What’s next
Deploy quickstart demo
Guided walkthrough: create, chat, stop.
The run verb
Deploy from a TOML config.

