[All posts](https://hostlinku.com/en/blog)

Product 3 min read

# Choose a service mode for each workload

A coding agent, a customer-facing app, and an overnight batch have different budgets for waiting. Give each workload a key that fits.

By the Hostlinku team

On this page

Imagine a team using the same AI gateway for three jobs. An engineer waits for a coding agent to inspect a failing test. A support app needs a particular model to draft replies. At night, a worker classifies thousands of records. A second of latency feels different in each job, and so does the cost of a retry.

## Start with the constraint the workload has to meet

-   **Dedicated** is worth evaluating for an interactive coding workflow when a model in the Dedicated catalog already handles the repo, tool calls, and context you need. Measure the time to a patch that passes tests.
-   **Performance** is the default choice when creating a key in Console. Check its catalog against the model and API protocol your application requires, then test with representative traffic.
-   **Economy** is worth evaluating for repeatable tasks such as classifying records or extracting fields. Check a labeled sample first. A cheaper request can lose its advantage if more records need review or a second pass.

## Use the catalog returned by the key

Service Mode belongs to the API key. It determines which models and prices you see when calling `GET /v1/models` with that key. The same model can appear in more than one mode with different prices. If you use multiple modes, create a key for each one and map keys to workloads in your application configuration. Requests stay within the key’s mode.

Before switching a workload, take a small sample of its real jobs and hold instructions, tools, and validation rules constant. Compare the time to a usable result, how often the result passes validation, and the total cost including retries. For a classifier, check cost per accepted record. For a coding agent, measure the time to a passing test suite.

From API key to model route

Hostlinku gateway

API key with an assigned Service Mode

Dedicated key

Model discovery

`GET /v1/models`

Return models and pricing scoped to the Dedicated key.

Inference

`POST /v1/chat/completions`

Use a model from that catalog. The request stays in Dedicated.

Dedicated trial

Hold constant

Same repository and failing test

Measure

Time to a passing patch

Accept when

Patch passes the test suite

Select a mode to trace its catalog and inference path. Trial criteria are examples for evaluating your own workload.

## Roll out one workload at a time

Keep the first switch small enough to measure and reverse. Name the key for its workload, set a spending limit appropriate for the trial, and inspect its requests in Console before expanding traffic. Keys in the same organization and mode share quota, so creating another key is useful for attribution and budget control while the organization’s quota still applies. [Service Modes](https://docs.hostlinku.com/en/service-modes) · [Usage and limits](https://docs.hostlinku.com/en/usage-and-limits)

## Sources

1.  [Service Modes](https://docs.hostlinku.com/en/service-modes) · Hostlinku Docs
2.  [Usage and limits](https://docs.hostlinku.com/en/usage-and-limits) · Hostlinku Docs
