truss push runs under the hood. Use it from non-Python clients (Go, JavaScript) or from CI, where you can’t run the Python Truss CLI. For most workflows, truss push is simpler.
The flow has three calls:
POST /v1/prepare_model_uploadvalidates the payload and returns temporary credentials scoped to an S3 location.- Upload your Truss archive to that location.
POST /v1/modelscommits the upload as a new model. To add a deployment to an existing model, callPOST /v1/models/{model_id}/deploymentsinstead.
Prepare the upload
Send the parsed Truss config and a modelname, loading weights through the Baseten Delivery Network with a weights block (source accepts hf://, s3://, gs://, and bdn:// URIs). Set dry_run to true to validate without issuing credentials:
model_id rather than name. Exactly one of the two is required.
Upload the archive
Package your Truss as a gzipped tar archive, then upload it to the returneds3_bucket and s3_key using the temporary credentials:
Create the model
Commit the upload withsource.kind set to model_archive, the same deployment payload you validated, and the s3_key from the prepare step:
Wait for the deployment
The deployment isn’t ready when the call returns. PollGET /v1/models/{model_id}/deployments/{deployment_id} until its status is ACTIVE.
Next steps
Prepare a model upload
Full request and response schema for the validation step
Create a model from a source
Commit an uploaded archive, or fork a library listing