{
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "string",
"name": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
],
"tool_call_id": "string",
"reasoning_content": "string"
}
],
"temperature": 1,
"top_p": 1,
"n": 1,
"stream": false,
"stream_options": {
"include_usage": true
},
"stop": "string",
"max_tokens": 0,
"max_completion_tokens": 0,
"presence_penalty": 0,
"frequency_penalty": 0,
"logit_bias": {
"property1": 0,
"property2": 0
},
"user": "string",
"tools": [
{
"type": "function",
"function": {
"name": "string",
"description": "string",
"parameters": {}
}
}
],
"tool_choice": "none",
"response_format": {
"type": "text",
"json_schema": {}
},
"seed": 0,
"reasoning_effort": "low",
"modalities": [
"text"
],
"audio": {
"voice": "string",
"format": "string"
}
}curl --location -g --request POST 'http://api.example.com/v1/chat/completions' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "string",
"name": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
],
"tool_call_id": "string",
"reasoning_content": "string"
}
],
"temperature": 1,
"top_p": 1,
"n": 1,
"stream": false,
"stream_options": {
"include_usage": true
},
"stop": "string",
"max_tokens": 0,
"max_completion_tokens": 0,
"presence_penalty": 0,
"frequency_penalty": 0,
"logit_bias": {
"property1": 0,
"property2": 0
},
"user": "string",
"tools": [
{
"type": "function",
"function": {
"name": "string",
"description": "string",
"parameters": {}
}
}
],
"tool_choice": "none",
"response_format": {
"type": "text",
"json_schema": {}
},
"seed": 0,
"reasoning_effort": "low",
"modalities": [
"text"
],
"audio": {
"voice": "string",
"format": "string"
}
}'{
"id": "string",
"object": "chat.completion",
"created": 0,
"model": "string",
"choices": [
{
"index": 0,
"message": {
"role": "system",
"content": "string",
"name": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
],
"tool_call_id": "string",
"reasoning_content": "string"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 0,
"audio_tokens": 0,
"image_tokens": 0
},
"completion_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0
}
},
"system_fingerprint": "string"
}