vetsgpt

Create a VetsGPT chat

Creates an empty VetsGPT chat owned by the calling user, optionally with consultation and patient context. Create a chat first when the first message carries file attachments, because upload URLs are issued per chat. Not idempotent: each call creates a new chat.

post/workspaces/{workspaceId}/vetsgpt/chats

Request

  • Base URL
    https://vetnio.com/api/v2
  • URL
    https://vetnio.com/api/v2/workspaces/{workspaceId}/vetsgpt/chats
  • Auth
    HTTP bearer

Path parameters

workspaceIdstring required

Identifier of the workspace (clinic). The caller must be a member, and VetsGPT must be enabled for them in this workspace.

Example:furunculotic-loud-chihuahua

Request body

titlestring

Initial title. Defaults to New Chat <date>. VetsGPT replaces it with a generated title after the first message on a topic unless you set it later with the update endpoint.

consultationIdsstring[]

Consultations to attach as context (up to 50). Each must be readable by the caller, otherwise 404 (the chat is still created).

patientIdstring

Patient to attach as context. Used only while no consultations are attached. Not validated; an unknown id gives no context.

Example request

{
  "title": "Bella - post-op follow-up",
  "consultationIds": [
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  ],
  "patientId": "f2a3b4c5-d6e7-4890-fabc-012345678901"
}

Response

The created VetsGPT chat.

chat_idstring required

Chat id (UUID). Use it as chatId in the other VetsGPT endpoints.

user_idstring required

Id of the Vetnio user who owns the chat, i.e. the caller.

workspace_idstring required

Workspace the chat belongs to.

titlestring required

Chat title. Without a supplied title the server stores New Chat <date> (date in the server's locale format). Either way, a short generated title replaces it in the background after the first message on a topic, unless the title is set with the update endpoint first.

created_atstring required

When the chat was created (ISO-8601 UTC).

last_updated_atstring required

When the chat last changed (ISO-8601 UTC).

searchable_contentstring

Plain-text log of message text (questions, extracted file text and most answers) that the list endpoint's search matches against. Not intended for display. Absent on a new chat.

Example response

{
  "chat_id": "3f9c2a71-5b8e-4d1a-9c47-0e6b2d8f1a53",
  "user_id": "6c1d2e3f-4a5b-4c7d-8e9f-0a1b2c3d4e5f",
  "workspace_id": "furunculotic-loud-chihuahua",
  "title": "NSAID dosing in a dog with CKD",
  "created_at": "2026-10-04T09:12:31.000Z",
  "last_updated_at": "2026-10-04T09:12:31.000Z",
  "messages": [
    {
      "message_id": "rest-assistant-message-9d2e7c1b4a6f8e0d3c5b7a9f1e2d4c6b",
      "timestamp": "2026-10-04T09:12:58.000Z",
      "type": "bot_message",
      "content": {
        "text": "What is the meloxicam dose for a 24 kg dog?",
        "attachments": [
          "data:application/pdf;name=bloodwork.pdf;base64,JVBERi0xLjcK..."
        ]
      },
      "feedback": "positive",
      "copilotProposals": [
        {
          "proposalId": "cp_7f3a9c21",
          "tool": "edit_clinical_note",
          "target": "clinical_note",
          "summary": "Add the meloxicam dose to the treatment plan",
          "source": "consultation",
          "mode": "manual",
          "baseHash": "9b1e4c7a",
          "status": "accepted"
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.