Skip to main content
Prem Router uses the OpenAI-compatible Chat Completions API. The capabilities on this page are verified against the current beta model catalog. Use the quickstart to create the client used in these examples. These are API capabilities. Individual harnesses may not expose every control in their user interface.
Prem Router is not confidential. Do not send secrets, personal data, regulated data, or other sensitive data.

Compatibility at a glance

Tool calling

Pass standard OpenAI function tools. Set parallel_tool_calls=False when your application must execute one action at a time.
To continue the tool loop, execute the function, append the complete assistant message, then append a tool message whose tool_call_id matches the call ID. Send the updated message list in the next request.

Structured output

Use strict JSON Schema when your application needs a predictable response shape. Include the word JSON in the request message.

Reasoning and output limits

Use reasoning.enabled to turn model reasoning on or off. Both max_tokens and max_completion_tokens are accepted; do not send conflicting values for both fields.

Streamed usage

Set include_usage to receive token usage in the final stream chunk. That chunk can contain an empty choices array.

Vision and log probabilities

Vision support currently covers base64-encoded images in image_url content parts. For a model that supports log probabilities, use the standard OpenAI fields:
See Custom Providers and Coding Tools for OpenCode, Pi, and other harnesses.