JavaScript
Configure the official OpenAI JavaScript client for Pomerai.
API in development
These guides describe the planned integration. There is no operational Pomerai base URL or confirmed model list yet. The examples configure a client; they do not make a model request.
Install
npm install openaiEnvironment variables
POMERAI_API_KEY=YOUR_POMERAI_API_KEY
POMERAI_BASE_URL=YOUR_POMERAI_BASE_URLReplace the placeholders only when Pomerai has issued your key and published its operational base URL.
Client configuration
The example reads both values from environment variables and configures the client only. It intentionally does not call an endpoint or name an unconfirmed model.
import OpenAI from "openai";
const apiKey = process.env.POMERAI_API_KEY;
const baseURL = process.env.POMERAI_BASE_URL;
if (!apiKey || !baseURL) {
throw new Error("Set POMERAI_API_KEY and POMERAI_BASE_URL");
}
const client = new OpenAI({ apiKey, baseURL });Run this code on your server. Never expose your API key in a browser.
These configuration examples follow the official SDK documentation.
Official SDK reference