Prem API is an end-to-end encrypted, OpenAI-compatible API: chat, audio, and models behind the same familiar request shapes. Use the TypeScript SDK, or run the bundled local proxy and connect with any OpenAI client — you can be up and running in a few lines of code.Documentation Index
Fetch the complete documentation index at: https://docs.prem.io/llms.txt
Use this file to discover all available pages before exploring further.
Using the Prem API SDK
1. Create an API key
- Open the Dashboard and sign in (or register).
- Go to the API section.
- Create a new API key and copy it somewhere safe.
PREM_API_KEY) and avoid committing it to source control.
2. Install the SDK and make your first call
Install the TypeScript SDK from npm:.env file:
Get the latest endpoint values from
dashboard.prem.io/endpoints.json.3. Run a request
That’s it — run your script and you should see a response printed to the console.Using the OpenAI SDK
You can run a small Express server that exposes OpenAI compatible routes. Any OpenAI client can point itsbaseURL at this server — no SDK changes required.
.env file:
Get the latest endpoint values from
dashboard.prem.io/endpoints.json./v1 URL:
Next steps
API reference
Chat completions and other endpoints in detail.
Recipes
Step-by-step guides for common flows (chat, audio, and more).

