1. 引言

原文地址:https://developers.openai.com/resources/cookbooks

在前面的博客,博主已经系统讲解了 Codex 的核心能力,有兴趣的同学可以先了解:

本文主要整理自 OpenAI 官方 Cookbooks,合计 251 篇(已排除已归档内容),并按主题分类,便于快速导航,便于定位与阅读。

分类 描述 篇数
开源与自部署 gpt-oss 本地/自托管部署与生态 13
多模态-图像/视觉/视频 图像生成、理解与视频处理 19
音频/语音 语音识别、合成与实时音频 16
检索/RAG/搜索 向量检索、RAG 与搜索集成 79
ChatGPT 生态 ChatGPT 集成、工作流与数据 29
工具调用与扩展 函数调用、工具编排与扩展 28
代理与自动化 Agent 构建、自动化与多代理 10
微调/训练与提示词 微调、强化学习与提示工程 12
评测/安全/合规 Evals、治理、安全与合规 13
开发工具与工程实践 Codex、文档与工程实践 7
基础API与性能 核心 API、成本与性能优化 25

2. 开源与自部署

标题 标签 发布日期
Build your own content fact checker with gpt-oss-120B, Cerebras, and Parallel cerebras, fact-checking, gpt-oss, open-models, reasoning, search 2026-01-13
User guide for gpt-oss-safeguard gpt-oss, guardrails, open-models 2025-10-29
Fine-tune gpt-oss for better Korean language performance gpt-oss, open-models 2025-08-26
Verifying gpt-oss implementations gpt-oss, gpt-oss-providers, open-models 2025-08-11
How to run gpt-oss locally with LM Studio gpt-oss, gpt-oss-local, open-models 2025-08-07
How to run gpt-oss-20b on Google Colab gpt-oss, gpt-oss-server, open-models 2025-08-06
Using NVIDIA TensorRT-LLM to run gpt-oss-20b gpt-oss, gpt-oss-server, open-models 2025-08-05
OpenAI Harmony Response Format gpt-oss, gpt-oss-fine-tuning, gpt-oss-providers, harmony, open-models 2025-08-05
How to run gpt-oss with vLLM gpt-oss, gpt-oss-server, open-models 2025-08-05
How to run gpt-oss with Transformers gpt-oss, gpt-oss-server, open-models 2025-08-05
How to run gpt-oss locally with Ollama gpt-oss, gpt-oss-local, open-models 2025-08-05
How to handle the raw chain of thought in gpt-oss gpt-oss, gpt-oss-fine-tuning, gpt-oss-providers, open-models 2025-08-05
Fine-tuning with gpt-oss and Hugging Face Transformers gpt-oss, gpt-oss-fine-tuning, open-models 2025-08-05

3. 多模态-图像/视觉/视频

标题 标签 发布日期
Gpt-image-1.5 Prompting Guide images, vision 2025-12-16
Sora 2 Prompting Guide prompt, sora 2025-10-06
Generate images with high input fidelity images 2025-07-17
Using Evals API on Image Inputs evals, images 2025-07-15
Image Understanding with RAG RAG, images, responses, vision 2025-05-16
Generate images with GPT Image images 2025-04-23
Processing and narrating a video with GPT-4.1-mini’s visual capabilities and GPT-4o TTS API responses, speech, vision 2025-04-22
Using GPT4 Vision with Function Calling chat, vision 2024-12-13
Optimizing Retrieval-Augmented Generation using GPT-4o Vision Modality completions, vision 2024-11-12
Vision Fine-tuning on GPT-4o for Visual Question Answering completions, fine-tuning, vision 2024-11-01
How to parse PDF docs for RAG embeddings, vision 2024-09-29
Using GPT4o mini to tag and caption images embeddings, vision 2024-07-18
Introduction to GPT-4o and GPT-4o mini completions, vision, whisper 2024-07-18
How to combine GPT4o mini with RAG to create a clothing matchmaker app embeddings, vision 2024-07-18
Data Extraction and Transformation in ELT Workflows using GPT-4o as an OCR Alternative completions, vision 2024-07-09
CLIP embeddings to improve multimodal RAG with GPT-4 Vision embeddings, vision 2024-04-10
Creating slides with the Assistants API and DALL·E 3 assistants, dall-e 2023-12-08
What’s new with DALL·E 3? dall-e 2023-11-06
How to create dynamic masks with DALL·E and Segment Anything dall-e 2023-05-19

4. 音频/语音

标题 标签 发布日期
Transcribing User Audio with a Separate Realtime Request audio, realtime, speech, transcription, voice 2025-11-20
Building with Realtime Mini gpt-realtime-mini 2025-10-11
Realtime Prompting Guide audio, realtime, responses, speech 2025-08-28
Using Evals API on Audio Inputs audio, evals 2025-08-13
MCP-Powered Agentic Voice Framework agents-sdk, functions, mcp, tracing, voice 2025-06-17
Practical guide to data-intensive apps with the Realtime API audio, speech 2025-05-29
Context Summarization with Realtime API audio, speech, tiktoken 2025-05-10
ElatoAI - Realtime Speech AI Agents for ESP32 on Arduino arduino, audio, esp32, iot, realtime-api, speech 2025-05-01
Comparing Speech-to-Text Methods with the OpenAI API agents-sdk, audio, speech 2025-04-29
Building a Voice Assistant with the Agents SDK audio, responses, speech 2025-03-27
Multi-Language One-Way Translation with the Realtime API audio, speech 2025-03-24
Steering Text-to-Speech for more dynamic audio generation audio, completions 2024-11-01
Voice Translation into Different Languages audio, completions 2024-10-21
Enhancing Whisper transcriptions: pre- & post-processing techniques whisper 2023-08-11
Addressing transcription misspellings: prompt vs post-processing completions, whisper 2023-08-11
Whisper prompting guide completions, whisper 2023-06-27

5. 检索/RAG/搜索

标题 标签 发布日期
Temporal Agents with Knowledge Graphs functions, knowledge-graphs, responses, retrieval 2025-07-22
Reinforcement Fine-Tuning for Conversational Reasoning with the OpenAI API evals, fine-tuning, qa, reinforcement 2025-05-21
Practical Guide for Model Selection for Real‑World Use Cases RAG, functions, insurance, legal, pharma, responses, tool calling, web-search 2025-05-07
Robust question answering with Chroma and OpenAI completions, embeddings 2025-04-23
Multi-Tool Orchestration with RAG approach using OpenAI’s Responses API functions, pinecone, responses, web-search 2025-03-28
Web Search and States with Responses API functions, responses, web-search 2025-03-11
How to handle rate limits completions, embeddings 2025-01-22
Embedding Wikipedia articles for search completions, embeddings 2024-11-26
Pinecone Vector Database and Retool Workflow with GPT Actions chatgpt, chatgpt-and-api, embeddings, gpt-actions-library 2024-11-11
GCP BigQuery Vector Search with GCP Functions and GPT Actions in ChatGPT chatgpt, chatgpt-and-api, completions, embeddings, tiktoken 2024-08-02
Azure AI Search with Azure Functions and GPT Actions in ChatGPT chatgpt, chatgpt-and-api, completions, embeddings, tiktoken 2024-07-08
RAG with a Graph database completions, embeddings 2023-12-08
Supabase Vector Database embeddings 2023-12-04
Semantic search using Supabase Vector embeddings 2023-12-04
Semantic search using MongoDB Atlas Vector Search and OpenAI completions, embeddings 2023-11-21
MongoDB Atlas Vector Search completions, embeddings 2023-11-21
Evaluate RAG with LlamaIndex completions, embeddings 2023-11-06
Question answering with LangChain, Deep Lake, & OpenAI embeddings 2023-09-30
Vector similarity search using Neon Postgres embeddings 2023-09-28
Neon as a vector database embeddings 2023-09-28
How to automate AWS tasks with function calling completions, embeddings, functions 2023-09-27
Using Tair as a vector database for OpenAI embeddings embeddings 2023-09-11
Question answering with Langchain, Tair and OpenAI completions, embeddings, tiktoken 2023-09-11
Azure AI Search as a vector database for OpenAI embeddings embeddings 2023-09-11
Fine-Tuning for retrieval augmented generation (RAG) with Qdrant completions, embeddings, fine-tuning 2023-09-04
Semantic search using Elasticsearch and OpenAI embeddings 2023-08-29
Retrieval augmented generation using Elasticsearch and OpenAI completions, embeddings 2023-08-29
Philosophy with vector embeddings, OpenAI and Cassandra / Astra DB completions, embeddings 2023-08-29
Philosophy with vector embeddings, OpenAI and Cassandra / Astra DB completions, embeddings 2023-08-29
Elasticsearch completions, embeddings 2023-08-29
Cassandra / Astra DB embeddings 2023-08-29
How to evaluate a summarization task completions, embeddings 2023-08-16
Visualizing the embeddings in Kangas embeddings 2023-07-11
Using PolarDB-PG as a vector database for OpenAI embeddings embeddings 2023-07-11
Vector databases embeddings 2023-06-28
Using Weaviate for embeddings search embeddings 2023-06-28
Using Typesense for embeddings search embeddings 2023-06-28
Using Redis for embeddings search embeddings 2023-06-28
Using Qdrant for embeddings search embeddings 2023-06-28
Using Pinecone for embeddings search embeddings 2023-06-28
Using MyScale for embeddings search embeddings 2023-06-28
Using Chroma for embeddings search embeddings 2023-06-28
Search reranking with cross-encoders completions, embeddings 2023-06-28
Financial document analysis with LlamaIndex completions, embeddings 2023-06-22
Question answering using a search API and re-ranking completions, embeddings 2023-06-16
Using Weaviate with generative OpenAI module for generative search completions, embeddings 2023-05-22
SingleStoreDB completions, embeddings 2023-05-22
Semantic search with SingleStoreDB completions, embeddings 2023-05-22
Using Hologres as a vector database for OpenAI embeddings embeddings 2023-05-19
Running hybrid VSS queries with Redis and OpenAI embeddings 2023-05-11
Redis as a context store with Chat Completions completions, embeddings 2023-05-11
Redis vectors as JSON with OpenAI embeddings 2023-05-10
Kusto as a vector database for embeddings embeddings 2023-05-10
Kusto as a vector database embeddings 2023-05-10
Question answering with Langchain, AnalyticDB and OpenAI embeddings, tiktoken 2023-05-05
How to build a tool-using agent with LangChain agents, completions, embeddings 2023-05-02
Using MyScale as a vector database for OpenAI embeddings embeddings 2023-05-01
Typesense embeddings 2023-04-13
Using AnalyticDB as a vector database for OpenAI embeddings embeddings 2023-04-06
Visualizing embeddings in Atlas embeddings 2023-03-28
Getting started with Milvus and OpenAI embeddings 2023-03-28
Getting Started with Zilliz and OpenAI embeddings 2023-03-28
Filtered search with Milvus and OpenAI embeddings 2023-03-28
Filtered Search with Zilliz and OpenAI embeddings 2023-03-28
Semantic search with Pinecone and OpenAI embeddings 2023-03-24
Retrieval augmentation for GPT-4 using Pinecone completions, embeddings, tiktoken 2023-03-24
Pinecone vector database completions, embeddings 2023-03-24
Using Qdrant as a vector database for OpenAI embeddings embeddings 2023-02-16
Question answering with Langchain, Qdrant and OpenAI embeddings 2023-02-16
Weaviate <> OpenAI embeddings 2023-02-13
Using Weaviate with OpenAI vectorize module for hybrid search embeddings 2023-02-13
Using Weaviate with OpenAI vectorize module for embeddings search embeddings 2023-02-13
Using Redis as a vector database with OpenAI embeddings 2023-02-13
Redis completions, embeddings 2023-02-13
Question Answering in Weaviate with OpenAI Q&A module completions, embeddings 2023-02-13
Retrieval augmented generative question answering with Pinecone completions, embeddings 2023-02-07
Visualizing embeddings in Weights and Biases embeddings 2023-02-01
Use cases for embeddings embeddings 2023-01-20
Related resources from around the web completions, embeddings 2023-01-20

6. ChatGPT 生态

标题 标签 发布日期
OpenAI Compliance Logs Platform quickstart chatgpt, chatgpt-and-api, chatgpt-data, compliance, enterprise 2025-12-11
GPT Actions library - Salesforce & Gong chatgpt, chatgpt-productivity, gpt-actions-library 2025-04-07
GPT Actions library - Tray.ai APIM chatgpt, chatgpt-middleware, gpt-actions-library 2024-11-26
GPT Actions library - Google Calendar chatgpt, chatgpt-communication, gpt-actions-library 2024-11-22
GPT Actions library - Workday chatgpt, chatgpt-productivity, gpt-actions-library 2024-11-20
GPT Actions library - GitHub chatgpt, chatgpt-productivity, gpt-actions-library 2024-10-23
GPT Actions library - Google Ads via Adzviser chatgpt, chatgpt-data, chatgpt-middleware, chatgpt-productivity, gpt-actions-library 2024-10-10
GPT Actions library - Canvas Learning Management System chatgpt, gpt-actions-library 2024-09-17
GPT Actions library - Retool Workflow chatgpt, chatgpt-middleware, gpt-actions-library 2024-08-28
GPT Actions library - Snowflake Middleware chatgpt, chatgpt-data, gpt-actions-library 2024-08-14
GPT Actions library - Snowflake Direct chatgpt, chatgpt-data, gpt-actions-library 2024-08-13
GPT Actions library - Google Drive chatgpt, chatgpt-productivity, gpt-actions-library 2024-08-11
GPT Actions library (Middleware) - Google Cloud Function chatgpt, chatgpt-middleware, gpt-actions-library 2024-08-11
GPT Actions library - AWS Redshift chatgpt, chatgpt-data, gpt-actions-library 2024-08-09
GPT Actions library - AWS Middleware chatgpt, chatgpt-middleware, gpt-actions-library 2024-08-09
GPT Actions library - Zapier chatgpt, chatgpt-middleware, gpt-actions-library 2024-08-05
GPT Actions library - Box chatgpt, chatgpt-productivity, gpt-actions-library 2024-08-02
GPT Actions library - SQL Database chatgpt, chatgpt-data, gpt-actions-library 2024-07-31
GPT Actions library - Confluence chatgpt, chatgpt-productivity, gpt-actions-library 2024-07-31
GPT Actions library - Notion chatgpt, chatgpt-productivity, gpt-actions-library 2024-07-25
GPT Actions library - Jira chatgpt, chatgpt-productivity, gpt-actions-library 2024-07-24
GPT Actions library - Gmail chatgpt, chatgpt-communication, gpt-actions-library 2024-07-24
GPT Actions library - Salesforce chatgpt, gpt-actions-library 2024-07-18
GPT Actions library - Outlook chatgpt, chatgpt-communication, gpt-actions-library 2024-07-15
GPT Actions library - getting started chatgpt, gpt-actions-library 2024-07-09
GPT Actions library - BigQuery chatgpt, chatgpt-data, gpt-actions-library 2024-07-09
GPT Actions library - Sharepoint (Return Text) chatgpt, chatgpt-productivity, gpt-actions-library 2024-05-24
GPT Actions library - Sharepoint (Return Docs) chatgpt, chatgpt-productivity, gpt-actions-library 2024-05-24
GPT Actions library (Middleware) - Azure Functions chatgpt, chatgpt-middleware, gpt-actions-library 2024-05-24

7. 工具调用与扩展

标题 标签 发布日期
Building Consistent Workflows with Codex CLI & Agents SDK agents-sdk, codex, mcp 2025-10-01
GPT-5 New Params and Tools functions, gpt-5, reasoning 2025-08-07
Building a Supply-Chain Copilot with OpenAI Agent SDK and Databricks MCP Servers agents-sdk, mcp, tracing 2025-07-08
Introduction to deep research in the OpenAI API deep-research, deep-research-api, mcp, responses 2025-06-25
Deep Research API with the Agents SDK agents, agents-sdk, deep-research, deep-research-api, mcp 2025-06-25
Building a Deep Research MCP Server agents, agents-sdk, deep-research, deep-research-api, mcp, responses 2025-06-25
Evals API Use-case - MCP Evaluation evals, evals-api, mcp, responses 2025-06-09
Eval Driven System Design - From Prototype to Production API Flywheel, completions, evals, functions, responses, tracing 2025-06-02
Multi-Agent Portfolio Collaboration with OpenAI Agents SDK agents-sdk, functions, mutli-agent-collaboration, responses 2025-05-28
o3/o4-mini Function Calling Guide functions, reasoning, responses 2025-05-26
Guide to Using the Responses API’s MCP Tool mcp 2025-05-21
Better performance from reasoning models using the Responses API functions, responses 2025-05-11
Handling Function Calls with Reasoning Models api, functions, reasoning, responses 2025-04-25
Automating Dispute Management with Agents SDK and Stripe API agents-sdk, functions, responses 2025-03-17
Doing RAG on PDFs using File Search in the Responses API functions, responses 2025-03-11
Orchestrating Agents: Routines and Handoffs agents, completions, functions 2024-10-10
Structured Outputs for Multi-Agent Systems agents, completions, functions 2024-08-06
Introduction to Structured Outputs completions, functions 2024-08-06
Using tool required for customer service completions, functions 2024-05-01
Assistants API Overview (Python SDK) assistants, functions 2023-11-10
Fine tuning for function calling completions, fine-tuning, functions 2023-11-07
Named Entity Recognition to Enrich Text completions, functions 2023-10-20
Function calling with an OpenAPI specification completions, functions 2023-10-15
How to build an agent with the OpenAI Node.js SDK agents, completions, functions 2023-10-05
Function calling for nearby places: Leveraging the Google Places API and customer profiles completions, functions 2023-08-11
Azure functions example completions, functions 2023-07-21
How to use functions with a knowledge base completions, functions 2023-06-14
How to call functions with chat models completions, functions 2023-06-13

8. 代理与自动化

标题 标签 发布日期
Context Engineering for Personalization - State Management with Long-Term Memory Notes using OpenAI Agents SDK agents-sdk 2026-01-05
Build a coding agent with GPT 5.1 agents-sdk 2025-11-13
Self-Evolving Agents - A Cookbook for Autonomous Agent Retraining agent-retraining, evals, llmops, partners, prompt-engineering, self-evolving-agents 2025-11-04
Build, deploy, and optimize agentic workflows with AgentKit agentkit, evals 2025-10-17
Using PLANS.md for multi-hour problem solving agents, codex, documentation, gpt-5, planning 2025-10-07
Context Engineering - Short-Term Memory Management with Sessions from OpenAI Agents SDK agents-sdk 2025-09-09
Optimize Prompts agents-sdk, completions, prompt, responses, tracing 2025-07-14
Automate Jira ↔ GitHub with Codex automation, codex 2025-06-21
Parallel Agents with the OpenAI Agents SDK agents, agents-sdk, parallel-agents 2025-05-01
Evaluating Agents with Langfuse agents-sdk, evals 2025-03-31

9. 微调/训练与提示词

标题 标签 发布日期
Prompt Personalities gpt-5, prompt-personalities 2026-01-05
Building resilient prompts using an evaluation flywheel datasets, evals 2025-10-06
GPT-5 Troubleshooting Guide gpt-5, prompt-optimization 2025-09-17
GPT-5 Prompt Migration and Improvement Using the New Optimizer gpt-5, prompt-optimization, reasoning, responses 2025-08-07
Prompt Migration Guide completions, prompt, responses 2025-06-26
Fine-Tuning Techniques - Choosing Between SFT, DPO, and RFT (With a Guide to DPO) fine-tuning 2025-06-18
Exploring Model Graders for Reinforcement Fine-Tuning fine-tuning, reinforcement-learning, reinforcement-learning-graders 2025-05-23
Leveraging model distillation to fine-tune a model completions, fine-tuning 2024-10-16
Prompt Caching 101 completions, cost, latency, prompt caching 2024-10-01
How to fine-tune chat models completions, fine-tuning 2024-07-23
Fine-tuning OpenAI models with Weights & Biases completions, fine-tuning, tiktoken 2023-10-04
Data preparation and analysis for chat model fine-tuning completions, fine-tuning, tiktoken 2023-08-22

10. 评测/安全/合规

标题 标签 发布日期
Evals API Use-case - Web Search Evaluation evals, evals-api, responses 2025-06-09
Evals API Use-case - Tools Evaluation evals, evals-api, responses 2025-06-09
Evals API Use-case - Structured Outputs Evaluation evals, evals-api, responses 2025-06-09
Selecting a Model Based on Stripe Conversion – A Practical Eval for Startups conversion, evals, stripe 2025-06-02
Evals API Use-case - Responses Evaluation evals, responses 2025-05-13
Evals API Use-case - Monitoring stored completions completions, evals 2025-04-08
Evals API Use-case - Detecting prompt regressions completions, evals 2025-04-08
Evals API Use-case - Bulk model and prompt experimentation completions, evals 2025-04-08
Custom LLM as a Judge to Detect Hallucinations with Braintrust completions, evals 2024-10-14
Developing Hallucination Guardrails guardrails 2024-05-29
How to use the moderation API moderation 2024-03-05
How to evaluate LLMs for SQL generation guardrails 2024-01-23
How to implement LLM guardrails guardrails 2023-12-19

11. 开发工具与工程实践

标题 标签 发布日期
Codex Prompting Guide codex, compaction, responses 2025-12-04
Modernizing your Codebase with Codex codex 2025-11-19
Build Code Review with the Codex SDK codex 2025-10-21
Use Codex CLI to automatically fix CI failures codex 2025-09-30
Automating Code Quality and Security Fixes with Codex CLI on GitLab codex 2025-08-29
Reasoning over Code Quality and Security in GitHub Pull Requests SDLC, completions, reasoning 2024-12-24
What makes documentation good 2023-09-01

12. 基础API与性能

标题 标签 发布日期
GPT-5.2 Prompting Guide gpt-5.2 2025-12-11
GPT-5.1 Prompting Guide gpt-5.1 2025-11-13
GPT-5 prompting guide gpt-5, reasoning, responses 2025-08-07
Frontend coding with GPT-5 gpt-5, reasoning, responses 2025-08-07
GPT-4.1 Prompting Guide api, responses 2025-04-14
Build Your Own Code Interpreter - Dynamic Tool Generation and Execution With o3-mini completions 2025-02-03
How to use the Usage API and Cost API to monitor your OpenAI usage cost-api, usage-api 2025-01-14
Enhance your prompts with meta prompting completions, reasoning 2024-10-23
Using chained calls for o1 structured outputs completions, reasoning 2024-09-26
Building a Bring Your Own Browser (BYOB) Tool for Web Browsing and Summarization completions 2024-09-26
Using reasoning for routine generation completions, reasoning 2024-09-12
Using reasoning for data validation completions, reasoning 2024-09-12
Batch processing with the Batch API batch, completions 2024-04-24
Summarizing Long Documents chat 2024-04-19
Synthetic data generation (Part 1) completions 2024-04-10
Getting Started with OpenAI Evals completions 2024-03-21
Using logprobs completions 2023-12-20
How to make your completions outputs consistent with the new seed parameter completions 2023-11-06
OpenAI API Monitoring with Weights & Biases Weave completions, tiktoken 2023-10-04
Azure Chat Completion models with your own data (preview) completions 2023-09-11
Unit test writing using a multi-step prompt with legacy Completions completions 2023-05-19
Azure Chat Completions example (preview) completions 2023-03-28
How to format inputs to ChatGPT models completions, tiktoken 2023-03-01
Long document content extraction completions 2023-02-20
How to work with large language models completions 2023-01-20
Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐