API Reference
Libraries
API Overview
Completions
Create completion
POST/completions
Chat
ChatCompletions
Create chat completion
POST/chat/completions
List Chat Completions
GET/chat/completions
Get chat completion
GET/chat/completions/{completion_id}
Update chat completion
POST/chat/completions/{completion_id}
Delete chat completion
DELETE/chat/completions/{completion_id}
ChatCompletionsMessages
Get chat messages
GET/chat/completions/{completion_id}/messages
Embeddings
Create embeddings
POST/embeddings
Files
List files
GET/files
Upload file
POST/files
Delete file
DELETE/files/{file_id}
Retrieve file
GET/files/{file_id}
Retrieve file content
GET/files/{file_id}/content
Images
Create image
POST/images/generations
Create image edit
POST/images/edits
Create image variation
POST/images/variations
Audio
AudioTranscriptions
Create transcription
POST/audio/transcriptions
AudioTranslations
Create translation
POST/audio/translations
AudioSpeech
Create speech
POST/audio/speech
AudioVoices
Create voice
POST/audio/voices
AudioVoice Consents
List voice consents
GET/audio/voice_consents
Create voice consent
POST/audio/voice_consents
Retrieve voice consent
GET/audio/voice_consents/{consent_id}
Update voice consent
POST/audio/voice_consents/{consent_id}
Delete voice consent
DELETE/audio/voice_consents/{consent_id}
Moderations
Create moderation
POST/moderations
Models
Fine Tuning
Fine TuningMethods
Fine TuningJobs
Create fine-tuning job
POST/fine_tuning/jobs
List fine-tuning jobs
GET/fine_tuning/jobs
Retrieve fine-tuning job
GET/fine_tuning/jobs/{fine_tuning_job_id}
List fine-tuning events
GET/fine_tuning/jobs/{fine_tuning_job_id}/events
Cancel fine-tuning
POST/fine_tuning/jobs/{fine_tuning_job_id}/cancel
Pause fine-tuning
POST/fine_tuning/jobs/{fine_tuning_job_id}/pause
Resume fine-tuning
POST/fine_tuning/jobs/{fine_tuning_job_id}/resume
Fine TuningJobsCheckpoints
List fine-tuning checkpoints
GET/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints
Fine TuningCheckpoints
Fine TuningCheckpointsPermissions
List checkpoint permissions
GET/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions
Create checkpoint permissions
POST/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions
Delete checkpoint permission
DELETE/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}
Fine TuningAlpha
Fine TuningAlphaGraders
Run grader
POST/fine_tuning/alpha/graders/run
Validate grader
POST/fine_tuning/alpha/graders/validate
Graders
GradersGrader Models
Vector Stores
List vector stores
GET/vector_stores
Create vector store
POST/vector_stores
Retrieve vector store
GET/vector_stores/{vector_store_id}
Modify vector store
POST/vector_stores/{vector_store_id}
Delete vector store
DELETE/vector_stores/{vector_store_id}
Search vector store
POST/vector_stores/{vector_store_id}/search
Vector StoresFiles
List vector store files
GET/vector_stores/{vector_store_id}/files
Create vector store file
POST/vector_stores/{vector_store_id}/files
Update vector store file attributes
POST/vector_stores/{vector_store_id}/files/{file_id}
Retrieve vector store file
GET/vector_stores/{vector_store_id}/files/{file_id}
Delete vector store file
DELETE/vector_stores/{vector_store_id}/files/{file_id}
Retrieve vector store file content
GET/vector_stores/{vector_store_id}/files/{file_id}/content
Vector StoresFile Batches
Create vector store file batch
POST/vector_stores/{vector_store_id}/file_batches
Retrieve vector store file batch
GET/vector_stores/{vector_store_id}/file_batches/{batch_id}
Cancel vector store file batch
POST/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel
List vector store files in a batch
GET/vector_stores/{vector_store_id}/file_batches/{batch_id}/files
Webhooks
Unwrap
Function
Beta
BetaChatKit
BetaChatKitSessions
Cancel chat session
POST/chatkit/sessions/{session_id}/cancel
Create ChatKit session
POST/chatkit/sessions
BetaChatKitThreads
List ChatKit thread items
GET/chatkit/threads/{thread_id}/items
Retrieve ChatKit thread
GET/chatkit/threads/{thread_id}
Delete ChatKit thread
DELETE/chatkit/threads/{thread_id}
List ChatKit threads
GET/chatkit/threads
BetaAssistants
BetaThreads
BetaThreadsRuns
BetaThreadsRunsSteps
BetaThreadsMessages
Batches
Create batch
POST/batches
Retrieve batch
GET/batches/{batch_id}
Cancel batch
POST/batches/{batch_id}/cancel
List batches
GET/batches
Uploads
Create upload
POST/uploads
Complete upload
POST/uploads/{upload_id}/complete
Cancel upload
POST/uploads/{upload_id}/cancel
UploadsParts
Add upload part
POST/uploads/{upload_id}/parts
Organization
OrganizationAudit Logs
List audit logs
GET/organization/audit_logs
Costs
GET/organization/costs
OrganizationAudit LogsAdmin API Keys
List all organization and project API keys.
GET/organization/admin_api_keys
Create admin API key
POST/organization/admin_api_keys
Retrieve admin API key
GET/organization/admin_api_keys/{key_id}
Delete admin API key
DELETE/organization/admin_api_keys/{key_id}
OrganizationAudit LogsUsage
Audio speeches
GET/organization/usage/audio_speeches
Audio transcriptions
GET/organization/usage/audio_transcriptions
Code interpreter sessions
GET/organization/usage/code_interpreter_sessions
Completions
GET/organization/usage/completions
Embeddings
GET/organization/usage/embeddings
Images
GET/organization/usage/images
Moderations
GET/organization/usage/moderations
Vector stores
GET/organization/usage/vector_stores
OrganizationInvites
List invites
GET/organization/invites
Create invite
POST/organization/invites
Retrieve invite
GET/organization/invites/{invite_id}
Delete invite
DELETE/organization/invites/{invite_id}
OrganizationUsers
List users
GET/organization/users
Retrieve user
GET/organization/users/{user_id}
Modify user
POST/organization/users/{user_id}
Delete user
DELETE/organization/users/{user_id}
OrganizationUsersRoles
List user organization role assignments
GET/organization/users/{user_id}/roles
Assign organization role to user
POST/organization/users/{user_id}/roles
Unassign organization role from user
DELETE/organization/users/{user_id}/roles/{role_id}
OrganizationGroups
List groups
GET/organization/groups
Create group
POST/organization/groups
Update group
POST/organization/groups/{group_id}
Delete group
DELETE/organization/groups/{group_id}
OrganizationGroupsUsers
List group users
GET/organization/groups/{group_id}/users
Add group user
POST/organization/groups/{group_id}/users
Remove group user
DELETE/organization/groups/{group_id}/users/{user_id}
OrganizationGroupsRoles
List group organization role assignments
GET/organization/groups/{group_id}/roles
Assign organization role to group
POST/organization/groups/{group_id}/roles
Unassign organization role from group
DELETE/organization/groups/{group_id}/roles/{role_id}
OrganizationRoles
List organization roles
GET/organization/roles
Create organization role
POST/organization/roles
Update organization role
POST/organization/roles/{role_id}
Delete organization role
DELETE/organization/roles/{role_id}
OrganizationCertificates
List organization certificates
GET/organization/certificates
Upload certificate
POST/organization/certificates
Get certificate
GET/organization/certificates/{certificate_id}
Modify certificate
POST/organization/certificates/{certificate_id}
Delete certificate
DELETE/organization/certificates/{certificate_id}
Activate certificates for organization
POST/organization/certificates/activate
Deactivate certificates for organization
POST/organization/certificates/deactivate
OrganizationProjects
List projects
GET/organization/projects
Create project
POST/organization/projects
Retrieve project
GET/organization/projects/{project_id}
Modify project
POST/organization/projects/{project_id}
Archive project
POST/organization/projects/{project_id}/archive
OrganizationProjectsUsers
List project users
GET/organization/projects/{project_id}/users
Create project user
POST/organization/projects/{project_id}/users
Retrieve project user
GET/organization/projects/{project_id}/users/{user_id}
Modify project user
POST/organization/projects/{project_id}/users/{user_id}
Delete project user
DELETE/organization/projects/{project_id}/users/{user_id}
OrganizationProjectsService Accounts
List project service accounts
GET/organization/projects/{project_id}/service_accounts
Create project service account
POST/organization/projects/{project_id}/service_accounts
Retrieve project service account
GET/organization/projects/{project_id}/service_accounts/{service_account_id}
Delete project service account
DELETE/organization/projects/{project_id}/service_accounts/{service_account_id}
OrganizationProjectsAPI Keys
List project API keys
GET/organization/projects/{project_id}/api_keys
Retrieve project API key
GET/organization/projects/{project_id}/api_keys/{key_id}
Delete project API key
DELETE/organization/projects/{project_id}/api_keys/{key_id}
OrganizationProjectsRate Limits
List project rate limits
GET/organization/projects/{project_id}/rate_limits
Modify project rate limit
POST/organization/projects/{project_id}/rate_limits/{rate_limit_id}
OrganizationProjectsGroups
List project groups
GET/organization/projects/{project_id}/groups
Add project group
POST/organization/projects/{project_id}/groups
Remove project group
DELETE/organization/projects/{project_id}/groups/{group_id}
OrganizationProjectsCertificates
List project certificates
GET/organization/projects/{project_id}/certificates
Activate certificates for project
POST/organization/projects/{project_id}/certificates/activate
Deactivate certificates for project
POST/organization/projects/{project_id}/certificates/deactivate
Projects
ProjectsRoles
List project roles
GET/projects/{project_id}/roles
Create project role
POST/projects/{project_id}/roles
Update project role
POST/projects/{project_id}/roles/{role_id}
Delete project role
DELETE/projects/{project_id}/roles/{role_id}
ProjectsGroups
ProjectsGroupsRoles
List project group role assignments
GET/projects/{project_id}/groups/{group_id}/roles
Assign project role to group
POST/projects/{project_id}/groups/{group_id}/roles
Unassign project role from group
DELETE/projects/{project_id}/groups/{group_id}/roles/{role_id}
ProjectsUsers
ProjectsUsersRoles
List project user role assignments
GET/projects/{project_id}/users/{user_id}/roles
Assign project role to user
POST/projects/{project_id}/users/{user_id}/roles
Unassign project role from user
DELETE/projects/{project_id}/users/{user_id}/roles/{role_id}
Responses
Create a model response
POST/responses
Get a model response
GET/responses/{response_id}
Delete a model response
DELETE/responses/{response_id}
Cancel a response
POST/responses/{response_id}/cancel
Compact a response
POST/responses/compact
ResponsesInput Items
List input items
GET/responses/{response_id}/input_items
ResponsesInput Tokens
Get input token counts
POST/responses/input_tokens
Realtime
RealtimeClient Secrets
Create client secret
POST/realtime/client_secrets
RealtimeCalls
Accept call
POST/realtime/calls/{call_id}/accept
Hang up call
POST/realtime/calls/{call_id}/hangup
Refer call
POST/realtime/calls/{call_id}/refer
Reject call
POST/realtime/calls/{call_id}/reject
RealtimeSessions
RealtimeTranscription Sessions
Conversations
Create a conversation
POST/conversations
Retrieve a conversation
GET/conversations/{conversation_id}
Update a conversation
POST/conversations/{conversation_id}
Delete a conversation
DELETE/conversations/{conversation_id}
ConversationsItems
Create items
POST/conversations/{conversation_id}/items
List items
GET/conversations/{conversation_id}/items
Retrieve an item
GET/conversations/{conversation_id}/items/{item_id}
Delete an item
DELETE/conversations/{conversation_id}/items/{item_id}
Evals
List evals
GET/evals
Create eval
POST/evals
Get an eval
GET/evals/{eval_id}
Update an eval
POST/evals/{eval_id}
Delete an eval
DELETE/evals/{eval_id}
EvalsRuns
Get eval runs
GET/evals/{eval_id}/runs
Create eval run
POST/evals/{eval_id}/runs
Get an eval run
GET/evals/{eval_id}/runs/{run_id}
Cancel eval run
POST/evals/{eval_id}/runs/{run_id}
Delete eval run
DELETE/evals/{eval_id}/runs/{run_id}
EvalsRunsOutput Items
Get eval run output items
GET/evals/{eval_id}/runs/{run_id}/output_items
Get an output item of an eval run
GET/evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}
Containers
List containers
GET/containers
Create container
POST/containers
Retrieve container
GET/containers/{container_id}
Delete a container
DELETE/containers/{container_id}
ContainersFiles
List container files
GET/containers/{container_id}/files
Create container file
POST/containers/{container_id}/files
Retrieve container file
GET/containers/{container_id}/files/{file_id}
Delete a container file
DELETE/containers/{container_id}/files/{file_id}
ContainersFilesContent
Retrieve container file content
GET/containers/{container_id}/files/{file_id}/content
Videos
Create video
POST/videos
List videos
GET/videos
Retrieve video
GET/videos/{video_id}
Delete video
DELETE/videos/{video_id}
Remix video
POST/videos/{video_id}/remix
Retrieve video content
GET/videos/{video_id}/content