Pollio
All integrations

OpenAI Node

The official SDK for Node and TypeScript.

Uses the OpenAI Chat Completions API. OpenAI Node docs

Public

Install the SDK with npm install openai, then pass Pollio's base URL and your key.

Fig. I, hello.mjs

// npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.pollio.ai/v1",
  apiKey: "pl-live-...",
});

const completion = await client.chat.completions.create({
  model: "deepseek/deepseek-v4.1-flash",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Private

Start pollio proxy on your machine, then point OpenAI Node at it instead.

Fig. II, hello.mjs

// npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "http://127.0.0.1:8787/v1",
  apiKey: "pl-live-...",
});

const completion = await client.chat.completions.create({
  model: "deepseek/deepseek-v4.1-flash",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Names and logos belong to their owners. No endorsement implied.