Skip to main content

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 (vllm or tgi), 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. GET and POST on any path under /v1/ are forwarded to the engine's /v1/ with the same path, so POST /v1/chat/completions, POST /v1/completions and GET /v1/models behave as the engine implements them. Token usage is extracted from POST /v1/chat/completions and POST /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 usage object (non-streaming responses from the body; streaming responses from the final usage chunk, which the gateway asks for by adding stream_options.include_usage when the client did not send stream_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 to error). A stopped endpoint is started again with Start; nothing starts it automatically.
  • Moves through the states starting, running, stopping, stopped and error.
  • Is switched on per deployment with the inference_serving feature flag.

Where it is​

SurfacePath
Web appInference 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 consolePlatform, 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
CLInone

How to use it​

Create an endpoint​

  1. Make sure the model is ready on the project: a mount or a finished copy from the Model catalogue.
  2. 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 ManageProjects workspace permission (see Permissions); every member can read the lists and usage.
  3. 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.
  4. 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.
  5. 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​

  1. 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.
  2. Press URL on the endpoint row to copy its base URL (.../e/{endpoint_id}/v1), or read it from GET .../endpoints/{id}/connection, which also returns a curl example.
  3. 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_usage to a streaming request that has no stream_options of its own and never overrides one the client sent.
  4. Revoke a token with Revoke; see Numbers for how quickly revocation takes effect.

Stop, start and delete​

  1. 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.
  2. 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.
  3. Delete is accepted only for an endpoint in Stopped or Error (409 endpoint_not_stopped otherwise) and removes the endpoint's usage history with it.

Watch endpoints across workspaces (operator)​

  1. 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 ~.
  2. 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_conflict and refreshes. Operators cannot start a tenant's endpoint; the tenant does that.
  3. 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​

WhatValueWhere it is set
Idle timeout60 minutes by default, minimum 1 minuteper endpoint, at creation
Health pass (idle stop and state reconciliation)every 5 minutes, also while the flag is offplatform
Starting with no report from the enginemarked error with reason job_missing after 15 minutesplatform
Stopping to Stoppedwritten by the health pass: up to two passes, about 10 minutes, in the worst caseplatform
Replicas per endpoint1platform
Serving enginesvllm, tgi (mock exists for the platform's own tests and is hidden from the create dialog)platform
Token secretcbr_inf_ followed by 40 random characters; 12 characters are kept as the display prefixplatform
Token check on the gatewaya successful lookup is cached for 60 seconds; unknown and revoked tokens are checked against the database on every requestplatform
Revocation takes effectwithin 60 seconds for a token used shortly before; immediately for a token not used in the last 60 secondsplatform
Usage recordingper-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 cadenceper deployment
Usage windowtrailing 30 days when from and to are omittedper request
Request body on /v1/completions and /v1/chat/completionsup to 2 MiB; larger bodies answer 413 request_too_largeplatform
Routing entry of a running endpointexpires 8 hours after the last requestplatform
Page refreshweb app every 5 seconds and operator console every 10 seconds, while an endpoint is starting or stoppingplatform
Endpoint nameunique 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.

StatuscodeWhen
401invalid_api_keyMissing, malformed, unknown or revoked bearer token
404endpoint_not_foundUnknown endpoint, another workspace's endpoint, or inference_serving off for the token's workspace
409endpoint_not_runningThe endpoint exists but is not Running
413request_too_largeCompletion request body over 2 MiB
502upstream_errorThe engine could not be reached or dropped the connection
503endpoint_unavailableNo 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/models and any other engine route count as a request with zero tokens.
  • The engines are not installed by the platform. The deployment makes the vllm and text-generation-launcher commands 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 error with job_missing after 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_unavailable while 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_unconfigured until the deployment has given the API the gateway's public address.
  • The inference_serving flag is read globally by the management routes and per workspace by the gateway (a workspace override applies on the data plane).
  • Switching inference_serving off makes the workspace and operator routes answer 404 feature_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.