skills/openai-api/SKILL.md
OpenAI REST API integration guide. Use when: making direct HTTP calls to OpenAI API, understanding API structure without SDK, debugging API requests, learning request/response formats, handling errors and rate limits. Covers: authentication, Chat Completions, Embeddings, Images (DALL-E), Audio (Whisper/TTS), error handling, streaming.
npx skillsauth add timequity/vibe-coder openai-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Direct HTTP integration with OpenAI API. For SDK usage, see openai-sdk skill.
Base URL: https://api.openai.com/v1
curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{...}'
Optional headers:
OpenAI-Organization: org-xxx — for multi-org accountsOpenAI-Project: proj-xxx — for project-specific billing| Endpoint | Method | Use Case |
|----------|--------|----------|
| /chat/completions | POST | Text generation, chat |
| /embeddings | POST | Vector embeddings |
| /images/generations | POST | DALL-E image creation |
| /audio/transcriptions | POST | Whisper speech-to-text |
| /audio/speech | POST | TTS text-to-speech |
| /models | GET | List available models |
curl https://api.openai.com/v1/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
}'
Response structure:
{
"id": "chatcmpl-xxx",
"choices": [{
"message": {"role": "assistant", "content": "Hi! How can I help?"},
"finish_reason": "stop"
}],
"usage": {"prompt_tokens": 10, "completion_tokens": 8, "total_tokens": 18}
}
curl https://api.openai.com/v1/embeddings \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "text-embedding-3-small", "input": "Hello world"}'
Add "stream": true to request. Response is SSE:
data: {"choices":[{"delta":{"content":"Hello"}}]}
data: {"choices":[{"delta":{"content":" world"}}]}
data: [DONE]
For latest/complete docs, fetch:
https://cdn.openai.com/API/docs/txt/llms-api-reference.txthttps://cdn.openai.com/API/docs/txt/llms-guides.txtdevelopment
Hidden quality gate that runs before showing "Done!" to user - ensures all tests pass, build succeeds, and requirements met before claiming completion
data-ai
Use when about to claim work is complete or fixed - requires running verification commands and confirming output before making any success claims
tools
Generate UI components from natural language descriptions. Use when: user asks for a page, component, or UI element. Triggers: "create page", "add component", "show form", "make button", "страница", "компонент", "форма".
content-media
10 ready-to-use themes with colors and fonts for consistent styling. Use when: applying visual themes to pages, components, or design systems. Triggers: "theme", "color palette", "color scheme", "fonts", "branding", "visual identity", "design system colors".