The problem
The API-versus-self-hosting decision is usually made on intuition
Self-hosting looks cheaper when you compare per-token API prices to GPU hourly rates, and more expensive once you add idle capacity, engineering time, upgrades and on-call. Managed APIs look simpler until rate limits, provider outages or data handling requirements constrain the product. The right answer depends on traffic shape, latency targets, model quality requirements and your team's capacity to operate infrastructure.
Signals you’ll recognize
- The team is debating self-hosting an open-weight model without a TCO model or quality comparison.
- Provider rate limits or capacity errors are affecting production traffic.
- There is a single provider with no fallback path, and an outage would take the feature down.
- GPU instances are provisioned but utilization is low or unknown.
- Data handling requirements are unclear for which data may be sent to third-party APIs.
- Switching models would require changes across many services because provider SDKs are called directly.
Inference is where model choices turn into ongoing operating cost and reliability risk. Decisions about managed APIs, self-hosted open-weight models or a hybrid shape your latency, your exposure to provider rate limits and outages, and how hard it will be to switch models later.
We make that decision with measurements: your traffic profile, your quality bar expressed as an eval set, and a TCO model where every assumption is visible and editable. Comparing per-token API pricing with GPU hourly rates is not enough on its own; utilization, peak capacity, engineering time and on-call belong in the comparison too.
On the architecture side, we favor designs that keep you portable: a gateway layer that abstracts providers, explicit fallback behavior, rate-limit handling with backoff and quotas, and tracing that attributes latency and cost per request. Provider-specific features are used where they earn their keep, with the tradeoff written down.