Tạo chat completion
Tạo chat completion. Tương thích hoàn toàn với OpenAI Chat Completions API.
Authentication
AuthorizationBearer
API key làm bearer token. Tạo API key tại Console.
Request
This endpoint expects an object.
model
Model ID (ví dụ: gemini-3.5-flash, deepseek-v4-flash)
messages
Danh sách messages
stream
Bật streaming (SSE)
temperature
Sampling temperature (0–2)
max_tokens
Số token tối đa trong response
top_p
Nucleus sampling
stop
Stop sequences
tools
Danh sách tools cho function calling
response_format
Format response (JSON mode)
Response
Thành công
id
object
choices
usage
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
