Conversations
/v1/conversations· 크로스 디바이스 대화 동기화(chat 사이트 사용)
경량 대화 클라우드 동기화 API입니다. 대화 제목, 메시지 배열, 임의의 클라이언트 메타데이터를 저장합니다. 모델 API가 아니며 생성 과금이 발생하지 않고, 대화 내용은 소유한 사용자만 볼 수 있습니다.
객체#
{
"id": "0f3c2f3a-8a0e-4c1e-9f0a-2b7c9d1e4a11",
"user_id": 24,
"title": "关于向量数据库",
"messages": [
{
"role": "user",
"content": "什么是向量数据库?",
"timestamp": "2026-11-19T02:00:00Z",
"id": "msg_local_1",
"reasoning": "",
"sources": []
}
],
"metadata": {"model": "nexith-core"},
"created_at": "2026-11-19T02:00:00Z",
"updated_at": "2026-11-19T02:05:00Z"
}messages[].extra의 클라이언트 추가 필드(메시지 id, 추론, 인용, 산출물…)는 그대로 저장되고 반환되며
서버는 해석하지 않습니다.
GET /v1/conversations#
현재 사용자의 대화를 updated_at 내림차순으로 최대 100개까지 나열합니다.
{"data": [ /* Conversation */ ], "total": 1}POST /v1/conversations#
{
"title": "新会话",
"messages": [],
"metadata": {"model": "nexith-core"}
}생성된 전체 객체를 반환합니다.
GET /v1/conversations/:id#
단일 대화를 반환하며, 현재 사용자 소유가 아니면 404 not_found를 반환합니다.
PATCH /v1/conversations/:id#
업데이트 가능한 필드(모두 선택): title, messages, metadata.
{"title": "改名后的标题"}DELETE /v1/conversations/:id#
성공 시 204 No Content, 존재하지 않으면 404를 반환합니다.
인증과 오류#
- 인증이 필요하며(JWT 또는
nx-Key),user_id별로 격리됩니다. - 통일된 오류 형식은 오류와 속도 제한을 참고하세요.