openai-api
Integrates OpenAI APIs for chat completions, embeddings, and image generation. Use when building AI-powered features with GPT models, DALL-E, or Whisper in Node.js applications.
npx skills add majiayu000/claude-skill-registry --skill openai-api --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# OpenAI API Official Node.js/TypeScript SDK for OpenAI. Access GPT models for chat, embeddings, image generation, and audio transcription. ## Quick Start ```bash npm install openai ``` ### Setup ```typescript import OpenAI from 'openai'; const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, }); ``` ## Chat Completions ### Basic Chat ```typescript const completion = await openai.chat.completions.create({ model: 'gpt-4o', messages: [ { role: 'system', content: 'You are a helpful assistant.' }, { role: 'user', content: 'Hello, how are you?' }, ], }); console.log(completion.choices[0].message.content); ``` ### With Parameters ```typescript const completion = await openai.chat.completions.create({ model: 'gpt-4o', messages: [ { role: 'user', content: 'Write a haiku about programming' }, ], temperature: 0.7, max_tokens: 100, top_p: 1, frequency_penalty: 0, presence_penalty: 0, }); ``` ### Streaming ```typescript const stream = await openai.chat.completions.create({ model: 'gpt-4o', messages: [{ role: 'user', content: 'Tell me a story' }], stream: true, }); for await (const chunk of stream) { const content = chunk.choices[0]?.delta?.content || ''; process.stdout.write(content);
- Quick Start
- Setup
- Chat Completions
- Basic Chat
- With Parameters
- Streaming
- Streaming with Helpers
- Function Calling (Tools)
- Structured Output (JSON Mode)
- With JSON Schema
- Embeddings
- Multiple Inputs
- Image Generation (DALL-E)
- Image Edit
npm install openai
What does the openai-api skill do?
Integrates OpenAI APIs for chat completions, embeddings, and image generation. Use when building AI-powered features with GPT models, DALL-E, or Whisper in Node.js applications.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill openai-api --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
