5.3. API Endpoints | Twin AI Docs

5.3. API Endpoints

Danh sách đầy đủ các endpoints có sẵn

GET /api/v1/twins Chỉ đọc

Lấy danh sách Twins có thể truy cập

Parameters

page integer Số trang (1-based)

limit integer Số items mỗi trang (max 100)

GET /api/v1/twins/{id} Chỉ đọc

Lấy thông tin chi tiết twin

Parameters

id string required ID của twin

POST /api/v1/twins/{id} Toàn quyền

Tạo cuộc trò chuyện mới

Parameters

twinId string required ID của twin

title string Tiêu đề cuộc trò chuyện

GET /api/v1/conversations Chỉ đọc

Lấy danh sách cuộc trò chuyện

Parameters

page integer Số trang

limit integer Số items mỗi trang

twinId string Lọc theo twin ID

POST /api/v1/conversations/{id}/messages Toàn quyền

Gửi tin nhắn

Parameters

id string required ID cuộc trò chuyện

content string required Nội dung tin nhắn

POST /api/v1/conversations/{id}/messages/stream Toàn quyền

Gửi tin nhắn với phản hồi streaming

Parameters

id string required ID cuộc trò chuyện

content string required Nội dung tin nhắn

Last updated