openai
OpenAI API integration — chat completions, embeddings, image generation, audio transcription, file management, fine-tuning, and assistants via the OpenAI REST API. Generate text, create images with DALL-E, transcribe audio with Whisper, manage fine-tuning jobs, and build AI assistants. Built for AI agents — Python stdlib only, zero dependencies. Use for AI text generation, image creation, speech-to-text, embeddings, fine-tuning, and AI assistant building.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/aiwithabidi/openai🧠 OpenAI
OpenAI API integration — chat completions, embeddings, image generation, audio transcription, file management, fine-tuning, and assistants via the OpenAI REST API.
Features
- Chat completions — GPT-4o, GPT-5, o1 model responses
- Embeddings — text-embedding-3 for semantic search
- Image generation — DALL-E 3 image creation and editing
- Audio transcription — Whisper speech-to-text
- Text-to-speech — TTS with multiple voices
- File management — upload and manage files
- Fine-tuning — create and manage fine-tuning jobs
- Assistants — build and manage AI assistants
- Moderation — content moderation checks
- Models — list available models and details
Requirements
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY | ✅ | API key/token for OpenAI |
Quick Start
# Send chat completion
python3 {baseDir}/scripts/openai.py chat "Explain quantum computing in 3 sentences" --model gpt-4o
# Chat with system prompt
python3 {baseDir}/scripts/openai.py chat-system --system "You are a Python expert" "How do I use asyncio?"
# Generate embeddings
python3 {baseDir}/scripts/openai.py embed "The quick brown fox" --model text-embedding-3-small
# Generate an image
python3 {baseDir}/scripts/openai.py image "A sunset over mountains, oil painting style" --size 1024x1024
Commands
chat
Send chat completion.
python3 {baseDir}/scripts/openai.py chat "Explain quantum computing in 3 sentences" --model gpt-4o
chat-system
Chat with system prompt.
python3 {baseDir}/scripts/openai.py chat-system --system "You are a Python expert" "How do I use asyncio?"
embed
Generate embeddings.
python3 {baseDir}/scripts/openai.py embed "The quick brown fox" --model text-embedding-3-small
image
Generate an image.
python3 {baseDir}/scripts/openai.py image "A sunset over mountains, oil painting style" --size 1024x1024
transcribe
Transcribe audio file.
python3 {baseDir}/scripts/openai.py transcribe recording.mp3
tts
Text to speech.
python3 {baseDir}/scripts/openai.py tts "Hello, welcome to our service" --voice alloy --output greeting.mp3
models
List available models.
python3 {baseDir}/scripts/openai.py models
model-get
Get model details.
python3 {baseDir}/scripts/openai.py model-get gpt-4o
files
List uploaded files.
python3 {baseDir}/scripts/openai.py files
file-upload
Upload a file.
python3 {baseDir}/scripts/openai.py file-upload data.jsonl --purpose fine-tune
fine-tune
Create fine-tuning job.
python3 {baseDir}/scripts/openai.py fine-tune '{"training_file":"file-abc123","model":"gpt-4o-mini"}'
fine-tune-list
List fine-tuning jobs.
python3 {baseDir}/scripts/openai.py fine-tune-list
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-aiwithabidi-openai": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
agent-memory
Full AI agent memory stack — Mem0 unified memory engine with vector search (Qdrant) and knowledge graph (Neo4j), plus SQLite for structured data. Complete setup script and tools. Give your OpenClaw agent a real brain with semantic recall, entity relationships, and structured storage.
skill-auditor
Security audit and quarantine system for third-party OpenClaw skills. Use when evaluating, reviewing, or installing any skill from ClawHub or external sources. Automatically triggered before any skill installation.
Model Intel
Live LLM model intelligence and pricing from OpenRouter
deep-search
Multi-tier Perplexity search with Langfuse tracing. Three depth levels: quick (sonar), pro (sonar-pro), deep (sonar-reasoning-pro). Supports focus modes: internet, academic, news, youtube, reddit. Returns AI-synthesized answers with citations. Use for research, comparisons, market analysis, fact-checking. Triggers: search, research, look up, find out, compare, what is, deep search, web research.
amplitude
Amplitude product analytics — track events, analyze user behavior, run cohort analysis, manage user properties, and query funnel/retention data via the Amplitude API. Understand product usage, measure feature adoption, and analyze user journeys. Built for AI agents — Python stdlib only, zero dependencies. Use for product analytics, user behavior tracking, funnel analysis, retention analysis, and cohort segmentation.