canonical: https://jentic.com/apis/baseten.co/baseten

# Baseten management API

Baseten is a platform for deploying and serving machine learning models at production scale, and the management API exposes the control-plane operations that sit behind its UI. The API covers model and deployment lookup, autoscaling configuration, deployment promotion between development and production, activation and deactivation, and management of secrets used by deployed models. It is the integration surface for MLOps pipelines that need to roll out new model versions, tune capacity, or rotate credentials without clicking through the dashboard.

## For AI agents

Manage Baseten model deployments - promote development to production, tune autoscaling, activate or deactivate deployments, and rotate inference secrets. Useful for MLOps automation agents.

## Scope

Does not handle model training, dataset storage, or runtime inference invocation - use for Baseten deployment lifecycle and configuration management only.

## Capabilities

- List all models in a Baseten workspace and inspect their deployments
- Promote a development deployment to production with POST /v1/models/{id}/deployments/development/promote
- Update autoscaling settings on a deployment via PATCH on its autoscaling_settings endpoint
- Activate or deactivate a deployment to control inference availability and cost
- Create and list secrets that deployed models use at inference time
- Inspect a specific deployment by ID to check its status and configuration

## Use cases

### Promote Model from Development to Production

After validating a new model version on the development deployment, an MLOps pipeline needs to flip the production deployment to the new version. The Baseten API exposes POST /v1/models/{model_id}/deployments/development/promote to perform this atomically. Promotion typically completes within seconds and can be wired into CI gates that require eval scores above a threshold.

Example prompt: Call POST /v1/models/mdl-123/deployments/development/promote after CI evals pass and verify the production deployment via GET /v1/models/mdl-123/deployments/production

### Cost-Aware Autoscaling Tuning

Production ML deployments often run on GPUs with steep idle costs. Operators can call PATCH /v1/models/{model_id}/deployments/production/autoscaling_settings to tighten min/max replicas, scale-down delay, and concurrency targets - or deactivate the deployment overnight via the deactivate endpoint. The flow lets agents apply policy changes without redeploying the model.

Example prompt: Call PATCH /v1/models/mdl-123/deployments/production/autoscaling_settings with min_replicas=0 and scale_down_delay=120 to enable scale-to-zero off-hours

### Model Inventory and Audit

Platform teams running multi-team Baseten workspaces need an inventory of every model and its deployments for cost attribution and security review. GET /v1/models lists every model and GET /v1/models/{model_id}/deployments returns its deployments, so an agent can build a report of active production deployments, their replica counts, and which secrets they reference.

Example prompt: Call GET /v1/models, iterate each model with GET /v1/models/{model_id}/deployments, and post a summary of production deployments to the platform-ops channel

### Secret Rotation for Deployed Models

Deployed models often call third-party APIs (OpenAI, Anthropic, vector DBs) that require keys. The /v1/secrets endpoints let an automation agent list current secrets and create rotated values when a key is revoked. The agent can then verify the deployment picks up the new value via the deployment-detail endpoint.

Example prompt: Call POST /v1/secrets with the new key value, then verify the production deployment uses it via GET /v1/models/{model_id}/deployments/production

### Agent-Driven Deployment Operations via Jentic

An incident-response agent can use Baseten through Jentic to take corrective actions like deactivating a misbehaving deployment or rolling back to the development version. Jentic isolates the Baseten API key and exposes the 19 management operations as discoverable tools indexed by natural-language intent.

Example prompt: Search Jentic for 'deactivate a baseten deployment', load the POST /v1/models/{model_id}/deployments/{deployment_id}/deactivate schema, and execute against the offending deployment

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v1/models | List all models in the workspace |
| GET | /v1/models/{model_id}/deployments | List deployments for a model |
| POST | /v1/models/{model_id}/deployments/development/promote | Promote development deployment to production |
| PATCH | /v1/models/{model_id}/deployments/production/autoscaling_settings | Update production autoscaling configuration |
| POST | /v1/models/{model_id}/deployments/{deployment_id}/deactivate | Deactivate a deployment |
| GET | /v1/secrets | List secrets available to deployed models |
| POST | /v1/secrets | Create a new secret |

## Key resources

- **Models** — List all models and inspect a specific model's metadata
- **Deployments** — List, fetch, promote, activate, and deactivate deployments on a model
- **Autoscaling Settings** — Update min/max replicas, concurrency, and scale-down behaviour per deployment
- **Secrets** — List existing secrets and create new ones for deployed models to use

## Why Jentic

- **Setup:** Wiring the Baseten management API by hand means adding the API key to every control-plane call, learning the model, deployment, and secret endpoints, and threading model and deployment ids through them yourself. Through Jentic you install once, import the Baseten management API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Baseten puts the model id in the URL path (/v1/models/{model_id}/deployments), so a rule can pin your agent to one model: it reads that model's deployments and nothing else. You choose the operations it may call, so destructive ones like promoting a deployment, deactivating one, or writing autoscaling settings are not included unless you add them.
- **Credential handling:** Your Baseten API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list Baseten deployments' or 'update autoscaling', and Jentic returns the matching Baseten operation with its input schema and required parameters so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Illumina BaseSpace API** — Genomics data platform - pair with Baseten when serving ML models trained on sequencing data
- **Basesnap API** — Database snapshot service - back up the application database backing a Baseten-deployed service
- **Battle.net API** — Unrelated domain; included as placeholder since no direct Baseten competitor exists in the corpus

## FAQ

### What authentication does the Baseten management API use?

Baseten uses an API key (ApiKeyAuth) passed as an authorization header. Through Jentic, the key is stored encrypted in the vault and the agent only receives a scoped token when calling endpoints like POST /v1/models/{model_id}/deployments/development/promote.

### Can I promote a model deployment to production with the Baseten API?

Yes. Call POST /v1/models/{model_id}/deployments/development/promote to atomically promote the current development deployment to production. The previous production deployment is replaced and traffic shifts to the promoted version.

### How do I update autoscaling for a production deployment through Jentic?

Search Jentic for 'update baseten autoscaling settings', which surfaces PATCH /v1/models/{model_id}/deployments/production/autoscaling_settings. Load the schema, set min_replicas, max_replicas, and scale_down_delay, and execute.

### What are the rate limits for the Baseten management API?

The OpenAPI spec does not declare explicit rate limits for the management API. Treat it as a control plane - high-frequency calls to PATCH autoscaling or promote endpoints are unusual; check the Baseten dashboard for any account-level quotas.

### Can I list all models in my Baseten workspace?

Yes. GET /v1/models returns every model in the workspace, and GET /v1/models/{model_id} fetches a specific model's metadata. Combine with GET /v1/models/{model_id}/deployments to enumerate every deployment under each model.

### Does the Baseten API let me manage secrets used by deployed models?

Yes. GET /v1/secrets lists existing secrets and POST /v1/secrets creates a new one. Secrets are referenced by name in your deployment configuration, so rotating a value is a matter of POSTing the new secret and redeploying or letting the next deployment pick it up.

### Can I limit what my agent is allowed to do with the Baseten management API?

Yes. Because you run Jentic One yourself, your own rules decide which Baseten operations and which API key the agent may use. Since Baseten puts the model id in the URL path, such as /v1/models/{model_id}/deployments, you can pin the agent to a single model so it only reads that model's deployments and nothing else. You also choose the operations it may call, so destructive ones like promoting a deployment, deactivating one, or writing autoscaling settings stay out unless you add them.
