serve.py
Baseten
A model-serving platform where you call a hosted model by its exact slug or deploy your own onto GPUs you choose. A person picks every model in advance.

’s job is picking so you don’t have toOn Baseten you choose the model every time. ML.ai picks it per request, automatically, and that choice is where the savings come from.
Baseten, model serving
How Baseten works

picks the model per request
main.py
Routing decision model=auto
Fix this failing test
Tuned open model
Mid-size open modelskipped
Frontier modelskipped
Cleared the quality bar
On Baseten, a person picks, deploys and waits for a model before anything runs. On ML.ai, the request is scored once and lands on a live model.
Same request, both products
“Fix this failing test”
1Choose a model
2Deploy it
3Wait
1Optimizes for cost + quality
Tuned open modelPicked
Mid-size open modelSkipped
Frontier modelSkipped
2Already running

and Baseten each doserve.py
A model-serving platform where you call a hosted model by its exact slug or deploy your own onto GPUs you choose. A person picks every model in advance.
route.py
ML.ai routes each request across 40+ models behind one endpoint, picking the cheapest one that meets the quality bar.
Use this if
You’ve already decided which exact model should run, and the problem left is serving it reliably: packaging, GPU allocation, autoscaling, uptime.
Use this if
You want the model choice made automatically, per task, because picking the right model every time is the real cost problem, not hosting one.
The same categories, compared row by row. Every line on both sides traces back to a real doc, pricing page, or published benchmark.
Baseten
A model-serving platform with no automatic selection: you name the model you want, every time, whether calling a Model API or a model you’ve deployed.
![]()
ML.ai
An automatic, per-task router in front of 40+ models under one drop-in API endpoint.
Nobody names the model per request.
Baseten
Truss (open-source, MIT) packages a model’s code, dependencies, and hardware needs; deployed via the Baseten CLI.
![]()
ML.ai
Not applicable.
ML.ai routes to hosted models rather than packaging your own for deployment.
Baseten
You do, always.
Model APIs require you to name an exact model slug; Chains requires you to write the Python code that decides which deployed model handles which step.
![]()
ML.ai
ML.ai’s router does, automatically, scored against cost and quality for that specific task.
No code is written per request.
Baseten
Per-token for shared Model APIs; per-GPU-minute for dedicated deployments (T4 through B200), billed even while a replica is warm but idle.
![]()
ML.ai
Usage-based on top of a workspace plan; a completion fee applies only to spend past the plan’s included execution credit.
Baseten
Scale-to-zero is supported, with a 15-minute idle delay before shutdown; a cold start on the next request runs roughly 30-90 seconds for large models, and billing runs per minute during that startup window even before it’s serving.
![]()
ML.ai
Not applicable in the same sense.
Requests route to already-hosted models rather than a replica you scaled to zero.
Baseten
SOC 2 Type II and HIPAA compliant, with an independent third-party HIPAA assessment report available.
![]()
ML.ai
SOC 2 Type II, ISO 27001, GDPR + CCPA, HIPAA on request, PCI DSS on dedicated capacity.
Baseten
Three self-serve-documented modes: fully managed Baseten Cloud, single-tenant VPC, or fully self-hosted in your own cloud account.
![]()
ML.ai
Enterprise tier: BYOK, VPC, or on-prem, with data residency, currently pilot-only, arranged with sales rather than self-serve.
Baseten
ML/infra engineers who already know which model to run and need production-grade serving without owning Kubernetes or Docker directly.
![]()
ML.ai
Teams that want the model choice made for them, automatically, because the cost problem is picking right every time, not hosting.
ML.ai’s own limits sit right beside theirs, with the same weight.
Pricing mixes per-token and per-GPU-minute billing, which third-party reviews describe as hard to forecast.
A dedicated replica accrues cost whether or not it’s actively serving.
No business-user layer: every documented workflow (config.yaml, Truss, CLI, Docker) assumes engineering fluency, not a no-code dashboard.
At sustained high throughput, the per-replica markup over raw GPU rental means renting GPUs directly can undercut Baseten’s dedicated-deployment pricing, per third-party comparisons.
No. Every path on Baseten (Model APIs, dedicated deployments, Chains) requires a person to name or deploy the exact model in advance. ML.ai’s automatic, cost-based selection has no equivalent on Baseten today.
Not today. There is no documented, supported way to add a Baseten-hosted model as a destination ML.ai’s router can choose. They’re alternatives at the same layer, not a connected pair.
That’s Baseten’s core use case. Truss and the Baseten CLI exist specifically to package and serve a model you’ve already built. ML.ai doesn’t do that job.
Not in the same self-serve form. ML.ai is currently run as a sales-assisted pilot. Baseten’s Model APIs and dedicated deployments are self-serve today.

today, or talk to us about what is nextTry ML.ai in the editor you use today and approve every change it makes.