[metadata]
generator: Astro v6.0.4
generator: Starlight v0.38.3
og:image: https://developers.openai.com/og/api/reference/overview.png
og:locale: en
og:site_name: OpenAI API Reference
og:title: API Overview
og:type: article
og:url: https://developers.openai.com/api/reference/overview/
twitter:card: summary_large_image
twitter:image: https://developers.openai.com/og/api/reference/overview.png
twitter:image:alt: API Overview
twitter:site: @OpenAIDevs
twitter:title: API Overview
viewport: width=device-width, initial-scale=1

[canonical-links]
https://developers.openai.com/api/reference/overview/

[document-links]
API Dashboard: https://platform.openai.com/login
API Reference: /api/reference
API key: https://platform.openai.com/settings/organization/api-keys
API reference: /api/reference/overview
API: /api/docs
Accept: /api/reference/resources/realtime/subresources/calls/methods/accept
Activate: /api/reference/resources/admin/subresources/organization/subresources/certificates/methods/activate
Activate: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/certificates/methods/activate
Admin API key: https://platform.openai.com/settings/organization/admin-keys
Administration: /api/reference/administration/overview
Ads Publish and measure ads in ChatGPT: /ads
Ads: /ads
Agents: /api/docs/guides/agents
Archive: /api/reference/resources/admin/subresources/organization/subresources/projects/methods/archive
Assistants streaming events: /api/reference/resources/beta/subresources/assistants/streaming-events
Audio Speeches: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/audio_speeches
Audio Transcriptions: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/audio_transcriptions
Authentication: /api/reference/overview#authentication
Backwards compatibility: /api/reference/overview#backwards-compatibility
Blog Learnings and experiences from developers: /blog
Blog: /blog
Cancel a batch: /api/reference/resources/batches/methods/cancel
Cancel a file batch: /api/reference/resources/vector_stores/subresources/file_batches/methods/cancel
Cancel a job: /api/reference/resources/fine_tuning/subresources/jobs/methods/cancel
Cancel a response: /api/reference/resources/responses/methods/cancel
Cancel a responses (multi-agent): /api/reference/resources/beta/subresources/responses/methods/cancel
Cancel a run: /api/reference/resources/beta/subresources/threads/subresources/runs/methods/cancel
Cancel a run: /api/reference/resources/evals/subresources/runs/methods/cancel
Cancel a session: /api/reference/resources/beta/subresources/chatkit/subresources/sessions/methods/cancel
Cancel an upload: /api/reference/resources/uploads/methods/cancel
ChatGPT: /
ChatGPT: /chatgpt
Client events: /api/reference/resources/realtime/client-events
Code Interpreter Sessions: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/code_interpreter_sessions
Codex: https://learn.chatgpt.com/docs
Commerce Build commerce flows in ChatGPT: /commerce
Commerce: /commerce
Community Programs, meetups, and support for builders: /community
Community: /community
Compact a response: /api/reference/resources/responses/methods/compact
Compact a responses (multi-agent): /api/reference/resources/beta/subresources/responses/methods/compact
Complete: /api/reference/resources/uploads/methods/complete
Completions: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/completions
Cookbook Notebook examples for building with OpenAI models: /cookbook
Cookbook: /cookbook
Costs: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/costs
Count input tokens: /api/reference/resources/beta/subresources/responses/subresources/input_tokens/methods/count
Count input tokens: /api/reference/resources/responses/subresources/input_tokens/methods/count
Create And Run: /api/reference/resources/beta/subresources/threads/methods/create_and_run
Create Character: /api/reference/resources/videos/methods/create_character
Create Variation: /api/reference/resources/images/methods/create_variation
Create a batch: /api/reference/resources/batches/methods/create
Create a certificate: /api/reference/resources/admin/subresources/organization/subresources/certificates/methods/create
Create a chat completion: /api/reference/resources/chat/subresources/completions/methods/create
Create a client secret: /api/reference/resources/realtime/subresources/client_secrets/methods/create
Create a client secret: /api/reference/resources/realtime/subresources/translations/subresources/client_secrets/methods/create
Create a completion: /api/reference/resources/completions/methods/create
Create a container: /api/reference/resources/containers/methods/create
Create a content provenance check: /api/reference/resources/content_provenance_checks/methods/create
Create a conversation: /api/reference/resources/conversations/methods/create
Create a file batch: /api/reference/resources/vector_stores/subresources/file_batches/methods/create
Create a file: /api/reference/resources/containers/subresources/files/methods/create
Create a file: /api/reference/resources/files/methods/create
Create a file: /api/reference/resources/vector_stores/subresources/files/methods/create
Create a group: /api/reference/resources/admin/subresources/organization/subresources/groups/methods/create
Create a group: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/groups/methods/create
Create a job: /api/reference/resources/fine_tuning/subresources/jobs/methods/create
Create a message: /api/reference/resources/beta/subresources/threads/subresources/messages/methods/create
Create a moderation: /api/reference/resources/moderations/methods/create
Create a part: /api/reference/resources/uploads/subresources/parts/methods/create
Create a permission: /api/reference/resources/fine_tuning/subresources/checkpoints/subresources/permissions/methods/create
Create a project: /api/reference/resources/admin/subresources/organization/subresources/projects/methods/create
Create a response: /api/reference/resources/responses/methods/create
Create a responses (multi-agent): /api/reference/resources/beta/subresources/responses/methods/create
Create a role: /api/reference/resources/admin/subresources/organization/subresources/groups/subresources/roles/methods/create
Create a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/groups/subresources/roles/methods/create
Create a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/roles/methods/create
Create a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/users/subresources/roles/methods/create
Create a role: /api/reference/resources/admin/subresources/organization/subresources/roles/methods/create
Create a role: /api/reference/resources/admin/subresources/organization/subresources/users/subresources/roles/methods/create
Create a run: /api/reference/resources/beta/subresources/threads/subresources/runs/methods/create
Create a run: /api/reference/resources/evals/subresources/runs/methods/create
Create a service account: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/service_accounts/methods/create
Create a session: /api/reference/resources/beta/subresources/chatkit/subresources/sessions/methods/create
Create a session: /api/reference/resources/realtime/subresources/sessions/methods/create
Create a skill: /api/reference/resources/skills/methods/create
Create a speech: /api/reference/resources/audio/subresources/speech/methods/create
Create a spend alert: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/spend_alerts/methods/create
Create a spend alert: /api/reference/resources/admin/subresources/organization/subresources/spend_alerts/methods/create
Create a thread: /api/reference/resources/beta/subresources/threads/methods/create
Create a transcription session: /api/reference/resources/realtime/subresources/transcription_sessions/methods/create
Create a transcription: /api/reference/resources/audio/subresources/transcriptions/methods/create
Create a translation: /api/reference/resources/audio/subresources/translations/methods/create
Create a vector store: /api/reference/resources/vector_stores/methods/create
Create a video: /api/reference/resources/videos/methods/create
Create a voice consent: /api/reference/resources/audio/subresources/voice_consents/methods/create
Create a voice: /api/reference/resources/audio/subresources/voices/methods/create
Create an API key: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/service_accounts/subresources/api_keys/methods/create
Create an admin API key: /api/reference/resources/admin/subresources/organization/subresources/admin_api_keys/methods/create
Create an assistant: /api/reference/resources/beta/subresources/assistants/methods/create
Create an embedding: /api/reference/resources/embeddings/methods/create
Create an eval: /api/reference/resources/evals/methods/create
Create an invite: /api/reference/resources/admin/subresources/organization/subresources/invites/methods/create
Create an item: /api/reference/resources/conversations/subresources/items/methods/create
Create an upload: /api/reference/resources/uploads/methods/create
Create an user: /api/reference/resources/admin/subresources/organization/subresources/groups/subresources/users/methods/create
Create an user: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/users/methods/create
Create skill version: /api/reference/resources/skills/subresources/versions/methods/create
Deactivate: /api/reference/resources/admin/subresources/organization/subresources/certificates/methods/deactivate
Deactivate: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/certificates/methods/deactivate
Debugging requests: /api/reference/overview#debugging-requests
Delete a certificate: /api/reference/resources/admin/subresources/organization/subresources/certificates/methods/delete
Delete a chat completion: /api/reference/resources/chat/subresources/completions/methods/delete
Delete a container: /api/reference/resources/containers/methods/delete
Delete a conversation: /api/reference/resources/conversations/methods/delete
Delete a file: /api/reference/resources/containers/subresources/files/methods/delete
Delete a file: /api/reference/resources/files/methods/delete
Delete a file: /api/reference/resources/vector_stores/subresources/files/methods/delete
Delete a group: /api/reference/resources/admin/subresources/organization/subresources/groups/methods/delete
Delete a group: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/groups/methods/delete
Delete a message: /api/reference/resources/beta/subresources/threads/subresources/messages/methods/delete
Delete a model permission: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/model_permissions/methods/delete
Delete a model: /api/reference/resources/models/methods/delete
Delete a permission: /api/reference/resources/fine_tuning/subresources/checkpoints/subresources/permissions/methods/delete
Delete a response: /api/reference/resources/responses/methods/delete
Delete a responses (multi-agent): /api/reference/resources/beta/subresources/responses/methods/delete
Delete a role: /api/reference/resources/admin/subresources/organization/subresources/groups/subresources/roles/methods/delete
Delete a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/groups/subresources/roles/methods/delete
Delete a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/roles/methods/delete
Delete a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/users/subresources/roles/methods/delete
Delete a role: /api/reference/resources/admin/subresources/organization/subresources/roles/methods/delete
Delete a role: /api/reference/resources/admin/subresources/organization/subresources/users/subresources/roles/methods/delete
Delete a run: /api/reference/resources/evals/subresources/runs/methods/delete
Delete a service account: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/service_accounts/methods/delete
Delete a skill: /api/reference/resources/skills/methods/delete
Delete a spend alert: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/spend_alerts/methods/delete
Delete a spend alert: /api/reference/resources/admin/subresources/organization/subresources/spend_alerts/methods/delete
Delete a spend limit: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/spend_limit/methods/delete
Delete a spend limit: /api/reference/resources/admin/subresources/organization/subresources/spend_limit/methods/delete
Delete a thread: /api/reference/resources/beta/subresources/chatkit/subresources/threads/methods/delete
Delete a thread: /api/reference/resources/beta/subresources/threads/methods/delete
Delete a vector store: /api/reference/resources/vector_stores/methods/delete
Delete a video: /api/reference/resources/videos/methods/delete
Delete a voice consent: /api/reference/resources/audio/subresources/voice_consents/methods/delete
Delete an API key: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/api_keys/methods/delete
Delete an admin API key: /api/reference/resources/admin/subresources/organization/subresources/admin_api_keys/methods/delete
Delete an assistant: /api/reference/resources/beta/subresources/assistants/methods/delete
Delete an eval: /api/reference/resources/evals/methods/delete
Delete an invite: /api/reference/resources/admin/subresources/organization/subresources/invites/methods/delete
Delete an item: /api/reference/resources/conversations/subresources/items/methods/delete
Delete an user: /api/reference/resources/admin/subresources/organization/subresources/groups/subresources/users/methods/delete
Delete an user: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/users/methods/delete
Delete an user: /api/reference/resources/admin/subresources/organization/subresources/users/methods/delete
Delete skill version: /api/reference/resources/skills/subresources/versions/methods/delete
Docs Guides, concepts, and product docs for Codex: https://learn.chatgpt.com/docs
Docs: /codex
Docs: https://learn.chatgpt.com/docs
Download Content: /api/reference/resources/videos/methods/download_content
Edit an Image: /api/reference/resources/images/methods/edit
Edit: /api/reference/resources/videos/methods/edit
Embeddings: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/embeddings
Error codes: /api/docs/guides/error-codes
Events: /api/reference/resources/webhooks
Extend: /api/reference/resources/videos/methods/extend
File Search Calls: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/file_search_calls
Generate an Image: /api/reference/resources/images/methods/generate
Get Character: /api/reference/resources/videos/methods/get_character
HTTP Bearer authentication: https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/
Hangup: /api/reference/resources/realtime/subresources/calls/methods/hangup
Home: /
Image edit streaming events: /api/reference/resources/images/edit-streaming-events
Image generation streaming events: /api/reference/resources/images/generation-streaming-events
Images: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/images
Introduction: /api/reference/overview
Learn Docs, videos, and demo apps for building with OpenAI: /learn
Learn: /learn
List API keys: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/api_keys/methods/list
List Events: /api/reference/resources/fine_tuning/subresources/jobs/methods/list_events
List Files: /api/reference/resources/vector_stores/subresources/file_batches/methods/list_files
List Items: /api/reference/resources/beta/subresources/chatkit/subresources/threads/methods/list_items
List Rate Limits: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/rate_limits/methods/list_rate_limits
List admin API keys: /api/reference/resources/admin/subresources/organization/subresources/admin_api_keys/methods/list
List assistants: /api/reference/resources/beta/subresources/assistants/methods/list
List audit logs: /api/reference/resources/admin/subresources/organization/subresources/audit_logs/methods/list
List batches: /api/reference/resources/batches/methods/list
List certificates: /api/reference/resources/admin/subresources/organization/subresources/certificates/methods/list
List certificates: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/certificates/methods/list
List chat completions: /api/reference/resources/chat/subresources/completions/methods/list
List chat completions: /api/reference/resources/chat/subresources/completions/subresources/messages/methods/list
List checkpoints: /api/reference/resources/fine_tuning/subresources/jobs/subresources/checkpoints/methods/list
List containers: /api/reference/resources/containers/methods/list
List evals: /api/reference/resources/evals/methods/list
List files: /api/reference/resources/containers/subresources/files/methods/list
List files: /api/reference/resources/files/methods/list
List files: /api/reference/resources/vector_stores/subresources/files/methods/list
List groups: /api/reference/resources/admin/subresources/organization/subresources/groups/methods/list
List groups: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/groups/methods/list
List input items: /api/reference/resources/beta/subresources/responses/subresources/input_items/methods/list
List input items: /api/reference/resources/responses/subresources/input_items/methods/list
List invites: /api/reference/resources/admin/subresources/organization/subresources/invites/methods/list
List items: /api/reference/resources/conversations/subresources/items/methods/list
List jobs: /api/reference/resources/fine_tuning/subresources/jobs/methods/list
List messages: /api/reference/resources/beta/subresources/threads/subresources/messages/methods/list
List models: /api/reference/resources/models/methods/list
List output items: /api/reference/resources/evals/subresources/runs/subresources/output_items/methods/list
List permissions: /api/reference/resources/fine_tuning/subresources/checkpoints/subresources/permissions/methods/list
List projects: /api/reference/resources/admin/subresources/organization/subresources/projects/methods/list
List roles: /api/reference/resources/admin/subresources/organization/subresources/groups/subresources/roles/methods/list
List roles: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/groups/subresources/roles/methods/list
List roles: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/roles/methods/list
List roles: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/users/subresources/roles/methods/list
List roles: /api/reference/resources/admin/subresources/organization/subresources/roles/methods/list
List roles: /api/reference/resources/admin/subresources/organization/subresources/users/subresources/roles/methods/list
List runs: /api/reference/resources/beta/subresources/threads/subresources/runs/methods/list
List runs: /api/reference/resources/evals/subresources/runs/methods/list
List service accounts: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/service_accounts/methods/list
List skill versions: /api/reference/resources/skills/subresources/versions/methods/list
List skills: /api/reference/resources/skills/methods/list
List spend alerts: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/spend_alerts/methods/list
List spend alerts: /api/reference/resources/admin/subresources/organization/subresources/spend_alerts/methods/list
List steps: /api/reference/resources/beta/subresources/threads/subresources/runs/subresources/steps/methods/list
List threads: /api/reference/resources/beta/subresources/chatkit/subresources/threads/methods/list
List users: /api/reference/resources/admin/subresources/organization/subresources/groups/subresources/users/methods/list
List users: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/users/methods/list
List users: /api/reference/resources/admin/subresources/organization/subresources/users/methods/list
List vector stores: /api/reference/resources/vector_stores/methods/list
List videos: /api/reference/resources/videos/methods/list
List voice consents: /api/reference/resources/audio/subresources/voice_consents/methods/list
Model: /api/docs/models
Models: /api/docs/models
Moderations: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/moderations
Overview: /api/docs
Overview: /api/reference/administration/overview
Overview: /api/reference/chat-completions/overview
Overview: /api/reference/realtime-beta/overview
Overview: /api/reference/responses/overview
Pause: /api/reference/resources/fine_tuning/subresources/jobs/methods/pause
Plugins Extend ChatGPT and Codex: /plugins
Plugins: /plugins
Production: /api/docs/guides/production-best-practices
Rate limiting information: /api/docs/guides/rate-limits
Realtime API: /api/docs/guides/realtime
Refer: /api/reference/resources/realtime/subresources/calls/methods/refer
Reject: /api/reference/resources/realtime/subresources/calls/methods/reject
Remix: /api/reference/resources/videos/methods/remix
Resources: /codex/resources
Resources: /learn
Resources: /resources
Responses create reference: /api/reference/resources/responses/methods/create
Responses: /api/reference/responses/overview
Resume: /api/reference/resources/fine_tuning/subresources/jobs/methods/resume
Retrieve Skill Version Content: /api/reference/resources/skills/subresources/versions/subresources/content/methods/retrieve
Retrieve a batch: /api/reference/resources/batches/methods/retrieve
Retrieve a certificate: /api/reference/resources/admin/subresources/organization/subresources/certificates/methods/retrieve
Retrieve a chat completion: /api/reference/resources/chat/subresources/completions/methods/retrieve
Retrieve a container: /api/reference/resources/containers/methods/retrieve
Retrieve a content: /api/reference/resources/containers/subresources/files/subresources/content/methods/retrieve
Retrieve a conversation: /api/reference/resources/conversations/methods/retrieve
Retrieve a data retention: /api/reference/resources/admin/subresources/organization/subresources/data_retention/methods/retrieve
Retrieve a data retention: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/data_retention/methods/retrieve
Retrieve a file batch: /api/reference/resources/vector_stores/subresources/file_batches/methods/retrieve
Retrieve a file: /api/reference/resources/containers/subresources/files/methods/retrieve
Retrieve a file: /api/reference/resources/files/methods/retrieve
Retrieve a file: /api/reference/resources/vector_stores/subresources/files/methods/retrieve
Retrieve a group: /api/reference/resources/admin/subresources/organization/subresources/groups/methods/retrieve
Retrieve a group: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/groups/methods/retrieve
Retrieve a hosted tool permission: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/hosted_tool_permissions/methods/retrieve
Retrieve a job: /api/reference/resources/fine_tuning/subresources/jobs/methods/retrieve
Retrieve a message: /api/reference/resources/beta/subresources/threads/subresources/messages/methods/retrieve
Retrieve a model permission: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/model_permissions/methods/retrieve
Retrieve a model: /api/reference/resources/models/methods/retrieve
Retrieve a permission: /api/reference/resources/fine_tuning/subresources/checkpoints/subresources/permissions/methods/list
Retrieve a project: /api/reference/resources/admin/subresources/organization/subresources/projects/methods/retrieve
Retrieve a response: /api/reference/resources/responses/methods/retrieve
Retrieve a responses (multi-agent): /api/reference/resources/beta/subresources/responses/methods/retrieve
Retrieve a role: /api/reference/resources/admin/subresources/organization/subresources/groups/subresources/roles/methods/retrieve
Retrieve a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/groups/subresources/roles/methods/retrieve
Retrieve a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/roles/methods/retrieve
Retrieve a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/users/subresources/roles/methods/retrieve
Retrieve a role: /api/reference/resources/admin/subresources/organization/subresources/roles/methods/retrieve
Retrieve a role: /api/reference/resources/admin/subresources/organization/subresources/users/subresources/roles/methods/retrieve
Retrieve a run: /api/reference/resources/beta/subresources/threads/subresources/runs/methods/retrieve
Retrieve a run: /api/reference/resources/evals/subresources/runs/methods/retrieve
Retrieve a service account: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/service_accounts/methods/retrieve
Retrieve a skill: /api/reference/resources/skills/methods/retrieve
Retrieve a spend alert: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/spend_alerts/methods/retrieve
Retrieve a spend alert: /api/reference/resources/admin/subresources/organization/subresources/spend_alerts/methods/retrieve
Retrieve a spend limit: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/spend_limit/methods/retrieve
Retrieve a spend limit: /api/reference/resources/admin/subresources/organization/subresources/spend_limit/methods/retrieve
Retrieve a step: /api/reference/resources/beta/subresources/threads/subresources/runs/subresources/steps/methods/retrieve
Retrieve a thread: /api/reference/resources/beta/subresources/chatkit/subresources/threads/methods/retrieve
Retrieve a thread: /api/reference/resources/beta/subresources/threads/methods/retrieve
Retrieve a vector store: /api/reference/resources/vector_stores/methods/retrieve
Retrieve a video: /api/reference/resources/videos/methods/retrieve
Retrieve a voice consent: /api/reference/resources/audio/subresources/voice_consents/methods/retrieve
Retrieve an API key: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/api_keys/methods/retrieve
Retrieve an admin API key: /api/reference/resources/admin/subresources/organization/subresources/admin_api_keys/methods/retrieve
Retrieve an assistant: /api/reference/resources/beta/subresources/assistants/methods/retrieve
Retrieve an eval: /api/reference/resources/evals/methods/retrieve
Retrieve an invite: /api/reference/resources/admin/subresources/organization/subresources/invites/methods/retrieve
Retrieve an item: /api/reference/resources/conversations/subresources/items/methods/retrieve
Retrieve an output item: /api/reference/resources/evals/subresources/runs/subresources/output_items/methods/retrieve
Retrieve an user: /api/reference/resources/admin/subresources/organization/subresources/groups/subresources/users/methods/retrieve
Retrieve an user: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/users/methods/retrieve
Retrieve an user: /api/reference/resources/admin/subresources/organization/subresources/users/methods/retrieve
Retrieve file content: /api/reference/resources/files/methods/content
Retrieve file content: /api/reference/resources/vector_stores/subresources/files/methods/content
Retrieve skill content: /api/reference/resources/skills/subresources/content/methods/retrieve
Retrieve skill version: /api/reference/resources/skills/subresources/versions/methods/retrieve
Run: /api/reference/resources/fine_tuning/subresources/alpha/subresources/graders/methods/run
Search: /api/reference/resources/vector_stores/methods/search
Server events: /api/reference/resources/realtime/server-events
Showcase Demo apps to get inspired: /showcase
Showcase: /showcase
Streaming events: /api/reference/resources/beta/subresources/responses/streaming-events
Streaming events: /api/reference/resources/chat/subresources/completions/streaming-events
Streaming events: /api/reference/resources/responses/streaming-events
Submit Tool Outputs: /api/reference/resources/beta/subresources/threads/subresources/runs/methods/submit_tool_outputs
Tools: /api/docs/guides/tools
Translation client events: /api/reference/resources/realtime/translation-client-events
Translation server events: /api/reference/resources/realtime/translation-server-events
Try ChatGPT: https://chatgpt.com/
Update Rate Limit: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/rate_limits/methods/update_rate_limit
Update a certificate: /api/reference/resources/admin/subresources/organization/subresources/certificates/methods/update
Update a chat completion: /api/reference/resources/chat/subresources/completions/methods/update
Update a conversation: /api/reference/resources/conversations/methods/update
Update a data retention: /api/reference/resources/admin/subresources/organization/subresources/data_retention/methods/update
Update a data retention: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/data_retention/methods/update
Update a file: /api/reference/resources/vector_stores/subresources/files/methods/update
Update a group: /api/reference/resources/admin/subresources/organization/subresources/groups/methods/update
Update a hosted tool permission: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/hosted_tool_permissions/methods/update
Update a message: /api/reference/resources/beta/subresources/threads/subresources/messages/methods/update
Update a model permission: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/model_permissions/methods/update
Update a project: /api/reference/resources/admin/subresources/organization/subresources/projects/methods/update
Update a role: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/roles/methods/update
Update a role: /api/reference/resources/admin/subresources/organization/subresources/roles/methods/update
Update a run: /api/reference/resources/beta/subresources/threads/subresources/runs/methods/update
Update a service account: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/service_accounts/methods/update
Update a skill: /api/reference/resources/skills/methods/update
Update a spend alert: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/spend_alerts/methods/update
Update a spend alert: /api/reference/resources/admin/subresources/organization/subresources/spend_alerts/methods/update
Update a spend limit: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/spend_limit/methods/update
Update a spend limit: /api/reference/resources/admin/subresources/organization/subresources/spend_limit/methods/update
Update a thread: /api/reference/resources/beta/subresources/threads/methods/update
Update a vector store: /api/reference/resources/vector_stores/methods/update
Update a voice consent: /api/reference/resources/audio/subresources/voice_consents/methods/update
Update an assistant: /api/reference/resources/beta/subresources/assistants/methods/update
Update an eval: /api/reference/resources/evals/methods/update
Update an user: /api/reference/resources/admin/subresources/organization/subresources/projects/subresources/users/methods/update
Update an user: /api/reference/resources/admin/subresources/organization/subresources/users/methods/update
Use cases Example workflows and tasks teams can take on with ChatGPT or Codex: https://learn.chatgpt.com/use-cases
Use cases: /codex/use-cases
Use cases: https://learn.chatgpt.com/use-cases
Validate: /api/reference/resources/fine_tuning/subresources/alpha/subresources/graders/methods/validate
Vector Stores: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/vector_stores
Voice & Audio: /api/docs/guides/realtime
Web Search Calls: /api/reference/resources/admin/subresources/organization/subresources/usage/methods/web_search_calls
WebSocket events: /api/reference/resources/beta/subresources/responses/websocket-events
WebSocket events: /api/reference/resources/responses/websocket-events
Workload identity tokens: /api/reference/workload-identity-federation
Workspace Agents Trigger published ChatGPT workspace agents: /workspace-agents
Workspace Agents: /workspace-agents
changelog: /api/docs/changelog
client events: /api/reference/resources/realtime/client-events
client libraries: /api/docs/libraries
dashboard settings: https://platform.openai.com/settings/organization/general
developer quickstart: /api/docs/quickstart
error codes: /api/docs/guides/error-codes
evals: /api/docs/guides/evals
libraries page: /api/docs/libraries
llms.txt: /llms.txt
organization: /api/docs/guides/production-best-practices#setting-up-your-organization
rate limits: /api/docs/guides/rate-limits
semantic versioning: https://semver.org/
server events: /api/reference/resources/realtime/server-events
support team: https://help.openai.com/en/
workload identity federation: /api/docs/guides/workload-identity-federation

[content]
API Overview | OpenAI API Reference
Skip to content
For the complete documentation index, see
llms.txt
. Markdown versions of documentation pages are available by appending
.md
to the page URL.
ChatGPT
Home
API
Codex
Docs
Guides, concepts, and product docs for Codex
Use cases
Example workflows and tasks teams can take on with ChatGPT or Codex
Docs
Use cases
Resources
ChatGPT
Plugins
Extend ChatGPT and Codex
Workspace Agents
Trigger published ChatGPT workspace agents
Commerce
Build commerce flows in ChatGPT
Ads
Publish and measure ads in ChatGPT
Resources
Showcase
Demo apps to get inspired
Blog
Learnings and experiences from developers
Cookbook
Notebook examples for building with OpenAI models
Learn
Docs, videos, and demo apps for building with OpenAI
Community
Programs, meetups, and support for builders
Start searching
API Dashboard
Try ChatGPT
Overview
Models
Agents
Tools
Voice & Audio
Production
API reference
Search the API docs
Search docs
Suggested
responses create
reasoning_effort
realtime
prompt caching
Primary navigation
API
Codex
ChatGPT
Docs
Use cases
Resources
Resources
Search docs
Suggested
responses create
reasoning_effort
realtime
prompt caching
Overview
Models
Agents
Tools
Voice & Audio
Production
API reference
Overview
Models
Agents
Tools
Voice & Audio
Production
API reference
Docs section
API reference
Docs
Use cases
Docs
Use cases
Docs section
Docs
Plugins
Workspace Agents
Commerce
Ads
Plugins
Workspace Agents
Commerce
Ads
Docs section
Select...
Showcase
Blog
Cookbook
Learn
Community
Showcase
Blog
Cookbook
Learn
Community
Docs section
Select...
API Dashboard
Try ChatGPT
API
Codex
ChatGPT
Docs
Use cases
Resources
Resources
Overview
Models
Agents
Tools
Voice & Audio
Production
API reference
API Reference
API Reference
Introduction
Authentication
Workload identity tokens
Debugging requests
Backwards compatibility
Responses API
Overview
Responses
Create a response
Retrieve a response
Delete a response
List input items
Count input tokens
Cancel a response
Compact a response
Conversations
Create a conversation
Retrieve a conversation
Update a conversation
Delete a conversation
Items
Create an item
Retrieve an item
Delete an item
List items
Streaming events
WebSocket events
Beta APIs
Responses (Multi-agent)
Create a responses (multi-agent)
Retrieve a responses (multi-agent)
Delete a responses (multi-agent)
Cancel a responses (multi-agent)
Compact a responses (multi-agent)
Input Items
List input items
Input Tokens
Count input tokens
Streaming events
WebSocket events
Webhooks
Events
Platform APIs
Audio
Create a speech
Create a transcription
Create a translation
Voice Consents
Create a voice consent
Retrieve a voice consent
Update a voice consent
Delete a voice consent
List voice consents
Create a voice
Videos
Create a video
Create Character
Get Character
Retrieve a video
Delete a video
List videos
Download Content
Edit
Extend
Remix
Images
Generate an Image
Edit an Image
Create Variation
Image generation streaming events
Image edit streaming events
Embeddings
Create an embedding
Evals
Create an eval
Retrieve an eval
Update an eval
Delete an eval
List evals
Runs
Create a run
Retrieve a run
Delete a run
List runs
Cancel a run
Output Items
Retrieve an output item
List output items
Fine Tuning
Alpha
Graders
Run
Validate
Checkpoints
Permissions
Create a permission
Retrieve a permission
Delete a permission
List permissions
Jobs
Create a job
Retrieve a job
List jobs
List Events
Cancel a job
Pause
Resume
Checkpoints
List checkpoints
Batches
Create a batch
Retrieve a batch
List batches
Cancel a batch
Files
List files
Create a file
Retrieve a file
Delete a file
Retrieve file content
Uploads
Create an upload
Cancel an upload
Complete
Parts
Create a part
Models
Retrieve a model
Delete a model
List models
Moderations
Create a moderation
Content Provenance Checks
Create a content provenance check
Vector Stores
Vector Stores
Create a vector store
Retrieve a vector store
Update a vector store
Delete a vector store
List vector stores
Search
File Batches
Create a file batch
Retrieve a file batch
List Files
Cancel a file batch
Files
List files
Create a file
Retrieve a file
Update a file
Delete a file
Retrieve file content
ChatKit
Sessions
Create a session
Cancel a session
Threads
Retrieve a thread
Delete a thread
List threads
List Items
Containers
Containers
Create a container
Retrieve a container
Delete a container
List containers
Files
List files
Create a file
Retrieve a file
Delete a file
Content
Retrieve a content
Skills
Skills
Create a skill
Retrieve a skill
Retrieve skill content
Update a skill
Delete a skill
List skills
Versions
Create skill version
Retrieve skill version
Retrieve Skill Version Content
Delete skill version
List skill versions
Realtime
Translations
Client Secrets
Create a client secret
Translation client events
Translation server events
Client Secrets
Create a client secret
Calls
Accept
Hangup
Refer
Reject
Client events
Server events
Administration
Overview
Admin API Keys
Create an admin API key
Retrieve an admin API key
Delete an admin API key
List admin API keys
Audit Logs
List audit logs
Certificates
Create a certificate
Retrieve a certificate
Update a certificate
Delete a certificate
List certificates
Activate
Deactivate
Data Retention
Retrieve a data retention
Update a data retention
Groups
Create a group
Retrieve a group
Update a group
Delete a group
List groups
Roles
Create a role
Retrieve a role
Delete a role
List roles
Users
Create an user
Retrieve an user
Delete an user
List users
Invites
Create an invite
Retrieve an invite
Delete an invite
List invites
Projects
Create a project
Retrieve a project
Update a project
List projects
Archive
API Keys
Retrieve an API key
Delete an API key
List API keys
Certificates
List certificates
Activate
Deactivate
Data Retention
Retrieve a data retention
Update a data retention
Groups
Create a group
Retrieve a group
Delete a group
List groups
Roles
Create a role
Retrieve a role
Delete a role
List roles
Hosted Tool Permissions
Retrieve a hosted tool permission
Update a hosted tool permission
Model Permissions
Retrieve a model permission
Update a model permission
Delete a model permission
Rate Limits
Update Rate Limit
List Rate Limits
Roles
Create a role
Retrieve a role
Update a role
Delete a role
List roles
Service Accounts
Create a service account
Retrieve a service account
Update a service account
Delete a service account
List service accounts
API Keys
Create an API key
Spend Alerts
Create a spend alert
Retrieve a spend alert
Update a spend alert
Delete a spend alert
List spend alerts
Spend Limit
Retrieve a spend limit
Update a spend limit
Delete a spend limit
Users
Create an user
Retrieve an user
Update an user
Delete an user
List users
Roles
Create a role
Retrieve a role
Delete a role
List roles
Roles
Create a role
Retrieve a role
Update a role
Delete a role
List roles
Spend Alerts
Create a spend alert
Retrieve a spend alert
Update a spend alert
Delete a spend alert
List spend alerts
Spend Limit
Retrieve a spend limit
Update a spend limit
Delete a spend limit
Usage
Audio Speeches
Audio Transcriptions
Code Interpreter Sessions
Completions
Costs
Embeddings
File Search Calls
Images
Moderations
Vector Stores
Web Search Calls
Users
Retrieve an user
Update an user
Delete an user
List users
Roles
Create a role
Retrieve a role
Delete a role
List roles
Chat Completions
Chat Completions
Overview
Create a chat completion
Retrieve a chat completion
Update a chat completion
Delete a chat completion
List chat completions
List chat completions
Streaming events
Legacy
Realtime Beta
Overview
Sessions
Create a session
Transcription Sessions
Create a transcription session
Assistants
Create an assistant
Retrieve an assistant
Update an assistant
Delete an assistant
List assistants
Threads
Create a thread
Create And Run
Retrieve a thread
Update a thread
Delete a thread
Messages
Create a message
Retrieve a message
Update a message
Delete a message
List messages
Runs
Create a run
Retrieve a run
Update a run
List runs
Cancel a run
Submit Tool Outputs
Steps
Retrieve a step
List steps
Assistants streaming events
Completions
Create a completion
API Reference
Introduction
API Overview
Use this reference to look up OpenAI API endpoints, request and response schemas, streaming events, client library methods, and shared behavior such as authentication, errors, rate limits, and request IDs.
Start here
Section titled “Start here”
Choose the API surface for your application:
Responses
for direct model requests, tool use, audio, image, and text inputs, and stateful interactions.
Realtime API
for low-latency voice or audio sessions over WebRTC, WebSocket, or SIP. Use the
client events
and
server events
references while building sessions.
Administration
for organization workflows such as users, invites, projects, API keys, and audit logs.
Create credentials. Use a standard
API key
for application requests, an
Admin API key
for Administration endpoints, or
workload identity federation
for short-lived access tokens.
Install an official client library from the
libraries page
, or call the HTTP API directly from any environment that supports HTTP requests.
Make a first request with the
developer quickstart
or go straight to the
Responses create reference
.
Before production, review
error codes
,
rate limits
, and request ID logging below.
Authentication
Section titled “Authentication”
The OpenAI API accepts bearer credentials from API keys or from short-lived access tokens created with
workload identity federation
.
Remember that your API key is a secret.
Don’t share it with others or expose it in any client-side code such as browsers or apps. Load API keys from an environment variable or key management service on the server.
Revocations of an API key take effect within a few seconds. Most updates that affect authentication results of an API key propagate within 15 minutes, but can potentially take longer.
Provide API credentials with
HTTP Bearer authentication
.
Authorization:
Bearer
OPENAI_API_KEY_OR_ACCESS_TOKEN
If you belong to more than one organization or access projects through a legacy user API key, pass a header to specify which organization and project to use for an API request:
curl
https://api.openai.com/v1/models
\
-H
"Authorization: Bearer
$OPENAI_API_KEY
"
\
-H
"OpenAI-Organization:
$ORGANIZATION_ID
"
\
-H
"OpenAI-Project:
$PROJECT_ID
"
Usage from these API requests counts as usage for the specified organization and project. Find organization and project IDs in your
dashboard settings
.
Request headers
Section titled “Request headers”
For reliable behavior across API paths and HTTP versions, keep the total size of an API request’s headers under 64 KiB. This budget includes the names and values of all headers, including common headers such as
Authorization
,
Content-Type
, and
User-Agent
, as well as any custom headers.
To leave room for required headers and headers added by intermediaries, keep any individual custom header value and the total size of all custom header values at 60 KiB or less. Requests with larger headers may fail before they reach the API, so you may not receive a response or an
x-request-id
.
Debugging requests
Section titled “Debugging requests”
Error codes
describe failures returned from API responses. Inspect HTTP response headers for the unique ID of a request and rate limit details. Common response headers include:
API meta information
openai-organization
: The
organization
associated with the request
openai-processing-ms
: Time taken processing your API request
openai-version
: REST API version used for this request (currently
2020-10-01
)
x-request-id
: Unique identifier for this API request (used in troubleshooting)
Rate limiting information
x-ratelimit-limit-requests
x-ratelimit-limit-tokens
x-ratelimit-remaining-requests
x-ratelimit-remaining-tokens
x-ratelimit-reset-requests
x-ratelimit-reset-tokens
x-ratelimit-limit-project-tokens
x-ratelimit-remaining-project-tokens
x-ratelimit-reset-project-tokens
Project-token headers may be present when a project-scoped token limit applies.
OpenAI recommends logging request IDs in production deployments
for more efficient troubleshooting with the
support team
, should the need arise. Official
client libraries
provide a property on top-level response objects containing the value of the
x-request-id
header.
Supplying your own request ID with
X-Client-Request-Id
Section titled “Supplying your own request ID with X-Client-Request-Id”
Along with the server-generated
x-request-id
, you can supply your own unique identifier for each request via the
X-Client-Request-Id
request header. This header isn’t added automatically; you must explicitly set it on the request.
When you include
X-Client-Request-Id
:
You control the ID format (for example, a UUID or your internal trace ID), but it must contain only ASCII characters and be no more than 512 characters long; otherwise, the request will fail with a 400 error. Make this value unique per request.
OpenAI logs this value internally for supported endpoints, including chat/completions, embeddings, responses, and more.
In cases like timeouts or network issues when you can’t get the
X-Request-Id
response header, you can share the
X-Client-Request-Id
value with the support team to look up whether OpenAI received the request and when.
Example:
curl
https://api.openai.com/v1/chat/completions
\
-H
"Authorization: Bearer
$OPENAI_API_KEY
"
\
-H
"X-Client-Request-Id: 123e4567-e89b-12d3-a456-426614174000"
Backwards compatibility
Section titled “Backwards compatibility”
OpenAI provides stability to API users by avoiding breaking changes in major API versions whenever reasonably possible. This includes:
The REST API (currently
v1
)
First-party
client libraries
(released libraries adhere to
semantic versioning
)
Model
families (like
gpt-4o
or
o4-mini
)
Model prompting behavior between snapshots is subject to change
. Model outputs are by their nature variable, so expect changes in prompting and model behavior between snapshots. The best way to ensure consistent prompting behavior and model output is to use pinned model versions, and to run
evals
for your applications.
Backwards-compatible API changes
:
Adding new resources (URLs) to the REST API and client libraries
Adding new optional API parameters
Adding new properties to JSON response objects or event data
Changing the order of properties in a JSON response object
Changing the length or format of opaque strings, like resource identifiers
Adding new event types in streaming APIs
See the
changelog
for a list of backwards-compatible changes and rare breaking changes.
