Inference endpoints
- Version
- since 2.x, describes 2.52.14
- Feature flag
inference_serving- For
- Workspace user, Platform operator
A workspace user can serve a model that is ready on a project (from the Model catalogue) as an OpenAI-compatible HTTP endpoint. The serving engine runs as a job on the compute cluster, one replica per endpoint; a platform gateway terminates the public URL, checks a workspace API token, forwards the request to the engine and counts prompt and completion tokens. Endpoints stop themselves after an idle period and are started again by hand. Operators see every endpoint and its usage and can stop any of them.
What it does
- Creates an endpoint from a ready model grant on a project, a serving engine (
vllmortgi), a resource ask (GPUs, CPU cores, RAM) and an idle timeout. The endpoint is a batch job on the scheduler cluster, submitted the same way as an interactive session; see Jobs and scheduling. - Exposes the engine's OpenAI-compatible API at
/e/{endpoint_id}/v1/...on the deployment's inference gateway.GETandPOSTon any path under/v1/are forwarded to the engine's/v1/with the same path, soPOST /v1/chat/completions,POST /v1/completionsandGET /v1/modelsbehave as the engine implements them. Token usage is extracted fromPOST /v1/chat/completionsandPOST /v1/completions; every other call is counted as one request with zero tokens. - Authenticates every gateway call with a workspace inference API token sent as
Authorization: Bearer .... The token secret is shown once when it is minted; the platform keeps only a hash and a 12-character display prefix. - Meters usage per request: prompt tokens and completion tokens read from the engine's
usageobject (non-streaming responses from the body; streaming responses from the final usage chunk, which the gateway asks for by addingstream_options.include_usagewhen the client did not sendstream_options). When a stream ends without a usage chunk, the row is marked estimated (completion tokens equal to the number of data chunks, prompt tokens 0). - Shows usage on the workspace's Inference page (requests, tokens in and out, last used) and includes it in the consumption reports under Inference tokens; see Reports and accounting.
- Stops a running endpoint that has had no traffic for its idle timeout, and settles endpoints whose job ended (clean end to
stopped, failure toerror). A stopped endpoint is started again with Start; nothing starts it automatically. - Moves through the states
starting,running,stopping,stoppedanderror. - Is switched on per deployment with the
inference_servingfeature flag.
Where it is
| Surface | Path |
|---|---|
| Web app | Inference in the workspace sidebar: Endpoints table and API tokens card; Serve next to a ready model in a project's storage tab, Models section |
| Operator console | Platform, then Inference |
| API (workspace) | GET, POST /api/v1/workspaces/{workspace_id}/inference/endpoints; GET, DELETE .../endpoints/{id}; POST .../endpoints/{id}/start; POST .../endpoints/{id}/stop; GET .../endpoints/{id}/connection; GET, POST .../inference/tokens; DELETE .../inference/tokens/{id}; GET .../inference/usage?from=&to= |
| API (operators) | GET /admin/inference/endpoints?from=&to=, POST /admin/inference/endpoints/{id}/stop |
| Data plane | {gateway base URL}/e/{endpoint_id}/v1/...; the exact base URL is returned by the connection route and copied with the URL button |
| CLI | none |
How to use it
Create an endpoint
- Make sure the model is ready on the project: a mount or a finished copy from the Model catalogue.
- Open Inference and press Create endpoint, or press Serve next to the model in the project's Models section (this opens the same dialog with the project and model preselected). Creating, starting, stopping and deleting endpoints and minting or revoking tokens require the
ManageProjectsworkspace permission (see Permissions); every member can read the lists and usage. - Fill in Name (unique in the workspace), Project, Model (only ready grants are offered), Engine, Idle timeout (minutes) and the resources GPUs, CPU cores, RAM (GB). The dialog proposes 1 GPU, 4 cores, 16 GB and 60 minutes.
- Press Create endpoint. The request is checked against the project's quota frame before submission (see Quotas and capacity); a model whose grant is not ready is refused with 409
model_grant_not_ready. - The endpoint appears as Starting. When the engine process is up and has reported back, it becomes Running. The page refreshes every 5 seconds while an endpoint is starting or stopping.
Mint a token and call the endpoint
- In the API tokens card press Mint token, give it a name (unique among the workspace's active tokens) and copy the secret from the dialog. It starts with
cbr_inf_and is not shown again; the list shows the prefix, the last use and the creation time. - Press URL on the endpoint row to copy its base URL (
.../e/{endpoint_id}/v1), or read it fromGET .../endpoints/{id}/connection, which also returns a curl example. - Point any OpenAI-compatible client at that base URL with the token as its API key. Streaming responses pass through; the gateway adds
stream_options.include_usageto a streaming request that has nostream_optionsof its own and never overrides one the client sent. - Revoke a token with Revoke; see Numbers for how quickly revocation takes effect.
Stop, start and delete
- Stop cuts traffic immediately and cancels the job. The row shows Stopping until the next health pass records the job's end; delete is not possible until then.
- Start resubmits a stopped or failed endpoint. The resources may be stated again in the request body; an empty body resubmits with a zero ask, and the cluster's own account limits still apply.
- Delete is accepted only for an endpoint in Stopped or Error (409
endpoint_not_stoppedotherwise) and removes the endpoint's usage history with it.
Watch endpoints across workspaces (operator)
- In the operator console open Platform, then Inference. The table lists every endpoint with its workspace, engine, status, requests, prompt and completion tokens over the selected window, and last use. The default window is the trailing 30 days; pick another with the date range and press Refresh. Estimated figures are prefixed with
~. - Stop on a running or failed endpoint is the operator brake: the same stop as the workspace's, logged in that workspace's activity trail. If the endpoint changed state first, the console reports 409
endpoint_stop_conflictand refreshes. Operators cannot start a tenant's endpoint; the tenant does that. - The table refreshes itself every 10 seconds while any endpoint is starting or stopping.
On-demand and on-prem
- On-demand (web): switched on. We run the inference gateway and the serving engines; you serve a model from the catalogue, start and stop the endpoint and issue its tokens. Endpoints are charged by the token from the workspace balance; see Billing.
- Licensed on-prem: your operators complete the Model catalogue and Jobs and scheduling rollouts first, install the serving engines on the compute nodes, run the inference gateway behind the deployment's TLS termination, give the API the gateway's public address and then switch on
inference_serving; see Deployment and integration for the order and Configuration for the flag.
Numbers
| What | Value | Where it is set |
|---|---|---|
| Idle timeout | 60 minutes by default, minimum 1 minute | per endpoint, at creation |
| Health pass (idle stop and state reconciliation) | every 5 minutes, also while the flag is off | platform |
| Starting with no report from the engine | marked error with reason job_missing after 15 minutes | platform |
| Stopping to Stopped | written by the health pass: up to two passes, about 10 minutes, in the worst case | platform |
| Replicas per endpoint | 1 | platform |
| Serving engines | vllm, tgi (mock exists for the platform's own tests and is hidden from the create dialog) | platform |
| Token secret | cbr_inf_ followed by 40 random characters; 12 characters are kept as the display prefix | platform |
| Token check on the gateway | a successful lookup is cached for 60 seconds; unknown and revoked tokens are checked against the database on every request | platform |
| Revocation takes effect | within 60 seconds for a token used shortly before; immediately for a token not used in the last 60 seconds | platform |
| Usage recording | per-minute buckets per endpoint and token, written every 30 seconds by default and once when the gateway shuts down; last used is stamped with the same cadence | per deployment |
| Usage window | trailing 30 days when from and to are omitted | per request |
Request body on /v1/completions and /v1/chat/completions | up to 2 MiB; larger bodies answer 413 request_too_large | platform |
| Routing entry of a running endpoint | expires 8 hours after the last request | platform |
| Page refresh | web app every 5 seconds and operator console every 10 seconds, while an endpoint is starting or stopping | platform |
| Endpoint name | unique per workspace (409 endpoint_exists); token name unique among active tokens (409 token_exists) | platform |
Gateway errors
Errors raised by the gateway itself use the OpenAI error shape {"error": {"message", "type", "code"}}. Engine errors pass through unchanged.
| Status | code | When |
|---|---|---|
| 401 | invalid_api_key | Missing, malformed, unknown or revoked bearer token |
| 404 | endpoint_not_found | Unknown endpoint, another workspace's endpoint, or inference_serving off for the token's workspace |
| 409 | endpoint_not_running | The endpoint exists but is not Running |
| 413 | request_too_large | Completion request body over 2 MiB |
| 502 | upstream_error | The engine could not be reached or dropped the connection |
| 503 | endpoint_unavailable | No routing entry yet (the engine has not reported in) or no longer (expired); retry |
Limits and known behaviour
- One replica per endpoint; no autoscaling, no queueing, no warm pools and no rate limiting beyond token authentication.
- Metering counts tokens only; there is no per-request price. On the on-demand service the metered tokens are what is charged; see Billing.
- A streaming completion from an engine that emits no usage chunk (the TGI posture) is recorded as estimated: completion tokens equal the number of data chunks and prompt tokens are 0. Estimated rows are marked "(est.)" in the web app and
~in the console, and the consumption reports carry the flag per row. - After Stop, traffic is refused at once (409
endpoint_not_running) but the row can show Stopping for up to about 10 minutes under load on the platform's scheduled tasks. - A token revoked right after use keeps working for up to 60 seconds.
- Deleting an endpoint deletes its usage rows. Stop, start and switching the flag keep them.
- Only the two completion routes are metered for tokens;
GET /v1/modelsand any other engine route count as a request with zero tokens. - The engines are not installed by the platform. The deployment makes the
vllmandtext-generation-launchercommands available inside a batch job on every node an endpoint can land on. The engine reads the model weights directly from the catalogue's cache mount on the node. - An endpoint that stays Starting and is swept to
errorwithjob_missingafter 15 minutes, while its job ran fine, means the engine's report could not reach the API from the compute node (a network configuration matter for the deployment). An endpoint that is Running while every request answers 502 means the gateway host cannot reach the compute node under the name the scheduler reports. - An endpoint with an idle timeout longer than 8 hours can lose its routing entry before it is stopped and answer 503
endpoint_unavailablewhile shown as Running. - The gateway speaks plain HTTP and sits behind the deployment's TLS termination. If streamed completions arrive in bursts rather than token by token, the reverse proxy in front of the gateway is buffering responses.
- The connection route answers 400
inference_gateway_unconfigureduntil the deployment has given the API the gateway's public address. - The
inference_servingflag is read globally by the management routes and per workspace by the gateway (a workspace override applies on the data plane). - Switching
inference_servingoff makes the workspace and operator routes answer 404feature_disabled, hides the Inference page, the sidebar item and the Serve buttons, and makes the gateway answer 404 for every request. The health pass keeps running, so idle endpoints still stop and dead jobs still reconcile. Endpoints, tokens and usage are kept; re-enabling resumes where it left off. - Planned: multiple replicas and autoscaling, warm pools, gateway-level rate limiting and per-request pricing. None of these exist in 2.48.6.
Related pages
- Capabilities by delivery model
- Model catalogue: where the ready model grants come from
- Jobs and scheduling: the cluster the endpoint jobs run on
- Quotas and capacity: the project quota frame checked at creation
- Reports and accounting: the Inference tokens section of the consumption reports
- Deployment and integration: gateway, engines and bring-up order