← Back to Integrations
OpenAI
freeOpenAI SDK with typed chat, embeddings, and streaming.
Install
npx integrateapi add openaiFeatures
- Chat
- Embeddings
- Streaming
- Assistants
Environment variables
| Variable | Description |
|---|---|
OPENAI_API_KEY | OpenAI API key |
Example
import { openai } from "@/lib/integrations/openai"
const stream = await openai.chat.completions.create({ model: "gpt-4", messages: [...] })