Assistants
- GETList assistants
- POSTCreate assistant
- GETRetrieve assistant
- POSTModify assistant
- DELDelete assistant
- POSTCreate thread
- POSTCreate thread and run
- GETRetrieve thread.
- POSTModify thread
- DELDelete thread
- GETList messages
- POSTCreate message
- GETRetrieve message
- POSTModify message
- DELDelete message
- GETList runs
- POSTCreate run
- GETRetrieve run
- POSTModify run
- POSTCancel run
- GETList run steps
- GETRetrieve run step
- POSTThe run step object
Chat
Completions
Embeddings
Evals
Files
Fine-tuning
- GETList checkpoint permissions
- POSTCreate checkpoint permissions
- DELDelete checkpoint permission
- GETList your organization's fine-tuning jobs
- POSTCreate a fine-tuning job
- GETRetrieve fine-tuning job
- POSTImmediately cancel a fine-tune job.
- GETList checkpoints for a fine-tuning job.
- GETGet status updates for a fine-tuning job.
Moderations
API Reference
Audit Logs
Certificates
Usage
Projects
- GETReturns a list of projects.
- POSTCreate project
- GETRetrieves a project.
- POSTModify project
- GETList project API keys
- GETRetrieve project API key
- DELDelete project API key
- POSTArchive project
- GETList project rate limits
- POSTUpdate project rate limit
- GETList project service accounts
- POSTCreate project service account
- GETRetrieve project service account
- DELDelete project service account
- GETReturn project users
- POSTCreate project user
- GETRetrieve project user
- POSTModify project user
- DELDelete project user
Responses
Vector stores
- GETReturns a list of vector stores.
- POSTCreate a vector store.
- GETRetrieves a vector store.
- POSTModifies a vector store.
- DELDelete a vector store.
- POSTCreate a vector store file batch.
- GETRetrieves a vector store file batch.
- POSTCancel vector store file batch
- GETReturns a list of vector store files in a batch.
- GETReturns a list of vector store files.
- POSTCreate vector store file
- GETRetrieves a vector store file.
- POSTUpdate attributes on a vector store file.
- DELDelete vector store file
- GETRetrieve vector store
- POSTSearch vector store
Moderations
Create moderation
Classifies if text and/or image inputs are potentially harmful. Learn more in the moderation guide.
POST
/
moderations
Copy
Ask AI
curl --request POST \
--url https://api.openai.com/v1/moderations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"input": "I want to kill them.",
"model": "omni-moderation-2024-09-26"
}'
Copy
Ask AI
{
"id": "<string>",
"model": "<string>",
"results": [
{
"flagged": true,
"categories": {
"hate": true,
"hate/threatening": true,
"harassment": true,
"harassment/threatening": true,
"illicit": true,
"illicit/violent": true,
"self-harm": true,
"self-harm/intent": true,
"self-harm/instructions": true,
"sexual": true,
"sexual/minors": true,
"violence": true,
"violence/graphic": true
},
"category_scores": {
"hate": 123,
"hate/threatening": 123,
"harassment": 123,
"harassment/threatening": 123,
"illicit": 123,
"illicit/violent": 123,
"self-harm": 123,
"self-harm/intent": 123,
"self-harm/instructions": 123,
"sexual": 123,
"sexual/minors": 123,
"violence": 123,
"violence/graphic": 123
},
"category_applied_input_types": {
"hate": [
"text"
],
"hate/threatening": [
"text"
],
"harassment": [
"text"
],
"harassment/threatening": [
"text"
],
"illicit": [
"text"
],
"illicit/violent": [
"text"
],
"self-harm": [
"text"
],
"self-harm/intent": [
"text"
],
"self-harm/instructions": [
"text"
],
"sexual": [
"text"
],
"sexual/minors": [
"text"
],
"violence": [
"text"
],
"violence/graphic": [
"text"
]
}
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200 - application/json
OK
Represents if a given text input is potentially harmful.
Was this page helpful?
Copy
Ask AI
curl --request POST \
--url https://api.openai.com/v1/moderations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"input": "I want to kill them.",
"model": "omni-moderation-2024-09-26"
}'
Copy
Ask AI
{
"id": "<string>",
"model": "<string>",
"results": [
{
"flagged": true,
"categories": {
"hate": true,
"hate/threatening": true,
"harassment": true,
"harassment/threatening": true,
"illicit": true,
"illicit/violent": true,
"self-harm": true,
"self-harm/intent": true,
"self-harm/instructions": true,
"sexual": true,
"sexual/minors": true,
"violence": true,
"violence/graphic": true
},
"category_scores": {
"hate": 123,
"hate/threatening": 123,
"harassment": 123,
"harassment/threatening": 123,
"illicit": 123,
"illicit/violent": 123,
"self-harm": 123,
"self-harm/intent": 123,
"self-harm/instructions": 123,
"sexual": 123,
"sexual/minors": 123,
"violence": 123,
"violence/graphic": 123
},
"category_applied_input_types": {
"hate": [
"text"
],
"hate/threatening": [
"text"
],
"harassment": [
"text"
],
"harassment/threatening": [
"text"
],
"illicit": [
"text"
],
"illicit/violent": [
"text"
],
"self-harm": [
"text"
],
"self-harm/intent": [
"text"
],
"self-harm/instructions": [
"text"
],
"sexual": [
"text"
],
"sexual/minors": [
"text"
],
"violence": [
"text"
],
"violence/graphic": [
"text"
]
}
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.