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:
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:
/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).

