Skip to main content

Chats

SDK methods for the Chats module, accessed via soat.chats. See the Chats module docs for permissions and data model, and each method's REST page for the full request/response schema.

soat.chats.createChat()

Create a chat

  • Method: POST
  • Path: /api/v1/chats
await soat.chats.createChat({
body: { ai_provider_id, /* + optional */ },
});

Request & response schema

soat.chats.listChats()

List chats

  • Method: GET
  • Path: /api/v1/chats
await soat.chats.listChats({
query: { /* + optional */ },
});

Request & response schema

soat.chats.getChat()

Get a chat

  • Method: GET
  • Path: /api/v1/chats/{chat_id}
await soat.chats.getChat({
path: { chat_id },
});

Request & response schema

soat.chats.deleteChat()

Delete a chat

  • Method: DELETE
  • Path: /api/v1/chats/{chat_id}
await soat.chats.deleteChat({
path: { chat_id },
});

Request & response schema

soat.chats.createChatCompletionForChat()

Create a chat completion for a stored chat

  • Method: POST
  • Path: /api/v1/chats/{chat_id}/completions
await soat.chats.createChatCompletionForChat({
path: { chat_id },
body: { messages, /* + optional */ },
});

Request & response schema

soat.chats.createChatCompletion()

Create a chat completion (stateless)

  • Method: POST
  • Path: /api/v1/chat/completions
await soat.chats.createChatCompletion({
body: { ai_provider_id, messages, /* + optional */ },
});

Request & response schema