İçeriğe geç

Chat

POST /v1/chat/completions

LLM ve vision modelleri için chat completions kullanılır. stream: true ile SSE streaming desteklenir.

{
"model": "gemini-3-flash",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "2+2 kaçtır?"}
],
"temperature": 0.7,
"max_tokens": 1024,
"stream": false
}
AlanTipZorunluAçıklama
modelstringevetModel ID
messagesarrayevetSohbet mesajları
temperaturenumberhayırSampling sıcaklığı
max_tokensintegerhayırMaksimum çıktı token
streambooleanhayırSSE streaming
toolsarrayhayırFunction calling araçları
response_formatobjecthayırJSON modu
thinkbooleanhayırDesteklenen modellerde reasoning modu
{
"model": "gemini-3-flash",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Bu görseli açıkla."},
{"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}
]
}
]
}