ARLE exposes an OpenAI-compatible serving surface for text generation, model
discovery, health/readiness probes, runtime stats, and session persistence
through the dedicated infer binary.
This document is the reference map for the current HTTP boundary. Stability tiers still live in docs/support-matrix.md and docs/stability-policy.md.
This document covers the serving surface. The optional train-control proxy
under /v1/train/* is documented separately in the train/runtime docs.
| Category | Route | Notes |
|---|---|---|
| Generation | POST /v1/completions |
Raw prompt surface. SSE supported. |
| Generation | POST /v1/chat/completions |
Chat message surface. Non-streaming only. |
| Generation | POST /v1/responses |
Newer text/tool-call subset. Non-streaming and SSE supported. |
| Discovery | GET /v1/models |
Returns the boot-time serving identity snapshot. |
| Probes | GET /healthz |
Lightweight unauthenticated liveness probe. |
| Probes | GET /readyz |
Lightweight unauthenticated readiness probe; includes the boot-time identity snapshot. |
| Session persistence | POST /v1/sessions/{session_id}/save |
Persist a session snapshot. |
| Session persistence | POST /v1/sessions/{session_id}/load |
Load a previously saved session snapshot. |
| Session persistence | GET /v1/sessions/{session_id}/manifest |
Read the last saved session manifest. |
| Session persistence | DELETE /v1/sessions/{session_id} |
Delete persisted session state. |
| Operations | GET /metrics |
Prometheus metrics surface. |
| Operations | GET /v1/stats |
Human-readable runtime stats surface. |
POST /v1/completionssupports SSE streaming. Completion chunks always carryusage: null; the terminal chunk carries usage.stream_optionsis not parsed yet.POST /v1/chat/completionscurrently rejectsstream=true.POST /v1/responsessupports both non-streaming and SSE forms for the current text/tool-call subset. SSE emitsresponse.created,response.output_text.delta, terminalresponse.completed, then[DONE]. Requests that combinestream=truewithtoolsare rejected until the server can emit structured function-call deltas.
- JSON routes require
Content-Type: application/json; malformed JSON, missing content type, and oversized bodies return structured JSON errors instead of framework default text. - Unsupported top-level parameters on
/v1/completions,/v1/chat/completions, and/v1/responsesreturn structuredinvalid_parametererrors instead of being silently ignored. - Structured
invalid_parameterresponses include a machine-readableerror.paramfield. - Blank
prompt, emptymessages, and blankinputare validated through the same structuredinvalid_parameterpath. modelis optional on request bodies, but when present it must match the currently served model reported byGET /v1/models(case-insensitive; final path segment match allowed). Mismatches return404 model_not_found.- Streaming completions currently ignore OpenAI
stream_options; usage is emitted on the terminal completion chunk. - Chat and responses validation is explicit: supported roles are
system,user,assistant, andtool;contentpart arrays must be text-only. - Tool definitions must use
type=function; malformed assistanttool_callsand tool messages withouttool_call_idare rejected with structuredinvalid_parametererrors. /v1/chat/completionsrejectsstream=true;/v1/responsesrejectsstream=truewhentoolsare present instead of pretending to support streamed tool-call deltas.- JSON request bodies are capped at
16 MiB. - Optional auth uses
Authorization: Bearer <token>;401responses includeWWW-Authenticate. - Every HTTP response includes
X-Request-Id; a client-supplied value is preserved when valid, otherwise the server generates one. GET /healthzandGET /readyzstay lightweight and unauthenticated;readyzreports the boot-time identity snapshot without probing the backend again.405 Method Not Allowedresponses keep structured JSON bodies and includeAllowon both top-level and session routes.
/v1/responsesis still the current text/tool-call subset, not the full OpenAI Responses API.- Structured streamed tool-call deltas are not implemented yet, so
stream=truewithtoolsis rejected on both chat completions and responses. - Structured outputs are still pending on the
/v1/responsessurface.