Baseten
Get a model answering through Baseten, either from the hosted Model APIs or from a dedicated deployment you own, connect it to an OpenAI-compatible client or LiteLLM, keep the bill bounded, and delete what you stop using.
Scope:
- In: Baseten account and API keys, Model APIs (pay per token), dedicated deployments with
config.yaml, autoscaling, deactivate and delete, cost lookup, LiteLLM wiring. - Out: choosing among providers (
cloud-llms,choosing-llm-hosting), gateway routing and budgets (llm-gateway), engine tuning on your own GPUs (self-hosted-llms), evals (llm-evals), training and fine-tuning theory (fine-tuning-llms). Baseten Training, Chains and Sandboxes exist, but this skill does not cover them.
Work through the steps in order. Load a reference only when a step names it.
Discover first
Read-only. Environment variable names only.
env | cut -d= -f1 | grep -iE '^BASETEN' || echo "no BASETEN_* vars"
command -v baseten && baseten --version
command -v truss && truss --version
ls -l ~/.trussrc 2>/dev/null # expect 0600; never cat it
baseten model list 2>&1 | head -20 # needs auth; lists deployed models
baseten org billing usage 2>&1 | head -20 # last 7 days by default
Anything listed under model list with replicas up is billing. Report it first.
Decision flow
- A hosted open model is enough, no custom weights: Model APIs. No deployment, pay per token (
references/model-apis.md). - Custom weights, private model, fixed capacity or dedicated GPUs: a dedicated deployment (
references/dedicated-deploy.md). - Standard LLM on a known engine: Engine-Builder config. Anything else with an OpenAI-compatible server: a custom Docker server config running vLLM or SGLang.
- Spiky traffic: scale to zero, accept cold starts. Latency-sensitive: keep at least one replica.
- Calls from a gateway:
references/litellm-and-clients.md.
Rules
- Ask before creating billable resources. A dedicated deploy, a replica floor above zero and any GPU change cost money. Show the config, the instance type and the scaling bounds, then wait for approval.
- Secrets never print. Keys come from
0600files or environment variables. Usebaseten auth loginorBASETEN_API_KEY. Nevercat ~/.trussrc. - Pin versions. Pin the base image tag, the Hugging Face revision (
hf://org/model@<sha>) and the Truss version. - Set spend controls before traffic. A monthly budget with emails, "Enforce budget" for Model APIs, and a replica ceiling. Enforce budget does not stop dedicated deployments (
references/lifecycle-and-teardown.md). - Prefer scoped keys. Use an inference-only key for apps, not a personal or manage-all key.
- Always tear down. Deactivate or delete every deployment you created, then verify with
baseten model list. - Look prices up. Rates and limits change. Use the CLI, the pricing page and instance-type reference named in the references.
Workflows
1. Account and auth
- Install the CLI, log in, create a scoped key. See
references/setup-and-auth.md.
2. Call a Model API
-
baseten model-api listfor what is live, then callhttps://inference.baseten.co/v1/chat/completions. Seereferences/model-apis.md.
3. Deploy a dedicated model
- Write
config.yaml, get approval, runbaseten model push(ortruss push), wait for the build and read the logs. Seereferences/dedicated-deploy.md.
4. Connect to LiteLLM or OpenAI clients
- Use the
baseten/LiteLLM provider or anopenai/entry with the deployment base URL. Seereferences/litellm-and-clients.md.
5. Scale
- Set min and max replicas, concurrency target and scale-down delay. Check concurrency on a load test. See
references/lifecycle-and-teardown.md.
6. Monitor cost
-
baseten org billing usageandbaseten model-api usage. Seereferences/lifecycle-and-teardown.md.
7. Update
- Push a new deployment, promote it to the environment, keep the old one until traffic is verified, then deactivate it.
8. Tear down
- Deactivate (keeps the config, stops compute) or delete. A model's only or environment-attached deployment cannot be deleted. Delete the model instead. See
references/lifecycle-and-teardown.md.
9. Troubleshoot
- Map the HTTP status or message in
references/troubleshooting.md.
Reference index
references/setup-and-auth.md: CLI install, login, key types, headers, MCP and agent skills.references/model-apis.md: hosted endpoints, discovery, limits, budgets, usage.references/dedicated-deploy.md:config.yamlexamples, push, endpoints, resources, secrets.references/lifecycle-and-teardown.md: autoscaling, promote, deactivate, delete, billing semantics.references/litellm-and-clients.md: LiteLLM, OpenAI and Anthropic SDK wiring.references/troubleshooting.md: status codes and deploy errors.
Companion skills
cloud-llms: compare Baseten with other hosted and cloud options. Install:npx skills add ScaleDockHQ/llm-skills --skill cloud-llms.llm-gateway: LiteLLM routing, fallbacks and budgets. Install:npx skills add ScaleDockHQ/llm-skills --skill llm-gateway.self-hosted-llms: vLLM and SGLang flags that also apply in a Baseten Docker server. Install:npx skills add ScaleDockHQ/llm-skills --skill self-hosted-llms.llm-observability: traces and cost dashboards. Install:npx skills add ScaleDockHQ/llm-skills --skill llm-observability.llm-evals: check a deployed model before shifting traffic. Install:npx skills add ScaleDockHQ/llm-skills --skill llm-evals.llm-clients: point apps and agents at the endpoint. Install:npx skills add ScaleDockHQ/llm-skills --skill llm-clients.