# Cookbook > Recipes and examples from the OpenAI developer cookbook. Each entry has a Markdown twin at `/cookbook/.md`. ## Documentation sets - [Combined cookbook entries](https://developers.openai.com/cookbook/llms-full.txt): Single-file Markdown export of cookbook entries. ## Articles - [Build a per-run spending controller with the Responses API](https://developers.openai.com/cookbook/articles/per_run_spending_controller_responses_api.md): Enforce an application-owned model-token budget for each Responses API run using token counts, maximum-cost estimates, usage tracking, and safe error handling. - [Build your own content fact checker with gpt-oss-120B, Cerebras, and Parallel](https://developers.openai.com/cookbook/articles/gpt-oss/build-your-own-fact-checker-cerebras.md): Cookbook to build a content fact checker with gpt-oss-120B on Cerebras using Parallel. - [Building workspace agents in ChatGPT to complete repeatable, end-to-end work](https://developers.openai.com/cookbook/articles/chatgpt-agents-sales-meeting-prep.md): Build, test, schedule, and share a ChatGPT workspace agent that prepares sales meeting briefs with calendar, SharePoint, and web search context. - [Fine-tuning with gpt-oss and Hugging Face Transformers](https://developers.openai.com/cookbook/articles/gpt-oss/fine-tune-transfomers.md) - [How to handle the raw chain of thought in gpt-oss](https://developers.openai.com/cookbook/articles/gpt-oss/handle-raw-cot.md) - [How to run gpt-oss locally with Ollama](https://developers.openai.com/cookbook/articles/gpt-oss/run-locally-ollama.md) - [How to run gpt-oss with Transformers](https://developers.openai.com/cookbook/articles/gpt-oss/run-transformers.md) - [OpenAI Harmony Response Format](https://developers.openai.com/cookbook/articles/openai-harmony.md) - [User guide for gpt-oss-safeguard](https://developers.openai.com/cookbook/articles/gpt-oss-safeguard-guide.md) - [Verifying gpt-oss implementations](https://developers.openai.com/cookbook/articles/gpt-oss/verifying-implementations.md) ## Examples - [Agents SDK Deployment Manager](https://developers.openai.com/cookbook/examples/agents_sdk/deployment_manager/readme.md): Run, inspect, and trace local Agents SDK demo apps from a browser-based deployment manager. - [AML Analysis with the Agents SDK on Amazon Bedrock](https://developers.openai.com/cookbook/examples/partners/aws/evidence_grounded_aml_agent_with_bedrock.md): Run a synthetic AML analysis with the OpenAI Agents SDK and GPT-5.6 Sol on Amazon Bedrock, verify structured claims against deterministic evidence, test failure cases, and enforce an application-owned human review gate. - [Automating Code Quality and Security Fixes with Codex CLI on GitLab](https://developers.openai.com/cookbook/examples/codex/secure_quality_gitlab.md) - [Build a ChatGPT plugin with the OpenAI Agents SDK and Amazon Bedrock AgentCore](https://developers.openai.com/cookbook/examples/partners/aws/chatgpt_agents_sdk_aws_agentcore_cookbook/notebooks/chatgpt_agents_sdk_aws_agentcore_cookbook.md): Build a private ChatGPT flight-assistant plugin with the OpenAI Agents SDK on Amazon Bedrock, connect it through Secure MCP Tunnel, and validate tracing and Promptfoo evaluations. - [Build a data analyst with the Agents API](https://developers.openai.com/cookbook/examples/agents_api/apps/data_analyst/readme.md): Investigate warehouse questions with read-only SQL, business context, and saved analyst corrections. - [Build a prior authorization review assistant with the OpenAI Agents SDK and Amazon Bedrock AgentCore](https://developers.openai.com/cookbook/examples/partners/aws/policy_to_review_prior_authorization_agents_sdk_agentcore.md): Build and deploy a prior authorization review assistant that retrieves public CMS policy documents with a Bedrock Managed Knowledge Base, maps submitted evidence to policy criteria with the OpenAI Agents SDK, validates citations and review routing in code, and runs on Amazon Bedrock AgentCore. - [Build a Slack bot with the Agents API](https://developers.openai.com/cookbook/examples/agents_api/apps/slack_bot/readme.md): Connect Slack threads to persistent agent sessions, workplace tools, and isolated sandboxes. - [Build a Speaker-Aware Meeting Intelligence Pipeline with Audio Diarization](https://developers.openai.com/cookbook/examples/audio/speaker_aware_meeting_intelligence/speaker_aware_meeting_intelligence.md): Build a production-style reference pipeline that turns recorded audio into speaker-labeled transcripts, summaries, decisions, risks, and follow-up actions. - [Build an Agent Improvement Loop with Traces, Evals, and Codex](https://developers.openai.com/cookbook/examples/agents_sdk/agent_improvement_loop.md): Build a trace-driven improvement loop that turns human and model feedback into Promptfoo evals, HALO-ranked harness changes, and a Codex handoff. - [Build an SRE agent for incident response](https://developers.openai.com/cookbook/examples/agents_api/apps/sev_bot/readme.md): Investigate incidents in Slack using service telemetry, GitHub, AWS, and past incident reports, with human review before recovery. - [Build iterative repair loops with Codex](https://developers.openai.com/cookbook/examples/codex/build_iterative_repair_loops_with_codex.md): A Codex cookbook showing how to use review, repair, and validation loops to improve technical documentation artifacts. - [Build Live Translation Apps with gpt-realtime-translate](https://developers.openai.com/cookbook/examples/voice_solutions/realtime_translation_guide.md): Cookbook for building browser, phone, and video-call translation experiences with Realtime Translation. - [Building Reliable Agents with Memory and Compaction](https://developers.openai.com/cookbook/examples/agents_sdk/building_reliable_agents_memory_compaction.md): Cookbook for building evidence review agent that uses compaction and memory from Agents SDK. - [ChatGPT Enterprise Prompting Guide](https://developers.openai.com/cookbook/examples/chatgpt/chatgpt_prompt_guide/chatgpt_prompt_guide.md): Cookbook for writing better prompts for everyday work in ChatGPT Enterprise. - [Codex Prompting Guide](https://developers.openai.com/cookbook/examples/gpt-5/codex_prompting_guide.md) - [Combining security scanners with the Agents SDK](https://developers.openai.com/cookbook/examples/agents_sdk/security_scanners_with_agents_sdk.md): Use the OpenAI Agents SDK to route scanner findings to specialist agents, check source evidence, and prepare a Codex prompt for human review. - [Computer Use Agents in Daytona Sandboxes](https://developers.openai.com/cookbook/examples/agents_sdk/computer_use_with_daytona/computer_use_with_daytona.md): Build an Agents SDK agent that uses Computer Use on a Daytona sandbox desktop to fill a multi-section web form end to end. - [Context Engineering - Short-Term Memory Management with Sessions](https://developers.openai.com/cookbook/examples/agents_sdk/session_memory.md) - [Context Engineering for Personalization - State Management with Long-Term Memory Notes](https://developers.openai.com/cookbook/examples/agents_sdk/context_personalization.md): Cookbook to build personalized agents with long-term memory state using the Agents SDK. - [Controlled Agentic Commerce with AgentCore Payments](https://developers.openai.com/cookbook/examples/partners/aws/controlled_agentic_commerce_with_agentcore_payments/controlled_agentic_commerce.md): Build a controlled agentic-commerce workflow with the OpenAI Agents SDK, x402, application-owned payment authority, deterministic validation, and an optional gated Amazon Bedrock AgentCore Payments testnet path. - [Enabling Long-Term Agent Memory with Oracle AI Agent Memory](https://developers.openai.com/cookbook/examples/vector_databases/oracle_db/deep_research_openai_agents.md): Build a deep-research agent with the OpenAI Agents SDK, Oracle-backed session persistence, durable memory, and Tavily web search. - [Evaluating Grounded Spatial Reasoning with GPT-5.5](https://developers.openai.com/cookbook/examples/multimodal/grounded_spatial_reasoning_layouts.md): Build a spec-first floorplan layout workflow with vision, structured outputs, and deterministic spatial evals. - [Generate Transparent Image Assets for Campaigns and Presentations](https://developers.openai.com/cookbook/examples/multimodal/transparent-image-assets-for-campaigns-and-presentations.md): Generate reusable transparent PNG assets for seasonal ecommerce campaigns and branded PowerPoint presentations. - [Getting Started with OpenAI Models on Amazon Bedrock](https://developers.openai.com/cookbook/examples/partners/aws/openai_models_with_amazon_bedrock.md): Learn how to invoke an OpenAI-compatible Amazon Bedrock endpoint using the OpenAI Python SDK, along with equivalent cURL examples, and leverage Responses API capabilities available through Amazon Bedrock. - [Getting the Most out of GPT-5.4 for Vision and Document Understanding](https://developers.openai.com/cookbook/examples/multimodal/document_and_multimodal_understanding_tips.md): A practical guide to get the best performance on vision tasks with GPT-5.4. - [GPT-5 Prompt Migration and Improvement Using the New Optimizer](https://developers.openai.com/cookbook/examples/gpt-5/prompt-optimization-cookbook.md) - [GPT-Live evaluation guide](https://developers.openai.com/cookbook/examples/audio/voice_agent_evaluation.md): Evaluate full-duplex voice agents with controlled requests, recorded audio, and simulated conversations, measuring interaction quality and verified task outcomes. - [How to use the Usage API and Cost API to monitor your OpenAI usage](https://developers.openai.com/cookbook/examples/completions_usage_api.md): Cookbook to fetch and visualize Completions Usage and cost data via API. - [Image Evals for Image Generation and Editing Use Cases](https://developers.openai.com/cookbook/examples/multimodal/image_evals.md): Cookbook to build image evals for image generation and editing use cases. - [Iterating Development Workflows with Codex](https://developers.openai.com/cookbook/examples/codex/iterating-development-workflows-with-codex.md): Build and improve Codex development workflows using repository harnesses, phased implementation plans, approval gates, reusable skills, and evidence-backed retrospectives. - [Macro Evals for Agentic Systems](https://developers.openai.com/cookbook/examples/partners/macro_evals_for_agentic_systems/macro_evals_for_agentic_systems.md): A cookbook showing how to evaluate multi-agent systems by clustering trace-level eval signals into recurring behavior patterns and drilling into high-impact patterns. - [Manage SharePoint site access with the ChatGPT Admin API](https://developers.openai.com/cookbook/examples/chatgpt/sharepoint_site_access/sharepoint_site_access.md): Resolve SharePoint URLs into site-collection identifiers and safely manage a ChatGPT workspace allowlist with the Admin API. - [Migrate a Legacy Codebase with Sandbox Agents](https://developers.openai.com/cookbook/examples/agents_sdk/sandboxed-code-migration/sandboxed_code_migration_agent.md): Build a sandboxed code-migration agent that splits a modernization campaign into isolated tasks and returns validated patch bundles. - [Migrate from the Claude Agent SDK to the OpenAI Agents SDK](https://developers.openai.com/cookbook/examples/agents_sdk/migrate-from-claude-agent-sdk/readme.md): Learn how to migrate Claude Agent SDK applications to the OpenAI Agents SDK, including tool mapping, guardrails, handoffs, approvals, and sandbox boundaries. - [Migrate from Whisper to GPT-Transcribe and GPT-Live-Transcribe](https://developers.openai.com/cookbook/examples/migrating_from_whisper_to_gpt_transcribe.md): Migrate existing Whisper integrations to GPT-Transcribe and GPT-Live-Transcribe with before-and-after examples for file, streaming, and Realtime transcription. - [Modernizing your Codebase with Codex](https://developers.openai.com/cookbook/examples/codex/code_modernization.md): Cookbook to modernize legacy codebases using the OpenAI Codex CLI. - [Moving from OpenAI Evals to Promptfoo](https://developers.openai.com/cookbook/examples/evaluation/moving-from-openai-evals-to-promptfoo.md): Manually recreate OpenAI Evals evaluations in Promptfoo, then run and validate them. - [Optimizing Customer Support Agents for Cost and Quality](https://developers.openai.com/cookbook/examples/agent_optimization/optimizing_agents_for_cost_and_quality.md): Optimize agents on cost, latency and performance. - [Prompt Personalities](https://developers.openai.com/cookbook/examples/gpt-5/prompt_personalities.md): Cookbook to shape agent personality via instruction prompts for tone and style. - [Realtime Eval Guide](https://developers.openai.com/cookbook/examples/realtime_eval_guide.md) - [SchemaFlow: Agentic Database Change Impact Analysis, SQL Generation, and Eval Guardrails](https://developers.openai.com/cookbook/examples/partners/schemaflow_design_guide/schemaflow_cookbook.md): Build a staged SchemaFlow pipeline with the OpenAI Agents SDK for database change parsing, impact analysis, rollout planning, SQL generation, guardrails, artifacts, optional File Search grounding, and Promptfoo evals. - [Skills in OpenAI API](https://developers.openai.com/cookbook/examples/skills_in_api.md): Cookbook for building skills with the OpenAI API. - [Temporal Agents with Knowledge Graphs](https://developers.openai.com/cookbook/examples/partners/temporal_agents_with_knowledge_graphs/temporal_agents.md) - [Trigger a Workspace Agent from the API](https://developers.openai.com/cookbook/examples/chatgpt/workspace_agents/workspace-agents-api-trigger.md): Configure a Workspace Agent, add an API channel, and send a live trigger that writes to the agent's configured destination. - [Using Goals in Codex](https://developers.openai.com/cookbook/examples/codex/using_goals_in_codex.md): Use Goals in Codex to keep long-running work moving toward a persistent, evidence-checked outcome across turns.