Chat Completions
Create a completion for the chat conversation
post/v1/chat/completions
Request body
Example request
{
"model": "gpt-5",
"messages": [
{
"role": "user",
"content": "Hello!",
"tool_calls": [
{
"id": "call_abc123",
"type": "function",
"function": {
"name": "get_current_weather",
"arguments": "{\"location\": \"Boston, MA\"}"
}
}
]
}
],
"temperature": 0.7,
"max_tokens": 1000,
"top_p": 0.9,
"response_format": {
"type": "json_object"
},
"n": 1,
"prompt_cache_key": "tenant-123",
"prompt_cache_retention": "24h",
"prompt_cache_options": {
"mode": "explicit"
},
"user": "user-123",
"reasoning_effort": "medium",
"reasoning": {
"effort": "medium",
"max_tokens": 4000,
"context": "current_turn"
},
"effort": "medium",
"verbosity": "low",
"service_tier": "flex",
"routing": "price",
"web_search": true,
"plugins": [
{
"id": "response-healing"
}
]
}Response
User response object or streaming response.
Changes
No recorded changes to this endpoint across all 1 revision of this API.