Sohbetler için OpenAI Responses API kullanın. Responses API, daha esnek girdi sunan en yeni OpenAI API formatıdır.
/api/ai/v1/responsesBearer YOUR_API_KEY| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
model | string | Zorunlu | Model adı, örn. deepseek-v4.1-flash, qwen3.8-max |
input | string | Zorunlu | Girdi metni veya sohbet içeriği |
max_tokens | integer | İsteğe bağlı | Maksimum çıktı token sayısı |
temperature | float | İsteğe bağlı | Örnekleme sıcaklığı, rastgeleliği kontrol eder (0-2) |
stream | boolean | İsteğe bağlı | Akış yanıtını etkinleştirin, SSE için true olarak ayarlayın |
| Parametre | Tip | Açıklama |
|---|---|---|
id | string | Benzersiz yanıt tanımlayıcısı |
model | string | Kullanılan gerçek model |
output | string | Oluşturulan metin çıktısı |
usage | object | prompt_tokens, completion_tokens, total_tokens dahil token kullanım istatistikleri |
curl --location 'https://your-domain.com/api/ai/v1/responses' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"model": "deepseek-v4.1-flash",
"input": "Hello, who are you?",
"max_tokens": 1000,
"temperature": 0.7
}'import requests
response = requests.post(
"https://your-domain.com/api/ai/v1/responses",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
},
json={
"model": "deepseek-v4.1-flash",
"input": "Hello, who are you?",
"max_tokens": 1000,
"temperature": 0.7
}
)
print(response.json())curl --location 'https://your-domain.com/api/ai/v1/responses' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"model": "deepseek-v4.1-flash",
"input": "Hello",
"max_tokens": 1000,
"stream": true
}'