Setup guides
fremai works with any OpenAI-compatible client. Each guide below is a copy-paste starting point — the only fremai-specific settings are the base URL (https://api.fremai.eu/v1) and your key (sk-fremai-…) or an OAuth login.
opencode · hero path
Log in with fremai login or the @fremai/opencode-auth plugin. OAuth-only — you never paste a key.
OpenAI SDK
Python and JavaScript/TypeScript. Override base_url / baseURL, keep the rest of your code.
curl
Raw HTTP against the endpoints — handy for scripts, CI, and debugging.
LangChain
Point ChatOpenAI at fremai and use it anywhere in a LangChain app.
Which auth do I use?
- opencode uses OAuth only — the plugin mints and refreshes a short-lived key for you, so nothing is pasted or stored in a config file.
- Everything else (OpenAI SDK, curl, LangChain, CI) uses a static
sk-fremai-…key — the drop-in path. Machines can also use an OAuth client-credentials grant.
Full details in the authentication reference.