openai-api

openai-api is a skill for Claude Code, Codex from Jignesh-Ponamwar/skills-mcp. It costs 110 tokens per session (2,406 once invoked), scanned A, original, Apache-2.0.

A guide to building applications with the OpenAI API, the programming interface that lets software use OpenAI models. It covers text, images, audio, streaming, tool calls, embeddings, and structured responses across Python and TypeScript.

In plain words
What is it for?
Use it when adding OpenAI-powered chat, image generation, vision, speech transcription, text-to-speech, search by meaning, or function calling to software.
Why use it?
It reduces the uncertainty of choosing models, setting up authentication, and connecting model features to an application.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding OpenAI-powered chat, image generation, vision, speech transcription, text-to-speech, search by meaning, or function calling to software.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jignesh-ponamwar/skills-mcp/openai-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Jignesh-Ponamwar/skills-mcp --skill openai-api
Clone the repo
git clone --depth 1 https://github.com/Jignesh-Ponamwar/skills-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openai-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/openai-api/github.svg)](https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/openai-api)
Your own site
<a href="https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/openai-api"><img src="https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/openai-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openai-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/openai-api"><img src="https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/openai-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,406 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00110 $0.02406
Opus 5 $0.00055 $0.01203
Sonnet 5 $0.00022 $0.00481
Haiku 4.5 $0.00011 $0.00241

Measured 10d ago against content hash b5b50a08e7af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

openai-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill_mcp/skills_data/openai-api/SKILL.md · 355 lines

How it starts

The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenAI API Skill

Step 1: Choose the Right Model

Model Best For Context
gpt-4o Multimodal (text + vision), balanced 128K tokens
gpt-4o-mini Fast, cheap, most tasks 128K tokens
o3 Complex multi-step reasoning 200K tokens
o4-mini Efficient reasoning at low cost 200K tokens
text-embedding-3-large High-quality embeddings (3072-dim) -
text-embedding-3-small Affordable embeddings (1536-dim) -
dall-e-3 High-quality image generation -
whisper-1 Audio transcription -
tts-1-hd High-quality text-to-speech -

Step 2: Setup

pip install openai         # Python
npm install openai          # Node.js / TypeScript
from openai import OpenAI
import os

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])  # never hardcode
import OpenAI from 'openai'

const client = new OpenAI()  // reads OPENAI_API_KEY from env automatically

Step 3: Chat Completions

# Python
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain recursion with an example."},
    ],
    temperature=0.7,
    max_tokens=1024,
)
print(response.choices[0].message.content)
// TypeScript
const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'Explain recursion with an example.' },
  ],
  temperature: 0.7,
  max_tokens: 1024,
})
console.log(response.choices[0].message.content)

Step 4: Streaming

# Python
with client.chat.completions.stream(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Write a poem about the sea"}],
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)

Read the full file on GitHub · 355 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 355 lines · 110 tokens per session scan A b5b50a08e7af

Subscribe to this mod's changes

openai-api is a skill published in the GitHub repository Jignesh-Ponamwar/skills-mcp (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 110 tokens to every session and 2,406 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.