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.

3,891 stars

Best use case

openai is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using openai should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/openai/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/aiwithabidi/openai/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/openai/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How openai Compares

Feature / AgentopenaiStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 🧠 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

```bash
# Send chat completion
python3 {baseDir}/scripts/openai.py chat "Explain quantum computing in 3 sentences" --model gpt-4o
```

```bash
# Chat with system prompt
python3 {baseDir}/scripts/openai.py chat-system --system "You are a Python expert" "How do I use asyncio?"
```

```bash
# Generate embeddings
python3 {baseDir}/scripts/openai.py embed "The quick brown fox" --model text-embedding-3-small
```

```bash
# Generate an image
python3 {baseDir}/scripts/openai.py image "A sunset over mountains, oil painting style" --size 1024x1024
```



## Commands

### `chat`
Send chat completion.
```bash
python3 {baseDir}/scripts/openai.py chat "Explain quantum computing in 3 sentences" --model gpt-4o
```

### `chat-system`
Chat with system prompt.
```bash
python3 {baseDir}/scripts/openai.py chat-system --system "You are a Python expert" "How do I use asyncio?"
```

### `embed`
Generate embeddings.
```bash
python3 {baseDir}/scripts/openai.py embed "The quick brown fox" --model text-embedding-3-small
```

### `image`
Generate an image.
```bash
python3 {baseDir}/scripts/openai.py image "A sunset over mountains, oil painting style" --size 1024x1024
```

### `transcribe`
Transcribe audio file.
```bash
python3 {baseDir}/scripts/openai.py transcribe recording.mp3
```

### `tts`
Text to speech.
```bash
python3 {baseDir}/scripts/openai.py tts "Hello, welcome to our service" --voice alloy --output greeting.mp3
```

### `models`
List available models.
```bash
python3 {baseDir}/scripts/openai.py models
```

### `model-get`
Get model details.
```bash
python3 {baseDir}/scripts/openai.py model-get gpt-4o
```

### `files`
List uploaded files.
```bash
python3 {baseDir}/scripts/openai.py files
```

### `file-upload`
Upload a file.
```bash
python3 {baseDir}/scripts/openai.py file-upload data.jsonl --purpose fine-tune
```

### `fine-tune`
Create fine-tuning job.
```bash
python3 {baseDir}/scripts/openai.py fine-tune '{"training_file":"file-abc123","model":"gpt-4o-mini"}'
```

### `fine-tune-list`
List fine-tuning jobs.
```bash
python3 {baseDir}/scripts/openai.py fine-tune-list
```

### `moderate`
Check content moderation.
```bash
python3 {baseDir}/scripts/openai.py moderate "Some text to check"
```

### `usage`
Check API usage.
```bash
python3 {baseDir}/scripts/openai.py usage --date 2026-02-01
```

### `assistants`
List assistants.
```bash
python3 {baseDir}/scripts/openai.py assistants
```


## Output Format

All commands output JSON by default. Add `--human` for readable formatted output.

```bash
# JSON (default, for programmatic use)
python3 {baseDir}/scripts/openai.py chat --limit 5

# Human-readable
python3 {baseDir}/scripts/openai.py chat --limit 5 --human
```

## Script Reference

| Script | Description |
|--------|-------------|
| `{baseDir}/scripts/openai.py` | Main CLI — all OpenAI operations |

## Data Policy

This skill **never stores data locally**. All requests go directly to the OpenAI API and results are returned to stdout. Your data stays on OpenAI servers.

## Credits
---
Built by [M. Abidi](https://www.linkedin.com/in/mohammad-ali-abidi) | [agxntsix.ai](https://www.agxntsix.ai)
[YouTube](https://youtube.com/@aiwithabidi) | [GitHub](https://github.com/aiwithabidi)
Part of the **AgxntSix Skill Suite** for OpenClaw agents.

📅 **Need help setting up OpenClaw for your business?** [Book a free consultation](https://cal.com/agxntsix/abidi-openclaw)

Related Skills

openai-whisper

3891
from openclaw/skills

Local speech-to-text with the Whisper CLI (no API key).

openai-image-gen

3891
from openclaw/skills

Batch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery.

openai-auth-switcher-public

3891
from openclaw/skills

Web-first, publishable OpenClaw skill for OpenAI OAuth account switching. Use when you need a reusable public-track workflow for first-run takeover, environment discovery, doctor checks, runtime inspection, slot management, dry-run validation, controlled switch experiments, rollback planning, and release-safe packaging without bundling live auth snapshots, logs, callbacks, or other machine-specific runtime data.

openai-docs-skill

3891
from openclaw/skills

Query the OpenAI developer documentation via the OpenAI Docs MCP server using CLI (curl/jq). Use whenever a task involves the OpenAI API (Responses, Chat Completions, Realtime, etc.), OpenAI SDKs, ChatGPT Apps SDK, Codex, MCP integrations, endpoint schemas, parameters, limits, or migrations and you need up-to-date official guidance.

aj-openai-whisper

3891
from openclaw/skills

Local speech-to-text with the Whisper CLI (no API key).

openai Models for vwu.ai

3891
from openclaw/skills

vwu.ai 平台上的 openai 模型调用技能。

openai-symphony-autonomous-agents

3823
from openclaw/skills

Symphony turns project work into isolated, autonomous implementation runs, allowing teams to manage work instead of supervising coding agents.

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research