Checklist

Self-hosting LLMs on Kubernetes vs paying per token: a decision checklist

A per-token API and a model on your own cluster are different operating models. This checklist is for CTOs and engineering leads deciding whether to keep paying per token or to run open-weight models on Kubernetes. Every dollar figure below is illustrative arithmetic for your own rates. None of it is a client result, a benchmark, or a vendor price.

Five questions first

  1. What does your traffic actually look like: steady all day, or a few spiky hours?
  2. Can you get capacity when the autoscaler asks for it, in the region the data has to stay in?
  3. How bad are your cold starts, and will you pay to keep capacity warm?
  4. Who is on call when it breaks at 2am?
  5. Do you have evals that show a cheaper open model is not worse for your use case?

If most answers are "not sure," stay on the API for now. Nothing wrong with that. The rest of this page is for when you can answer them.

What you are actually choosing

You are choosing who carries capacity, the model lifecycle, and the data boundary.

  • On a per-token API, the vendor holds the GPUs and most of the traffic spike. You pay for tokens, and you accept their regions, retention terms, and model roadmap.
  • Self-hosting means your platform team runs weights, GPU nodes, a model server, autoscaling, authentication, and on-call. You pay for reserved capacity, including idle hours.
  • Kubernetes schedules that work. It does not make a model cheap, private, or fast. A cluster you already run is not a free inference platform.

If you cannot yet say how many input and output tokens a normal day uses, stay on the API and log them. The rest of this page is the worksheet for when those counts exist.

When a per-token API wins

Stay on the API if any of these is true. Two or more, and it is not close.

  • Volume is low, bursty, or still a prototype. You would pay for idle GPUs the API does not charge for.
  • Prompts, retrieved documents, and outputs may leave your network under a contract you have read.
  • A hosted model still meets the quality bar, and the open-weight models you would actually operate do not. Recheck that bar. It moves.
  • Nobody owns model serving, and you will not staff that ownership before launch.
  • A production call this quarter matters more than a lower unit cost next year.
  • You would rather the vendor absorb a bad week of traffic than reserve capacity for a week that may not arrive.

Still put a gateway in front of the API. Authentication, per-team budgets, and a later route to a self-hosted model belong there. Paying per token and owning the front door are compatible.

When self-hosting starts to make sense

Self-hosting earns a design review when the constraint is concrete and someone will own the operating load. Already running Kubernetes is not that constraint. The usual reasons are volume, latency, data residency, and customization.

Volume

Use sustained input and output tokens for an average day and the peak hour, not a launch-week spike. Self-hosting pays for a GPU floor. It starts to compare when that floor stays busy and the API invoice exceeds the floor plus the people who keep it up.

  • Price quiet hours on purpose. Nights and weekends are where a reserved node looks expensive next to a meter.
  • Scale-to-zero cuts some idle cost and adds cold-start latency. Put that trade in the latency target before anyone calls it free.
  • Context length drives GPU memory, not only the token invoice. A long prompt can force a bigger node.

Latency

A hosted API is often fast enough. Self-hosting is the latency conversation when you need a private network path, a region the API does not serve, or queueing you set yourself. You then own time to first token and time to last token: queue wait, batching, and cold starts, measured separately. A busy GPU can be slower for the next request than a vendor pool that is not busy.

Data residency and privacy

Write down where prompts, retrieved documents, and outputs may be processed and stored. If they cannot cross a VPC, a region, or a contract boundary, a public per-token API is out even when it is cheaper. Self-hosting meets that rule only when weights, logs, traces, backups, and any fallback stay inside the boundary. A model called private, which then calls a hosted moderation or embedding API, has not met it.

Customization

Self-host when you need a pinned model version, a fine-tune, or an adapter the API will not run, or when a vendor deprecation would break a workflow you cannot change on their schedule. Budget an evaluation set and a rollback. A changed model you cannot score against the one it replaced is an incident with a quiet start.

A cost-comparison framework

Compare the LLM inference cost of one month of the same workload on a per-token API and on your own Kubernetes cluster, using your contract and your node price. Skipping the people line is how a cluster looks cheaper than it is.

  1. Tokens. Input and output, for an average day and the peak hour.
  2. API cost. Your per-million prices times the month, plus any platform fee.
  3. GPU floor. Nodes the latency target needs, times hourly price, times hours they stay up.
  4. Idle time. Hours that floor is on while traffic is thin. The API bill hides this line.
  5. People. On-call and model operations. If it is nobody’s job, the cluster is unowned.
  6. The rest. Weight storage, logging, evaluation jobs, egress, and a fallback API if you keep one.
Illustrative arithmetic. Not a client measurement and not a vendor price.

Round numbers, so the multiplication is easy to redo. A month here is 730 hours (a 365-day year divided by 12). Example API rates: $0.80 per million input tokens and $3.20 per million output tokens. Example GPU rate: $3.50 an hour. Example fully loaded engineer: $20,000 a month, a placeholder for your cost, not a North Peak Labs fee.

Lower sustained volume

Tokens
2 billion input and 0.4 billion output in the month.
API
2,000 × $0.80 = $1,600 input. 400 × $3.20 = $1,280 output. Together, $2,880.
GPU floor
2 nodes, always on. 2 × $3.50 × 730 = $5,110.
People
A quarter of the example engineer: 0.25 × $20,000 = $5,000.
Compare
GPUs plus that time are $10,110 before logs. The API line is smaller, and the cluster still needs an owner.

Higher sustained volume

Tokens
Ten times the counts above: 20 billion input and 4 billion output.
API
20,000 × $0.80 = $16,000 input. 4,000 × $3.20 = $12,800 output. Together, $28,800.
GPU floor
An assumed 6 nodes, not a sizing result. 6 × $3.50 × 730 = $15,330.
People and the rest
Half the example engineer is $10,000. A $1,500 placeholder covers logs and storage. With the GPUs: $26,830.
Compare
With these made-up inputs, the two lines get close. That is the shape of a crossover, not a recommendation. If the peak needs 10 nodes, put 10 in the sheet.

Redo both sheets with your contract and the node price your region will actually sell. If that SKU is unavailable where the data has to stay, the sheet is not done.

Operational requirements

If you self-host, this is the production bar. A missing line is a reason to stay on the API longer.

Autoscaling

  • Scale on queue depth and in-flight requests. CPU is the wrong signal for a model server.
  • GPU nodes join slower than application pods. The autoscaler cannot use a node that is still booting or still pulling weights.
  • Write down the warm floor: how many replicas stay up, and what cold start you accept below that.
  • Cap concurrency so one tenant cannot stall the others.

Model serving

  • Serve a stable HTTP API with health checks, graceful shutdown, and a pinned model version. vLLM, SGLang, and TensorRT-LLM are examples of that category. Pick one the team can operate.
  • Promote weights as a versioned artifact in a private registry, the same way you promote an image.
  • Load-test time to first token at the concurrency you expect. A single-user demo does not size the cluster.
  • Keep a rollback model. A bad release should be a routing change.

Observability

  • Trace queue wait, time to first token, and total latency separately.
  • Record input tokens, output tokens, model version, and error class on each request.
  • Watch GPU memory. An out-of-memory kill looks random if you only alert on pod restarts.
  • Alarm on token spend and on GPU hours. Cost is part of the service level.

On-call

  • Name the rotation before the first production caller. Drivers, a full disk, and a node that cannot schedule a GPU will page someone.
  • Write the first three responses: model server unhealthy, GPU unschedulable, latency target breached.
  • Decide what the product does when the model is down: a queued retry, a smaller fallback, or a clear error.

Security and secrets

  • Prompts are data. Keep them out of logs, traces, and tickets by default.
  • Store weights, registry credentials, and any fallback API keys in the secret store you already trust. Do not bake them into images.
  • Deny egress the workload does not need. A residency promise ends at an open egress rule.
  • Authenticate the serving endpoint. An in-cluster name with no auth will not stay internal.
  • Review the model license before commercial use. Open weights are not one license.

Hidden costs

These lines rarely survive the first spreadsheet, and they move the decision.

  • GPU quota. The GPU type you priced may be sold out where the data has to stay, or it may require a commitment longer than the project.
  • Evaluation. Every model change needs tasks you score, or quality moves while uptime stays green.
  • Upgrades. Pin drivers, the model server, and the base image, and budget the upgrade.
  • A second region doubles the floor if you promise failover. Do not paste a single-region sheet into that plan.
  • A fallback API brings per-token spend back, and it is a second data path if you self-hosted for residency.
  • Internal playgrounds turn a temporary GPU into a permanent floor.
  • The same people could be hardening the gateway and the evaluations while a vendor runs the GPUs.

Decision checklist

Answer these before a design document. A no on the first questions usually means stay on the API and review the sheet when the token log is real.

  1. Do we have a month of input and output tokens, including a peak hour?
  2. Is there a written data boundary a per-token API cannot meet?
  3. Is there a quality bar or version pin a per-token API cannot meet?
  4. Can we get the GPU capacity the floor needs, in the region the data has to stay in, without a commitment longer than the project?
  5. Did we price the GPU floor for the latency target, including idle hours?
  6. Did we price the people on call, not only the nodes?
  7. Do we have an evaluation set and a rollback model?
  8. Is the model license cleared for this use?
  9. Do we know what the product does when the model is down?
  10. If volume is half the plan, is the API still the safer path for two quarters?

If a boundary or a version pin forces self-hosting, this list becomes the launch list. If nothing forces it, the default is the API.

Run the checklist on your numbers

Bring your token counts, latency target, and data boundary. The worksheet is yours to run. Questions about a boundary in the checklist can go to North Peak Labs by email.

Email North Peak Labs