← Back

Deploying an LLM: API, Managed Hosting or Your Own Servers?

TL;DR

A model that responds on a laptop is not yet a production service. Compare deployment routes using the workload, failure behaviour and ownership your application needs.

Conceptual illustration for Deploying an LLM: API, Managed Hosting or Your Own Servers?

LLM deployment means making a language model available to an application, with the capacity, access controls and operational support that application needs. You can call a provider's model API, use a managed endpoint for a chosen model, or run the serving infrastructure yourself.

The sensible starting point is the least operationally demanding option that meets your requirements. Self-hosting is worth considering when you need control a provider cannot offer, or when a measured workload supports the cost of operating your own service. It is not automatically cheaper, faster or more private.

Before comparing infrastructure, establish that the model can do the task. Our AI model selection guide covers that decision. Here, the question is how to run the selected model reliably once real users arrive.

Three deployment routes, with different responsibilities

Route What you operate What to investigate before choosing it
Model API Your application, credentials, requests and downstream behaviour Supported models, quotas, data handling, service limits and change policy
Managed model endpoint Model configuration and application behaviour, with a provider operating much of the infrastructure Instance options, scaling, startup delay, network access and responsibility boundaries
Self-managed serving The inference service and its infrastructure, as well as the application Hardware capacity, patching, monitoring, resilience and people able to maintain it

These categories overlap. A managed endpoint may use the same inference engine you could run yourself. Buying that service changes who operates the infrastructure; it does not remove your responsibility for what the application does with its output.

For a concrete example, Hugging Face Inference Endpoints provides managed model deployment with configuration, scaling and observability features. That is an example of the middle route, not a recommendation that it meets every project's requirements. Check the specific configuration and agreement you would purchase.

Write a workload contract before sizing the service

“Support 500 users” does not describe the inference workload. Five hundred occasional users and five hundred simultaneous requests are very different requirements.

Record representative input and output lengths, requests per minute, peak arrival patterns and how long a user can wait. Include retrieval context, conversation history and any repeated calls inside a workflow. A single user action may trigger several model requests.

Separate time to first response from time to complete the task. Streaming a first token quickly can make an interface feel responsive, while the full response still takes too long for the next step. For structured output, a partial response may not be useful at all.

Set limits deliberately. Decide how much context the application accepts, how long an answer can be and when a request times out. A product with no effective limits is difficult to size and easy to overload. Keep a separate policy for background jobs that can wait in a queue.

The workload contract should also state what happens when capacity is exhausted. A clear retry message, a queued job or a human fallback can be better than silently dropping work.

LLM deployment checks real requests, peak traffic capacity, scoped access and a tested release and recovery process.
Illustrative deployment checklist. Capacity calculations are planning assumptions, not a hardware benchmark.

A capacity example: averages hide the queue

Consider a fictional internal assistant receiving 12 requests per minute. Suppose a measured trial later establishes an average of ten seconds spent in the system per completed request, including any waiting. For a stable workload, the average number of requests in the system is approximately arrival rate multiplied by average time:

12 ÷ 60 × 10 = 2 concurrent requests on average.

This is a planning illustration, not a benchmark. It does not say that hardware capable of handling two requests is sufficient. Twenty people may send a request at the same moment. Longer prompts can take more work, and waiting time grows when the service cannot keep up.

Use the calculation as a consistency check, then load-test realistic bursts. Record the distribution of completion times, errors and queue depth. Do not use an average to claim a 95th-percentile response time.

Memory sizing has a similar trap. A hypothetical model with seven billion parameters stored at two bytes per parameter has about 14 GB of parameter data in decimal units. That excludes runtime memory, cached attention state, other buffers and system overhead. It is not evidence that the complete service fits on a 14 GB device.

Model format, quantisation, context length and simultaneous sequences all affect the practical requirement. Test the intended model and configuration on the intended hardware rather than buying a device from the parameter count alone.

Treat serving software as one component

An inference engine exposes the model to requests. The surrounding application still needs authentication, permissions, input limits, request tracking and a way to handle failure.

For example, vLLM's online serving documentation describes supported APIs and operational endpoints. It also distinguishes development capabilities that should not be enabled in production. An API-compatible interface can simplify integration, but compatibility does not guarantee identical model behaviour or support for every feature your application uses.

Put the service behind an access boundary appropriate to your environment. Do not expose administrative or diagnostic functions to ordinary users. Keep deployment credentials separate from application credentials, and make revocation possible without rebuilding the product.

A useful test is to remove a user's access while an application session remains open. The next protected action should respect the new permission state. The model's familiarity with a document is not an authorisation system.

Follow the data beyond the prompt

Draw the route from the user interface through your application, any retrieval service, the model endpoint and the response store. Include logs, traces, error reporting and backups. Data can leave an intended boundary through an observability tool even when inference itself is private.

For each component, record what it receives, why it needs it, who can access it and how long it is retained. Check provider terms and configuration against your actual requirements. A region label alone does not answer every question about processing, support access or retention.

Self-hosting gives you more direct control over some of these choices, but you must operate those controls. It does not automatically make prompts safe to log or make every employee entitled to query every document.

Use the minimum information necessary for the task. Where practical, log identifiers and operational measurements rather than complete sensitive prompts. Keep enough evidence to investigate failures, with access and retention suited to the data involved.

Compare the full operating cost

For an API, estimate input and output usage, retries and additional calls. For dedicated infrastructure, include idle capacity, redundancy, storage, networking and the work needed to operate it. Use current quotes for the actual configuration; model names alone are not a budget.

A service that handles a short daily burst can spend most of the day idle. Scaling down may reduce that cost, but starting again can introduce delay. Measure whether that delay fits the user journey. A background report and a live customer conversation can reasonably make different choices.

Our LLM cost optimisation guide goes deeper into reducing unnecessary work. Keep quality checks alongside cost checks: a cheaper configuration that produces more unusable answers may increase the cost of completing the business task.

Also name the person or team responsible for updates and incidents. “We already own a server” does not account for the work of maintaining a dependable service.

Release a version you can identify and replace

Record the model version, serving configuration, prompt version and relevant retrieval settings together. A change in any of them can alter the result. If you cannot identify what produced a response, comparing two releases becomes guesswork.

Before release, run the same evaluation cases against the candidate and the current version. Include ordinary requests, long inputs, unavailable dependencies and requests the system should refuse or hand off. Test the application outcome, not just whether the endpoint returns a successful status code.

Start with a controlled share of eligible traffic where that is practical. Define the signals that would stop the rollout, such as a material rise in failed tasks or unacceptable response times. Decide how in-flight requests behave when a version is replaced.

Keep a recovery route that has actually been tested. If the application falls back to another model, evaluate that path too. It may have different data-handling conditions and may not produce equivalent answers.

What should be ready before the first production request?

You should be able to show a tested workload, an access model, a cost estimate with assumptions and a named operational owner. You should also be able to explain what the user sees when the model is slow, unavailable or unsuitable for the task.

Download the deployment acceptance worksheet to capture those decisions. It includes a place for measured results, so planning assumptions cannot quietly turn into performance claims.

If you need help turning a successful experiment into a supported application, our AI development team can help define the integration and release plan. Bring representative requests and the constraints you cannot change; those are more useful starting points than a preferred server specification.

Michal Vávra
Written by
Head of AI & Development

Michal has been with Pixelfield since September 2012 and has held technical leadership roles since 2017. He is the technical force behind our most demanding builds, combining AI expertise with the infrastructure and software architecture needed to make it work in production. His work spans LLM applications, multi-agent orchestration and complex integrations. He sets the engineering standards behind reliability, performance and scale, and guides the team through the decisions that determine how a system runs long after launch.