openai-sdk
OpenAI official SDK usage (Python, Node.js). Use when: writing code that calls OpenAI API, implementing chat/embeddings/images/audio features, handling streaming responses, async patterns, error handling with SDK. For raw HTTP/REST calls, see `openai-api` skill.
npx skills add majiayu000/claude-skill-registry --skill openai-sdk --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 SDK Official SDKs for Python and Node.js. Handles auth, retries, types automatically. ## Quick Start ### Python ```bash pip install openai ``` ```python from openai import OpenAI client = OpenAI() # Uses OPENAI_API_KEY env var response = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello!"}] ) print(response.choices[0].message.content) ``` ### Node.js ```bash npm install openai ``` ```typescript import OpenAI from "openai"; const client = new OpenAI(); // Uses OPENAI_API_KEY env var const response = await client.chat.completions.create({ model: "gpt-4o", messages: [{ role: "user", content: "Hello!" }], }); console.log(response.choices[0].message.content); ``` ## Environment Variables ```bash export OPENAI_API_KEY="sk-..." export OPENAI_ORG_ID="org-..." # Optional export OPENAI_PROJECT_ID="proj-..." # Optional ``` ## Key Features | Feature | Python | Node.js | |---------|--------|---------| | Sync client | `OpenAI()` | `new OpenAI()` | | Async client | `AsyncOpenAI()` | Same (async/await) | | Streaming | `stream=True` | `stream: true` | | Auto-retry | Built-in | Built-in | | Timeout | `timeout=60` | `timeout: 60000` | | Types | Full
- Quick Start
- Python
- Node.js
- Environment Variables
- Key Features
- Common Operations
- Chat Completion
- Streaming
- Embeddings
- Image Generation
- Audio Transcription
- Error Handling
- References
- Related
pip install openai npm install openai export OPENAI_API_KEY="sk-..." export OPENAI_ORG_ID="org-..." # Optional export OPENAI_PROJECT_ID="proj-..." # Optional
What does the openai-sdk skill do?
OpenAI official SDK usage (Python, Node.js). Use when: writing code that calls OpenAI API, implementing chat/embeddings/images/audio features, handling streaming responses, async patterns, error handling with SDK. For raw HTTP/REST calls, see `openai-api` skill.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill openai-sdk --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.
