Use the Prem API SDK
1. Create an API key
- Open the dashboard. Sign in or register.
- Go to the API section.
- Create a new API key. Copy the key to a safe location.
PREM_API_KEY. Do not commit the API key to source control.
2. Install the SDK and make your first call
Install the TypeScript SDK from npm:CLIENT_KEK is your Key Encryption Key (KEK). The KEK is a 32-byte base64 secret that you generate and keep. The KEK protects your encryption keys and does not leave your device. See Encryption. Add the variables to your .env file:
Get the latest endpoint values from
dashboard.prem.io/endpoints.json.3. Run a request
Run your script. The console shows the response.Use the OpenAI SDK
Run the bundled Confidential Proxy to expose OpenAI-compatible routes on your machine. Point thebaseURL of an OpenAI client at the Confidential Proxy. You do not change the SDK.
.env file:
Get the latest endpoint values from
dashboard.prem.io/endpoints.json./v1 URL. The client sends your API key as the bearer token with each request:
Next steps
API reference
Chat completions and other endpoints in detail.
Guides
Step-by-step guides for common flows (chat, audio, and more).
Models & Pricing
Available models, pricing tiers, and deployment strategies.

