You can paste the command below into your terminal to run your first API request. Make sure to replace YOUR_API_KEY with your secret API key.curl https://crazyrouter.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d "{\"model\": \"gpt-5.2\", \"messages\": [{\"role\": \"user\", \"content\": \"Say this is a test!\"}], \"temperature\": 0.7}"
This request queries the gpt-5.2 model to complete text starting with the prompt "Say this is a test". You should receive a response similar to the following:{
"id": "foaicmpl-f835557f-2759-4090-8d17-66b48ddea702",
"object": "chat.completion",
"created": 1768904876,
"model": "gpt-5.2",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "This is a test!"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 2104,
"completion_tokens": 9,
"total_tokens": 2113,
"prompt_tokens_details": {
"cached_tokens": 1920
}
}
}
Now you have generated your first chat completion. We can see that finish_reason is stop, which means the API returned the complete completion generated by the model. In the request above, we only generated one message, but you can set the n parameter to generate multiple message choices. In this example, gpt-5.2 is more suited for traditional text completion tasks. This model is also optimized for chat applications. Modified at 2026-01-20 10:42:09