Request an API key
Contact us to request a Prem Router API key. IncludeRouter access in your message.
Store the key in an environment variable. Do not commit it to source control.
Make your first request
Python
Install the OpenAI Python SDK:Node.js test
Use Node.js 22 or later. Install the OpenAI JavaScript SDK:router.test.mjs:
Available models
The following models are currently available:
For models marked Required, set
stream=True in Python or stream: true in JavaScript.
Use the exact lowercase model ID in every API request. Call GET /v1/models
with your API key to retrieve the current catalog; availability may change
during the beta.
See API capabilities for tools, structured output, reasoning controls, vision, and log probabilities.
API capabilities
Use tool calls, structured output, reasoning, vision, log probabilities, and usage reporting.
Add a custom provider
Configure Prem Router in OpenCode, Pi, and other OpenAI-compatible tools.

