Skip to main content
Reference for /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 by status (queued / provisioning / serving / unhealthy / scaled_to_zero / waking / stopped / failed).
Returns 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.

POST /v1/deployments//wake

Pre-warm a scaled_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 to stopped. 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:
Response:

Waking from zero

A chat request to a scaled_to_zero deployment triggers its wake and answers 503 with a Retry-After header while the GPU boots:
Raw HTTP clients should retry after 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).
Response:
Includes failed requests (status_code >= 400) for debugging.

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 a Deployment dataclass with bound methods:
These all hit the endpoints above. 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.

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.