openai-api
Build with OpenAI APIs including GPT-4, GPT-4o, function calling, embeddings, vision, and Assistants. Covers chat completions, structured outputs, streaming, and token optimization. Use when integrating OpenAI models into applications.
npx skills add majiayu000/claude-skill-registry --skill openai-api-fgarofalo56-suppercharge-microso --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.
What it does
Describes a skill that guides an AI agent to build applications with OpenAI APIs, including chat completions, structured outputs, function calling, vision, embeddings, and assistants. It covers installation, client setup for Python and TypeScript, and concrete usage examples for chat completions, JSON/structured outputs, tool integration, vision analysis, embeddings, streaming, and assistants.
How it works
The skill explicitly instructs how to set up clients (Python OpenAI class, environment-based API key), then demonstrates usage patterns:
- Chat Completions: create/send messages with models like gpt-4o or gpt-4-turbo; includes basic and multi-turn examples.
- Structured Outputs / JSON Mode: render structured responses either as JSON or via typed schemas (Pydantic, TypeScript with Zod) and parse results.
- Function Calling / Tools: define tools with type "function", execute tool calls when the model emits tool_calls, run tools, and feed results back for a final response; includes parallel tool calls.
- Vision (Image Inputs): describe how to send image data or URLs in messages and receive descriptive results; supports single and multiple images.
- Embeddings: generate embeddings with text-embedding-3-small or large, demonstrate single and batch usage, and show a semantic search example.
- Streaming Responses: show basic streaming and streaming with tool calls for real-time output.
- Assistants API: create an assistant with tools, run conversations, and handle file handling and vector stores.
- Token Management & Cost Optimization: include functions to count tokens, truncate context, manage conversation tokens, and a pricing table for reference.
When to use it
Use when integrating OpenAI models into applications and you need guidance on chat, structured outputs, tool integration, vision, embeddings, streaming, and assistants with practical code examples.
What it can touch
The skill references concrete code blocks for Python and TypeScript clients, including calls to: "OpenAI" client initialization, "client.chat.completions.create", "client.embeddings.create", "client.beta.assistants.create", and tool structures under a list named "tools". It also shows function execution helpers and tool response handling. Tools include function calling definitions and example execution flow; streaming interfaces are demonstrated for Python and TypeScript.
Caveats
License: MIT. The skill lists a single declared tool: "claude-code". It does not state outcomes beyond the provided usage examples, nor guarantees performance or compatibility beyond the examples.
# OpenAI API Skill > Build production-ready applications with OpenAI's GPT-4, GPT-4o, embeddings, vision, and Assistants API. ## Quick Reference | Feature | Model | Use Case | | ------------------ | -------------------------------- | ------------------------------ | | Chat Completions | `gpt-4o`, `gpt-4-turbo` | Conversations, reasoning | | Structured Outputs | `gpt-4o-2024-08-06+` | JSON schemas, typed responses | | Function Calling | `gpt-4o`, `gpt-4-turbo` | Tool use, API integration | | Vision | `gpt-4o`, `gpt-4-vision-preview` | Image analysis | | Embeddings | `text-embedding-3-small/large` | Semantic search, RAG | | Assistants | `gpt-4o`, `gpt-4-turbo` | Stateful agents, file handling | --- ## Installation ```bash # Python pip install openai # Node.js / TypeScript npm install openai ``` ### Client Setup **Python:** ```python from openai import OpenAI # Uses OPENAI_API_KEY env var by default client = OpenAI() # Or explicit key client = OpenAI(api_key="sk-...") ``` **TypeScript:** ```typescript import OpenAI from "openai"; const openai = new OpenAI(); // Uses OPENAI_API_KEY env var // Or: new OpenAI({ apiKey: 'sk-...' }) ``` --- ## Chat Completions ### Basic Chat **Python:** ``
- Quick Reference
- Installation
- Client Setup
- Chat Completions
- Basic Chat
- Multi-Turn Conversation
- Model Selection Guide
- Structured Outputs / JSON Mode
- JSON Mode (Legacy)
- Structured Outputs with JSON Schema (Recommended)
- Function Calling / Tools
- Define Tools
- Execute Tool Calls
- Parallel Tool Calls
Python pip install openai Node.js / TypeScript npm install openai
What does the openai-api skill do?
Build with OpenAI APIs including GPT-4, GPT-4o, function calling, embeddings, vision, and Assistants. Covers chat completions, structured outputs, streaming, and token optimization. Use when integrating OpenAI models into applications.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill openai-api-fgarofalo56-suppercharge-microso --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.
