API ReferenceAudio & Others
Content moderation
Check whether text content violates the usage policy.
Authorization
bearerAuth AuthorizationBearer <token>
Authenticate using an Authorization Bearer API Key.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/moderations" \ -H "Content-Type: application/json" \ -d '{ "input": "string" }'{
"id": "string",
"model": "string",
"results": [
{
"flagged": true,
"categories": {},
"category_scores": {}
}
]
}Document reranking.
Rerank a list of documents by relevance to a query.
Realtime WebSocket connection
Establish a WebSocket connection for realtime conversations. **Note**: This is a WebSocket endpoint and must be connected using the WebSocket protocol. Example connection URL: `wss://api.example.com/v1/realtime?model=gpt-4o-realtime`