Skip to main content
This page covers the lifecycle operations for dedicated model inference (DMI): creating endpoints and deployments, scaling, stopping, and deleting resources. The CLI’s tg beta endpoints deploy command bundles several API/SDK operations into one step for convenience: it creates the endpoint (when you pass a new endpoint name), attaches a deployment to it, and routes 100% of traffic to that deployment. This page shows the individual operations underneath it. To create your first deployment end-to-end, follow the quickstart.

Create an endpoint

Before you can create a deployment, you must select a model, choose a config, and create an endpoint. The CLI has no standalone create-endpoint command: tg beta endpoints deploy creates the endpoint and its first deployment together (see Create a deployment below). To create an empty endpoint on its own, use the SDK or API:
Python
The endpoint serves as a logical grouping of deployments, and the entry point for routing traffic to your models.

Create a deployment

A deployment binds a model and a hardware config to an endpoint, and sets the autoscaling policy for spinning replicas up and down based on demand. --min-replicas and --max-replicas set the replica bounds. Pass an existing endpoint ID (or a new endpoint name) to tg beta endpoints deploy --endpoint to add a deployment. The model is the positional argument, and the config is --config:
CLI
When a model has more than one deployment profile, deploy returns an error that lists the available profiles, for example:
Re-run with --config <cr_...> to choose one. When a model has a single profile, the CLI selects it automatically. List a model’s profiles anytime with tg beta models configs <model_id>. The CLI defaults --min-replicas and --max-replicas to 1, so a bare deploy creates a single-replica deployment. List and retrieve responses return a flat deployment object whose model and config resource names you can copy straight into a new create request:
After you’ve created a deployment, you’ll need to route traffic to it before it can serve requests.

Create request flags

Set these flags on tg beta endpoints deploy when you create a deployment: For the full flag list, including placement, the autoscaling windows, and the scaling percentile, see the CLI reference. Decoding optimizations, including speculative decoding, come from the config you select.

Poll deployment status

To check a deployment’s status, run tg beta endpoints get on its endpoint. The output lists each deployment’s state and ready/desired replica counts, so re-run it to watch a specific deployment come up:
CLI
For the full set of status fields (scheduled replicas, status message), retrieve the deployment from the SDK or API and read status:
Python
From here you can track its progress scaling up:

Deployment states

A deployment reports its lifecycle in status.state. The API returns the fully-qualified enum (for example DEPLOYMENT_STATE_READY). This page uses the short name for readability. A deployment that never reaches READY within six hours after starting will be marked as FAILED.

Scale a deployment

Deployment scale is controlled by the deployment’s replica bounds, and optionally autoscaled using scaling metrics. Set the initial bounds at deploy time (--min-replicas/--max-replicas), then change them on a running deployment:
CLI

Stop a deployment

A deployment runs until you stop it. To stop a deployment and release its hardware, set both its replica bounds to 0:
CLI
The replicas keep serving until they finish draining, then the deployment moves to DEPLOYMENT_STATE_STOPPED and billing stops.

Restart a deployment

A stopped deployment doesn’t restart on its own. To bring it back, raise both bounds to 1 or more:
CLI

List resources

List and get endpoints with the CLI:
CLI

List flags

tg beta endpoints ls accepts these flags: List responses are paginated: when more results are available, the response includes next_cursor, which you pass as --after on the next request.

Delete resources

Deletion is permanent. A deployment must be stopped before it can be deleted. Follow this order:
  1. Scale the deployment to zero and wait for DEPLOYMENT_STATE_STOPPED.
  2. Delete the deployment. If you use the SDK or API (not the CLI), set the deployment’s traffic split weight to 0 on the endpoint first.
  3. Delete the endpoint once it has no deployments.
The CLI’s rm command is a smart-delete: it resolves the resource by its ID prefix, so the same command deletes an endpoint (ep_), a deployment (dep_), an A/B experiment (abx_), or a shadow experiment (exp_). When you run tg beta endpoints rm dep_..., the CLI automatically detaches the deployment from the traffic split and from any experiments it belongs to:
CLI
To delete an endpoint that still has deployments, pass --force to rm. If the endpoint has other deployments you want to keep, rebalance the remaining weights instead of clearing the split. See Route traffic.

Troubleshooting

  • endpoint_not_configured (HTTP 400) though the deployment is READY: Confirm the deployment is in the endpoint’s traffic split with a non-zero weight.
  • Deployment DEGRADED with Cannot place replicas: insufficient GPU capacity: Hardware for the config is constrained, so the scheduler couldn’t place all replicas yet. Compare status.scheduledReplicas to desiredReplicas. The scheduler keeps retrying and the deployment starts once capacity frees up. To improve the chance of placement, request fewer replicas or choose a config with a smaller hardware footprint.
  • Deployment DEGRADED with Startup stalled or Not ready: A placed replica is still booting or hit a startup failure. Read the detail after the colon in status.message. The deployment stays DEGRADED rather than FAILED once any replica has been successfully started.
  • Deployment FAILED with Timed out waiting for readiness: No replica could be provisioned within six hours of the current run’s start. Read the stall cause at the end of status.message. Restart the deployment to begin a fresh budget.
  • Deployment FAILED for another reason: Read status.message. Common causes include deterministic placement rejection (Cannot place replicas: …), manifest generation failure, or remediation exhaustion.
  • Model not supported: Not every model can be deployed. See the model catalog. A fine-tuned model deploys only if its base model is supported.
  • Deploy fails with the model has no revisions to deploy: The model record exists but has no uploaded weights yet. Finish uploading the model and wait for the upload to succeed before you deploy it.
  • Deploy fails with a revision validation error: When you pin a specific model or speculator revision, that revision must have passed validation first. Deploy the latest validated revision, or wait for the pinned revision to finish validating.
  • Deployment delete fails with the deployment is referenced by an endpoint's traffic split and cannot be deleted; please drop traffic split weight to 0 before deleting the deployment (HTTP 400): The deployment still has weight in the endpoint’s traffic split. Set its weight to 0 (or remove it from the split) before deleting. The CLI’s tg beta endpoints rm dep_... detaches it automatically.

Next steps

Configure autoscaling

Autoscale a deployment on the right metric.

Route traffic

Split traffic across deployments behind one endpoint.

Observability

Monitor metrics and scrape the Prometheus-compatible endpoint.

Pricing

Understand per-minute and reserved pricing.