Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications

Categories

🎓 Certifications
🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
CheatGrid
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications
LVLEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

ChatGPT & OpenAI API Cheat Sheet

ChatGPT & OpenAI API Cheat Sheet

Back to Developer Tools
Next Topic: Chrome DevTools Cheat Sheet
🎯Take a practice test on this topic7 practice tests · 243 questions→

The OpenAI API provides programmatic access to cutting-edge large language models (LLMs) including GPT-5.5, GPT-5.4, and specialized models for text generation, embeddings, image creation, speech, moderation, and video generation via the Sora API. Launched as a RESTful API with official SDKs for Python, Node.js, .NET, and other languages, it enables developers to integrate AI capabilities via simple HTTP requests or the Agents SDK for multi-agent workflows. Unlike the ChatGPT web interface, the API offers token-based pricing, fine-grained control over model parameters, and access to the Responses API — the recommended interface for all new applications since March 2025, offering built-in tools for web search, computer use, hosted shell, and MCP. Key to effective API usage in 2026 is understanding reasoning effort (the reasoning.effort parameter controlling the intelligence/cost tradeoff), extended prompt caching (up to 24 hours for eligible models, reducing costs by up to 90%), and the Assistants API sunset scheduled for August 26, 2026.


What This Cheat Sheet Covers

This topic spans 22 focused tables and 194 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: API EndpointsTable 2: Primary ModelsTable 3: Core ParametersTable 4: Message RolesTable 5: Function Calling & ToolsTable 6: Streaming & Real-TimeTable 7: Structured Outputs & JSON ModeTable 8: Embeddings & Semantic SearchTable 9: Prompt CachingTable 10: Authentication & API KeysTable 11: Rate Limits & PricingTable 12: Error HandlingTable 13: Advanced FeaturesTable 14: SDKs & LibrariesTable 15: Image Generation (GPT Image 2)Table 16: Audio & SpeechTable 17: ModerationTable 18: Fine-tuningTable 19: Responses API vs. Chat Completions APITable 20: ChatGPT Plus vs. APITable 21: Video Generation (Sora API)Table 22: Agents SDK & Orchestration

Table 1: API Endpoints

Every OpenAI capability lives at its own REST or WebSocket endpoint, and picking the right one shapes cost, latency, and how much state you manage. Start new text apps on the Responses API; reach for the specialized endpoints (embeddings, audio, images, video, moderation, batch) when the task matches their shape.

EndpointExampleDescription
POST /v1/responses
POST https://api.openai.com/v1/responses
• Responses API — recommended interface for all new applications
• built-in tools: web_search, file_search, code_interpreter, computer_use, shell, mcp, image_generation, tool_search, skills
• stateful: carry conversation context with previous_response_id instead of resending history
• best performance for reasoning models.
POST /v1/chat/completions
POST https://api.openai.com/v1/chat/completions
• Chat Completions API — industry-standard endpoint for conversational responses
• stateless: you resend the full messages array each call
• supports streaming, function calling, vision, structured outputs
• supported indefinitely but Responses offers better reasoning-model performance.
POST /v1/embeddings
POST https://api.openai.com/v1/embeddings
• Embeddings API — converts text into a numeric vector (1536 dims for text-embedding-3-small, 3072 for text-embedding-3-large)
• returns the vector only; you compute similarity (e.g. cosine) and store vectors yourself
• powers semantic search, clustering, recommendations, and RAG.
POST /v1/images/generations
POST https://api.openai.com/v1/images/generations
• Image Generation API — creates a new image from a text prompt (GPT Image models)
• token-based pricing
• use the separate POST /v1/images/edits to modify an existing image with a prompt or mask.
POST /v1/videos
POST https://api.openai.com/v1/videos
• Sora Video API — asynchronous text-to-video generation
• the call returns a job id with a queued/in_progress status, not the file
• poll GET /v1/videos/{id} or register a webhook, then download the MP4 from GET /v1/videos/{id}/content once completed.
POST /v1/audio/transcriptions
POST https://api.openai.com/v1/audio/transcriptions
• Speech-to-Text API — converts spoken audio into written text
• returns a full transcript (optionally with timestamps / word-level timing), not a summary
• supports many languages.

More in Developer Tools

  • ChatGPT & OpenAI API Cheat Sheet
  • Chrome DevTools Cheat Sheet
  • AI-LLM Code Generation Cheat Sheet
  • File Formats Cheat Sheet
  • Notepad++ Cheat Sheet
  • Sublime Text Cheat Sheet
View all 55 topics in Developer Tools