/v1/deployments/*. All endpoints require Bearer token auth (Authorization: Bearer vk_...).
Endpoints
POST /v1/deployments
Create a deployment from a base HF model or a completed training job. Request schema:
Validation: When
source=training_job, the job must exist, belong to you, and be completed. Otherwise 404 or 400.
Response (201):
endpoint_url populates when status reaches serving.
GET /v1/deployments
List your deployments. Filter bystatus (queued / provisioning / serving / unhealthy / scaled_to_zero / waking / stopped / failed).
PaginatedList[DeploymentResponse].
GET /v1/deployments/
Single deployment. Same shape as create response, with timestamps populated as it runs.PATCH /v1/deployments/
Partial update of the scaling settings on a live deployment. Mutable fields:num_replicas, min_replicas, max_replicas, concurrency_target, scale_to_zero_window_seconds, idle_delete_after_days. Anything else (model, gpu, source, engine, provider) is immutable and fails validation.
Returns the updated deployment immediately with the new desired state; the control plane converges the replica fleet in the background. Compare ready_replicas (observed) against num_replicas (desired) to watch convergence.
GET /v1/deployments//replicas
List the replicas (GPU boxes) behind a deployment: per-replica status, placement, and the latest engine snapshot (in-flight requests, KV-cache usage). Use it to pick areplica_id for the drain endpoint below.
POST /v1/deployments//replicas//drain
Retire one specific replica of aserving deployment. Returns 202 with the replica, now draining (or stopped when it was still booting and was cancelled outright). A replica already taking traffic finishes its in-flight requests before the box is terminated, bounded by the drain timeout.
Two modes:
409): the deployment must be serving; the replica must not already be draining, stopped, or failed; and in default mode the drain may not shrink the fleet below max(min_replicas, 1) or retire the last replica actually serving traffic (use replace=true for those).
While autoscaling is armed (min_replicas < max_replicas) the autoscaler may scale back up after a default-mode drain if load warrants it; that is expected. Lower max_replicas to hold a smaller fleet.
POST /v1/deployments//wake
Pre-warm ascaled_to_zero deployment. Returns 202 with the deployment; idempotent (a no-op if it’s already up or booting). A chat request to a parked deployment also wakes it: raw HTTP clients receive 503 with a Retry-After header and error code deployment_waking while the GPU boots, while the Python SDK’s chat() retries through the wake automatically (see the chat endpoint). Fire wake early on a predictive signal to hide the cold start entirely.
POST /v1/deployments//stop
Transition tostopped. A final billing tick settles the partial-hour spend. Returns the updated deployment.
POST /v1/deployments//chat/completions
OpenAI-compatible. See OpenAI compatibility for the supported subset of fields. Request:Waking from zero
A chat request to ascaled_to_zero deployment triggers its wake and answers 503 with a Retry-After header while the GPU boots:
Retry-After seconds. The Python SDK retries for you: chat() sleeps and re-sends until the deployment serves the request or wake_timeout_s (default 900) elapses, calling on_waking(message) on each 503 so you can surface progress. Set wake_timeout_s=0 to fail fast with the 503 instead.
GET /v1/deployments//requests
Per-request log: prompt tokens, completion tokens, latency, status code, error (if any).status_code >= 400) for debugging.
model_version_id pins the request to the registered model version that
answered it: on a multi-adapter fleet, the version behind the adapter alias the
request resolved through (an alias is a moving pointer, so after a production
flip the same alias serves different weights); for base-model requests on a
fleet built from a registered model, that model’s version. null when nothing
served belongs to a model lineage.
GET /v1/deployments//metrics
Aggregated counters across all requests:State machine
unhealthy is a transient state when health checks fail; it returns to serving if the pod recovers.
Billing applies during serving and unhealthy only.
Worker-only endpoints
None — deployments don’t have a worker callback API. The serving backend talks to the model server directly via the registered backend interface.SDK convenience
The SDK wraps the create flow into aDeployment dataclass with bound methods:
wait() returns once the status settles: serving, failed, stopped, or scaled_to_zero (a parked deployment won’t move again without traffic, so waiting on it would just burn the timeout). dep.chat() retries through a wake with the default 15-minute budget; call client.deployments.chat() directly to tune wake_timeout_s or on_waking.
Related
OpenAI compatibility
What chat fields are supported.
Billing
Billing states and idle warning.
Hosting & GPU sizing
Pick the right GPU.
Deployment analytics demo
Planned walkthrough for request, token, latency, and replica metrics.

