{
"model": "gpt-4-turbo",
"response_format": {
"type": "json_object"
},
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to output JSON."
},
{
"role": "user",
"content": "Who won the world series in 2020?"
}
]
}
curl --location --request POST 'https://api.b3n.fun/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4-turbo",
"response_format": {
"type": "json_object"
},
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to output JSON."
},
{
"role": "user",
"content": "Who won the world series in 2020?"
}
]
}'
{
"id": "chatcmpl-9CoIrwUi3NLNsc2euP2XK5qOtu9M0",
"object": "chat.completion",
"created": 1712840329,
"model": "gpt-4-turbo-2024-04-09",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "{\n \"event\": \"World Series\",\n \"year\": 2020,\n \"winner\": \"Los Angeles Dodgers\"\n}"
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 31,
"completion_tokens": 27,
"total_tokens": 58
},
"system_fingerprint": "fp_6fcb0929db"
}