InferBridge implements a practical subset of the OpenAI API plus local model, device, benchmark, diagnostics, onboarding, and desktop-operation routes. CI tests the contract in mock mode, and scripts/validate_windows.ps1 can certify it against real Windows hardware.
| Level | Meaning |
|---|---|
| Mock contract | Route, schema, streaming, lifecycle, and error behavior tested without OpenVINO hardware. |
| Real CPU certified | A Windows report completed with mock mode disabled on CPU. |
| Real GPU certified | A Windows report completed on an OpenVINO-visible Intel GPU. |
| Real NPU certified | A Windows report completed on an OpenVINO-visible Intel NPU. |
| Client verified | The actual external client was manually connected in addition to black-box contract validation. |
A mock contract result is not evidence that a driver or hardware target works.
Returns an OpenAI-style model list. InferBridge includes local lifecycle status as an additional field.
Supported request fields:
modelmessagesmax_tokenstemperaturetop_pstreamstream_options.include_usagestopas a string or arrayseedtoolstool_choiceresponse_formatlora_pathlora_alpha
Streaming uses Server-Sent Events with chat.completion.chunk payloads and terminates with data: [DONE].
Tool calling is implemented with a prompt and parser shim because OpenVINO GenAI does not provide native OpenAI tool-call semantics. Whether a model reliably emits a valid call depends on the model and prompt. Malformed calls receive bounded retry handling.
response_format is passed to OpenVINO structured-output support when the installed OpenVINO GenAI version exposes it. Older versions or unsuitable models may accept the request without producing strict JSON. The certification report records that as a warning rather than claiming schema enforcement.
Dynamic LoRA and speculative decoding depend on the installed OpenVINO GenAI version and compatible model artifacts. They are API-supported but require separate real-runtime validation for each adapter or draft-model combination.
Supported fields:
modelinputas text or message-like inputinstructionsmax_output_tokenstemperaturestreamlora_pathlora_alpha
Non-streaming responses return an OpenAI-style response object. Streaming emits:
response.createdresponse.output_text.deltaresponse.output_text.doneresponse.completeddata: [DONE]
This route is the recommended compatibility path for n8n workflows that use the Responses API.
Supported fields and limits:
modelinputas one string or a list of strings- at most 256 input strings and 2,000,000 combined characters
- empty strings are rejected
encoding_formatasfloatorbase64useris accepted for client compatibility
The selected model must use the openvino-embeddings backend. Text-generation models are rejected, and embedding models are rejected by generation routes.
| Method | Route | Purpose |
|---|---|---|
POST |
/v1/models/register |
Add a custom catalog entry. |
GET |
/v1/models/search-hf |
Search compatible Hugging Face models. |
POST |
/v1/models/download-custom |
Register, convert, and optionally load a custom model. |
POST |
/v1/models/convert |
Convert a catalog model in the background. |
POST |
/v1/models/load |
Load a converted model on a selected device. |
POST |
/v1/models/unload |
Free a loaded engine. |
POST |
/v1/models/delete |
Delete an unloaded model's local IR directory. |
GET |
/v1/devices |
Return OpenVINO discovery and device suggestions. |
GET |
/v1/system/status |
Return telemetry, lifecycle progress, metrics, and recent safe events. |
GET |
/v1/keys/stats |
Return per-key usage counters without exposing keys. |
POST |
/v1/benchmarks/run |
Benchmark model and device combinations. |
GET |
/v1/benchmarks |
List locally persisted benchmark runs. |
GET |
/v1/benchmarks/latest |
Return the latest run and recommendation. |
DELETE |
/v1/benchmarks |
Clear saved benchmark runs. |
POST |
/v1/chat/export |
Export a supplied conversation as Markdown. |
Model conversion and loading are asynchronous. Clients should poll /v1/system/status and inspect the matching catalog entry until is_loaded is true or an error state is returned.
Custom registration and download requests accept trust_remote_code. It defaults to false; set it to true only for a reviewed Hugging Face repository whose custom Python code is explicitly trusted. /v1/models/convert accepts null to use the catalog policy or a boolean to override it for that conversion.
GET /healthreturns process, runtime, device, and model-count state.GET /health/liveis an unauthenticated liveness probe.GET /health/readyreturns 503 while model preparation is active and 200 otherwise.
Health routes remain available without an API key so local supervisors can check the process. /v1/* routes are protected when OV_LLM_API_KEY is set.
Set one or more comma-separated keys with OV_LLM_API_KEY. Protected requests must send:
Authorization: Bearer <key>
Repeated failed authentication attempts are throttled. Keys are compared using a constant-time comparison and are not returned by usage endpoints.
OV_LLM_CORS_ORIGINS is blank by default, so cross-origin browser access is disabled. The bundled UI is served from the API origin and does not need CORS. Configure explicit comma-separated origins for Open WebUI or another browser client. Wildcard CORS is supported for compatibility but should be paired with an API key and avoided when possible.
OV_LLM_RATE_LIMIT applies a per-IP requests-per-minute limit when greater than zero. It is a local safety control, not a replacement for a hardened reverse proxy.
InferBridge uses conventional status codes:
400invalid request, device expression, model or backend pairing, or conversion option401missing or invalid API key404unknown model409model is unloaded, busy, loading, or in a conflicting lifecycle state413request body exceeds the configured maximum429configured rate limit or repeated authentication failures500inference, conversion, deletion, or internal runtime failure503no model is available or readiness is temporarily blocked
Responses include an X-Request-ID. Safe client-supplied IDs are preserved; invalid values are replaced to prevent log injection.
python scripts/validate_api_contract.py --profile core
python scripts/validate_api_contract.py --profile openwebui
python scripts/validate_api_contract.py --profile n8n
python scripts/validate_api_contract.py --profile fullThe full profile covers both external-client request shapes, streaming cancellation, optional embeddings, optional benchmarks, and optional lifecycle exercise. The validator records metadata and assertions only. It does not save prompts or model output.