Promptly Node.js SDK
Official Node.js SDK - TypeScript-first, zero config
Install the Promptly SDK for Node.js and start saving immediately. Extends the OpenAI client with Promptly defaults.
Setup Guide
Install the SDK
Works with Node.js 18+ and any TypeScript project.
npm install promptly-sdkCreate a Client
Extends the official OpenAI Node.js SDK. Full TypeScript types included.
import Promptly from "promptly-sdk";
const client = new Promptly({ apiKey: "sk-promptly-..." });
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);Or Wrap an Existing Client
Already using the OpenAI SDK? Wrap your existing client instance to route through Promptly.
import OpenAI from "openai";
import { wrap } from "promptly-sdk";
const client = wrap(new OpenAI({ apiKey: "sk-promptly-..." }));
// All existing code works unchangedWhy Use Promptly with Promptly Node.js SDK?
- One-line install - npm install promptly-sdk
- Full TypeScript support with type definitions
- wrap() existing OpenAI clients instantly
- Streaming and all OpenAI features supported
- Works with Next.js, Express, Fastify, and more
Start optimizing Promptly Node.js SDK costs
Sign up, grab your API key, and change your base URL. Under 2 minutes.
Other Integrations
Promptly Python SDK
Official Python SDK - the fastest way to get started
LangChain
Use Promptly as your LLM backend in LangChain
Vercel AI SDK
Optimize AI SDK streaming responses with Promptly
LlamaIndex
Optimize your RAG pipeline costs with Promptly
OpenAI Python SDK
Drop-in optimization for the official OpenAI Python library