openai-sdk

Integrate OpenAI API chat completions, streaming, tool calling, and structured JSON outputs.

6|1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill openai-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openai-sdk
Source: https://github.com/RepairYourTech/cfsa-antigravity/tree/main/.agent/skill-library/stack/ai/openai-sdk
Command: npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill openai-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, tiktoken, zod, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the integration of OpenAI's powerful language and vision models into your applications, enabling advanced AI capabilities without complex setup.

Core Features & Use Cases

  • Chat Completions: Implement conversational AI, chatbots, and text generation.
  • Streaming: Provide real-time responses for a better user experience.
  • Function/Tool Calling: Enable AI to interact with external tools and APIs.
  • Structured Outputs: Ensure AI responses are in predictable JSON formats.
  • Vision: Process and understand image inputs.
  • Embeddings: Generate vector representations for semantic search and analysis.
  • Moderation: Filter harmful or inappropriate content.
  • Use Case: Build a customer support chatbot that can answer questions, access a knowledge base via tool calls, and even analyze uploaded product images.

Quick Start

Use the openai-sdk skill to generate a response to the user's message using the gpt-4o model.

Frequently Asked Questions about openai-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement OpenAI chat completions with streaming responses?

Structured JSON outputs from OpenAI models are enforced by defining response schemas using zod. This ensures AI completions return predictable, validated data formats for downstream application processing.

Can I use OpenAI vision models to analyze and process image inputs?

OpenAI function and tool calling connects AI models to external tools and APIs. By defining functions, the model can decide when to execute them, enabling interactions with external knowledge bases or custom services.

How do I generate OpenAI embeddings for semantic search?

OpenAI API integration can be configured with custom timeout and retry settings to handle network issues. The SDK provides robust error handling to manage failed requests and maintain application stability.

What is the best way to moderate harmful content using OpenAI?

Content moderation using OpenAI filters harmful or inappropriate text by sending it to the moderation API endpoint. This evaluates the input against safety policies and returns categorization results.