All endpoints are accessed through the current site domain (proxied). The domain in the examples below is generated dynamically by the page — no manual replacement needed.
echo exaiv.com;; *) echo https://exaiv.com;; esac)Auth: send an Authorization: Bearer YOUR_API_KEY header; for sub-sites also send x-site-id (credits are isolated per site)..
Sử dụng OpenAI Responses API cho hội thoại. Responses API là định dạng API OpenAI mới nhất với đầu vào linh hoạt hơn.
Bearer YOUR_API_KEY| Tham số | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
| model | string | Bắt buộc | Tên model, ví dụ deepseek-v4.1-flash, qwen3.8-max |
| input | string | Bắt buộc | Văn bản đầu vào hoặc nội dung hội thoại |
| max_tokens | integer | Tùy chọn | Số token đầu ra tối đa |
| temperature | float | Tùy chọn | Nhiệt độ sampling, kiểm soát độ ngẫu nhiên (0-2) |
| stream | boolean | Tùy chọn | Bật phản hồi streaming, đặt true cho SSE |
| Tham số | Kiểu | Mô tả |
|---|---|---|
| id | string | Định danh phản hồi duy nhất |
| model | string | Model thực tế được sử dụng |
| output | string | Văn bản đầu ra được tạo |
| usage | object | Thống kê sử dụng token, bao gồm prompt_tokens, completion_tokens, total_tokens |
curl echo exaiv.com;; *) echo https://exaiv.com;; esac)/api/ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "deepseek-v4.1-flash",
"input": "Hello, who are you?",
"max_tokens": 1000
}'