Chuyển tới nội dung chính

Gui yeu cau

Token API

Replace YOUR_API_KEY with a token generated in the AIZN-API console (sk-xxx).

Yeu cau dau tien

curl https://api.aizn.com/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"temperature": 0.7
}'

Vi du phan hoi

{
"id": "chatcmpl-AFNKwYwdb3KmPV3MT7yT0TBylkuH5",
"object": "chat.completion",
"created": 1728227990,
"model": "gpt-4o-2024-08-06",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "This is a test!"
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 5,
"total_tokens": 18
},
"system_fingerprint": "fp_67802d9a6d"
}

Doc tiep

Nguon