https://api.f5ai.ru
https://api.f5ai.ru/v2/chat/completions
POST /v2/chat/completions
curl https://api.f5ai.ru/v2/chat/completions \
-H "X-Auth-Token: eyJ0************_lew" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Привет! Что ты умеешь?"}]
}'
{
"message": {
"role": "assistant",
"content": "Привет! Я могу отвечать на вопросы, писать тексты и помогать с задачами."
}
}
import requests
url = "https://api.f5ai.ru/v2/chat/completions"
headers = {
"X-Auth-Token: eyJ0************_lew",
"Content-Type": "application/json"
}
data = {
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Объясни квантовую запутанность"}]
}
response = requests.post(url, headers=headers, json=data)
print(response.json()["message"]["content"])