curl --location --request POST 'https://llm-api.mmchat.xyz/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer METACHAT_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4.1-mini",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}'
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "\n\nHello there, how may I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}