Authenticate: truss login --browser. This stores your Baseten API key locally; no manual key entry needed.
Create the model directory and a config.yaml declaring model_name, resources.accelerator (for example L4, A100, H100), and either a python model.py implementation or a framework-specific block such as a TensorRT-LLM checkpoint repository.
Deploy a development deployment: run truss push from the project directory. The CLI prints the model id (an 8-character handle) and a development deployment URL.
To publish straight to production instead, run truss push --promote, which creates the deployment and immediately makes it the production deployment.
Recover the model id later via the management API: GET https://api.baseten.co/v1/models with header 'Authorization: Bearer <BASETEN_API_KEY>'. The response array carries id, name, production_deployment_id and development_deployment_id.
Call the model: POST https://model-{model_id}.api.baseten.co/environments/production/predict with the same Authorization header and a JSON body matching your model's input schema. Use /environments/development/predict or /deployment/{deployment_id}/predict to target other deployments.
For OpenAI-compatible Trusses, point the OpenAI SDK at base_url https://model-{model_id}.api.baseten.co/environments/production/sync/v1 with the Baseten key as api_key.
Watch build and deployment logs in the Baseten console; a deployment stays in a building state until the image is ready, and predict calls against it will fail until it is active.
Official documentation: https://docs.baseten.co/development/model/build-your-first-model | https://docs.baseten.co/inference/calling-your-model | https://docs.baseten.co/reference/management-api/models/gets-all-models
Known gotchas
truss push alone updates only the DEVELOPMENT deployment. Production is untouched unless you pass --promote or promote explicitly - a common cause of 'my fix did not go live'.
Two auth schemes are accepted: 'Authorization: Bearer <key>' and the legacy 'Authorization: Api-Key <key>'. Mixed copy-paste across old and new samples is a frequent source of 401s.
A deployment scaled to zero replicas cold-starts on the next request. Large model weights make this materially slow; set min_replica >= 1 for latency-sensitive traffic.
Accelerator availability varies by GPU type; an unsupported or capacity-constrained resources.accelerator value stalls the build.
Baseten explicitly warns against calling predict endpoints from client-side code, since it exposes the API key. Proxy through your own backend.
Parts of the management API are documented as beta and may change; re-check the reference before depending on response field names.
Give your agent this knowledge — and 16,000+ more routes
One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?