curl --location --request POST 'https://barrack.ai/api/ai/chat/completions' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "openai/gpt-oss-120b",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is machine learning?"
}
],
"stream": false
}'{
"id": "chatcmpl-abc123def456",
"object": "chat.completion",
"created": 1702234567,
"model": "openai/gpt-oss-120b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Machine learning is a subset of artificial intelligence that enables computers to learn from data without explicit programming. It uses algorithms to identify patterns and make decisions based on experience."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 42,
"total_tokens": 67
}
}