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
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
deploy returns an error that lists the available profiles, for example:
--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:
Create request flags
Set these flags ontg 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, runtg 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
status:
Python
Deployment states
A deployment reports its lifecycle instatus.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 to0:
CLI
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 to1 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:- Scale the deployment to zero and wait for
DEPLOYMENT_STATE_STOPPED. - 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.
- Delete the endpoint once it has no deployments.
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
--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 isREADY: Confirm the deployment is in the endpoint’s traffic split with a non-zero weight.- Deployment
DEGRADEDwithCannot place replicas: insufficient GPU capacity: Hardware for the config is constrained, so the scheduler couldn’t place all replicas yet. Comparestatus.scheduledReplicastodesiredReplicas. 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
DEGRADEDwithStartup stalledorNot ready: A placed replica is still booting or hit a startup failure. Read the detail after the colon instatus.message. The deployment staysDEGRADEDrather thanFAILEDonce any replica has been successfully started. - Deployment
FAILEDwithTimed 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 ofstatus.message. Restart the deployment to begin a fresh budget. - Deployment
FAILEDfor another reason: Readstatus.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’stg 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.