Skip to content

Summaries

Generate summaries from a Desktop Services session or from text entered directly by the user. Session summaries are asynchronous and remain attached to the session. Text summaries complete in the request and are not attached to a session.

Internal API

The Desktop API is internal and must not be used for customer integrations. Compatibility is not guaranteed, and these endpoints may change without notice.

Method Endpoint Description
POST /api/v1/desktop-services/sessions/{sessionId}/summaries Create a Session Summary
GET /api/v1/desktop-services/sessions/{sessionId}/summaries List Session Summaries
GET /api/v1/desktop-services/sessions/{sessionId}/summaries/latest Get the Latest Summary
GET /api/v1/desktop-services/sessions/{sessionId}/summaries/{summaryId} Get a Summary
POST /api/v1/desktop-services/summary-status-queries Query Summary Statuses
POST /api/v1/desktop-services/text-summaries Summarize Entered Text
GET /api/v1/desktop-services/summary-context-plugins List Context Plugins

Use List Assigned Templates to discover a prompt template UUID. Use List Context Plugins before sending optional context fields.


List Context Plugins

GET /api/v1/desktop-services/summary-context-plugins

Requires Authentication - Scopes: desktop:app:use

Return the supported context fields. Build additionalContext from the inputFields descriptors. The outputFields descriptors identify information that may appear in a summary's context audit.

curl https://koldan.dixilang.com/api/v1/desktop-services/summary-context-plugins \
  -H "Authorization: Bearer $ACCESS_TOKEN"
import requests

response = requests.get(
    "https://koldan.dixilang.com/api/v1/desktop-services/summary-context-plugins",
    headers={"Authorization": f"Bearer {ACCESS_TOKEN}"},
)
response.raise_for_status()
print(response.json())
DesktopSummaryContextPluginListResponse
Field Type Nullable Description
items SummaryContextPlugin[] No Supported context plugins. Default: empty array.
DesktopSummaryContextPluginListResponse
{
  "items": [
    {
      "pluginId": "clinical-context",
      "displayName": "Clinical context",
      "description": "Adds clinical context to a summary",
      "inputFields": [
        {
          "key": "patient_id",
          "displayName": "Patient ID",
          "description": "Patient identifier used for enrichment",
          "required": true,
          "defaultValue": null,
          "type": "STRING",
          "displayPolicy": "VISIBLE"
        }
      ],
      "outputFields": []
    }
  ]
}
Status Description
200 OK Catalog returned.
401 Unauthorized Access token is missing or invalid.
403 Forbidden Token does not include desktop:app:use.

Supplying Additional Context

Session-summary and text-summary requests accept an additionalContext JSON object whose property names match inputFields[].key. All values are JSON strings, including values described as integers or booleans.

additionalContext
{
  "patient_id": "123456",
  "visit_number": "3",
  "include_history": "true"
}
  • Supply no more than 32 fields.
  • Each value may contain at most 8,192 bytes when encoded as UTF-8.
  • Keys are case-sensitive, must be non-blank, and must be declared as input fields. transcript and transcription are reserved.
  • Values must not be null.
  • Output-field keys cannot be supplied.
  • INTEGER values must be valid signed whole numbers without surrounding whitespace.
  • BOOLEAN values accept true or false without case sensitivity.
  • For an active context source, omitted fields use defaultValue when defined; otherwise its fields marked required must be supplied.
  • If items is empty, omit additionalContext; supplied values have no effect.

Invalid context returns 400 Bad Request from the summary operation.


Create a Session Summary

POST /api/v1/desktop-services/sessions/{sessionId}/summaries

Requires Authentication - Scopes: desktop:app:use

Start summary generation for one owned session. The session must satisfy the installation's minimum transcript length. Only one REQUESTED summary can run for the same session and prompt template at a time.

Path Parameters
Parameter Type Required Description
sessionId string (UUID) Yes Session to summarize.
DesktopSummaryCreateRequest
Field Type Required Description
promptTemplateId string (UUID) Yes Prompt template available to the current user.
additionalContext object<string, string> No Context fields declared by the context catalog. Default: empty object. Maximum: 32 fields and 8,192 UTF-8 bytes per value.
DesktopSummaryCreateRequest
{
  "promptTemplateId": "ea97bc12-b521-4b22-8f86-7b60b36ac529",
  "additionalContext": {
    "patient_id": "123456"
  }
}
curl -X POST https://koldan.dixilang.com/api/v1/desktop-services/sessions/3f13e99a-5f5c-4b50-bf02-f9fb45d74cd2/summaries \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "promptTemplateId": "ea97bc12-b521-4b22-8f86-7b60b36ac529",
    "additionalContext": {"patient_id": "123456"}
  }'
import requests

session_id = "3f13e99a-5f5c-4b50-bf02-f9fb45d74cd2"
response = requests.post(
    f"https://koldan.dixilang.com/api/v1/desktop-services/sessions/{session_id}/summaries",
    headers={"Authorization": f"Bearer {ACCESS_TOKEN}"},
    json={
        "promptTemplateId": "ea97bc12-b521-4b22-8f86-7b60b36ac529",
        "additionalContext": {"patient_id": "123456"},
    },
)
response.raise_for_status()
print(response.headers["Location"])
print(response.json())
DesktopSummary

The response includes a Location header containing the new summary URL. Poll that URL or use Query Summary Statuses until the status is COMPLETED or FAILED.

Status Description
202 Accepted Summary request created.
400 Bad Request Template, transcript length, or additional context is invalid.
401 Unauthorized Access token is missing or invalid.
403 Forbidden Scope is missing or session summaries are unavailable.
404 Not Found Session or prompt template was not found for the current user.
409 Conflict A summary using the same template is already running for this session.

List Session Summaries

GET /api/v1/desktop-services/sessions/{sessionId}/summaries

Requires Authentication - Scopes: desktop:app:use

Return summaries for one owned session, ordered newest first.

Path and Query Parameters
Parameter Type Required Default Description
sessionId string (UUID) Yes - Session identifier. (path)
promptTemplateId string (UUID) No - Return only requests created with this prompt template. (query)
latestPerPromptTemplate boolean No false Return only the newest request for each prompt template. Ignored when promptTemplateId is supplied. (query)
curl "https://koldan.dixilang.com/api/v1/desktop-services/sessions/3f13e99a-5f5c-4b50-bf02-f9fb45d74cd2/summaries?latestPerPromptTemplate=true" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
DesktopSummaryListResponse
Field Type Nullable Description
items DesktopSummary[] No Matching summaries, newest first. Default: empty array.
DesktopSummaryListResponse
{
  "items": [
    { "...": "..." }
  ]
}
Status Description
200 OK Summaries returned.
400 Bad Request A query parameter is malformed.
401 Unauthorized Access token is missing or invalid.
403 Forbidden Scope is missing or session history is unavailable.
404 Not Found Session was not found for the current user.
500 Internal Server Error A completed summary result could not be read.

Get the Latest Summary

GET /api/v1/desktop-services/sessions/{sessionId}/summaries/latest

Requires Authentication - Scopes: desktop:app:use

Return the most recently created summary request for the session, regardless of prompt template or status.

Path Parameters
Parameter Type Required Description
sessionId string (UUID) Yes Session identifier.
curl https://koldan.dixilang.com/api/v1/desktop-services/sessions/3f13e99a-5f5c-4b50-bf02-f9fb45d74cd2/summaries/latest \
  -H "Authorization: Bearer $ACCESS_TOKEN"
DesktopSummary
Status Description
200 OK Latest summary returned.
401 Unauthorized Access token is missing or invalid.
403 Forbidden Scope is missing or session history is unavailable.
404 Not Found Session was not found or has no summary requests.
500 Internal Server Error The completed summary result could not be read.

Get a Summary

GET /api/v1/desktop-services/sessions/{sessionId}/summaries/{summaryId}

Requires Authentication - Scopes: desktop:app:use

Return one summary request and its result when complete.

Path Parameters
Parameter Type Required Description
sessionId string (UUID) Yes Session identifier.
summaryId string (UUID) Yes Summary request identifier.
curl https://koldan.dixilang.com/api/v1/desktop-services/sessions/3f13e99a-5f5c-4b50-bf02-f9fb45d74cd2/summaries/8ac77882-61bf-445c-b464-27dfb06f7808 \
  -H "Authorization: Bearer $ACCESS_TOKEN"
DesktopSummary
Status Description
200 OK Summary returned.
401 Unauthorized Access token is missing or invalid.
403 Forbidden Scope is missing or session history is unavailable.
404 Not Found Session or summary was not found for the current user.
500 Internal Server Error The completed summary result could not be read.

Query Summary Statuses

POST /api/v1/desktop-services/summary-status-queries

Requires Authentication - Scopes: desktop:app:use

Query compact summary status information for as many as 100 sessions in one request. The response contains one entry for every requested session. An unknown or inaccessible session produces an empty summaries array.

DesktopSummaryStatusQueryRequest
Field Type Required Description
sessions DesktopSessionSummaryStatusQuery[] Yes Session queries. Maximum: 100. Entries must not be null; an empty array is allowed.
DesktopSessionSummaryStatusQuery
Field Type Required Description
sessionId string (UUID) Yes Session identifier.
summaryIds string (UUID)[] No Specific summary requests to return. Maximum: 100 non-null UUIDs; unknown or inaccessible IDs are omitted. Omit, send null, or send an empty array to return the latest request for each prompt template. Default: empty array.
DesktopSummaryStatusQueryRequest
{
  "sessions": [
    {
      "sessionId": "3f13e99a-5f5c-4b50-bf02-f9fb45d74cd2",
      "summaryIds": ["8ac77882-61bf-445c-b464-27dfb06f7808"]
    }
  ]
}
curl -X POST https://koldan.dixilang.com/api/v1/desktop-services/summary-status-queries \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sessions": [{
      "sessionId": "3f13e99a-5f5c-4b50-bf02-f9fb45d74cd2",
      "summaryIds": ["8ac77882-61bf-445c-b464-27dfb06f7808"]
    }]
  }'
DesktopSummaryStatusQueryResponse
Field Type Nullable Description
sessions DesktopSessionSummaryStatuses[] No Status results in request order. Default: empty array.
DesktopSessionSummaryStatuses
Field Type Nullable Description
sessionId string (UUID) No Requested session identifier.
summaries DesktopSummaryStatus[] No Matching summary statuses. Default: empty array.
DesktopSummaryStatus
Field Type Nullable Description
id string (UUID) No Summary request identifier.
status string enum No One of: REQUESTED, COMPLETED, FAILED.
error string Yes Failure detail when status is FAILED; otherwise null.
DesktopSummaryStatusQueryResponse
{
  "sessions": [
    {
      "sessionId": "3f13e99a-5f5c-4b50-bf02-f9fb45d74cd2",
      "summaries": [
        {
          "id": "8ac77882-61bf-445c-b464-27dfb06f7808",
          "status": "COMPLETED",
          "error": null
        }
      ]
    }
  ]
}
Status Description
200 OK Status results returned.
400 Bad Request Body is malformed, a required value or UUID is invalid, more than 100 sessions were supplied, or one session contains more than 100 summary IDs.
401 Unauthorized Access token is missing or invalid.
403 Forbidden Scope is missing or session history is unavailable.

Summarize Entered Text

POST /api/v1/desktop-services/text-summaries

Requires Authentication - Scopes: desktop:app:use

Run a prompt template against manually entered text. The request waits for completion and returns the generated result. Set autoRemove to request immediate removal after processing; otherwise the installation's retention policy applies.

DesktopTextSummaryRequest
Field Type Required Description
promptTemplateId string (UUID) Yes Prompt template available to the current user.
inputText string Yes Non-blank source text. Maximum: 1,000,000 characters.
title string No Optional request title. Maximum: 255 characters. Default: unset.
additionalContext object<string, string> No Context fields declared by the context catalog. Default: empty object. Maximum: 32 fields and 8,192 UTF-8 bytes per value.
autoRemove boolean No When true, request removal of the input, output, and retained context immediately after processing. Default: false; the installation's retention policy applies.
DesktopTextSummaryRequest
{
  "promptTemplateId": "ea97bc12-b521-4b22-8f86-7b60b36ac529",
  "inputText": "The patient reports improved mobility and no new pain.",
  "title": "Follow-up note",
  "additionalContext": {
    "patient_id": "123456"
  },
  "autoRemove": false
}
curl -X POST https://koldan.dixilang.com/api/v1/desktop-services/text-summaries \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "promptTemplateId": "ea97bc12-b521-4b22-8f86-7b60b36ac529",
    "inputText": "The patient reports improved mobility and no new pain.",
    "title": "Follow-up note",
    "additionalContext": {"patient_id": "123456"},
    "autoRemove": false
  }'
DesktopTextSummaryResponse
Field Type Nullable Description
id string (UUID) No Text-summary request identifier.
result string No Generated summary text.
contextAudit SummaryContextAudit No Safe context-enrichment status and displayable values.
DesktopTextSummaryResponse
{
  "id": "5c6cdcc3-373f-4ef2-a828-0e731de63f7a",
  "result": "Mobility has improved, with no new pain reported.",
  "contextAudit": { "...": "..." }
}
Status Description
200 OK Summary completed and returned.
400 Bad Request Text, title, template, or additional context is invalid.
401 Unauthorized Access token is missing or invalid.
403 Forbidden Scope is missing or text summaries are unavailable.
404 Not Found No Desktop profile or available prompt template was found.
408 Request Timeout Generation was cancelled before completion.
500 Internal Server Error Summary generation failed.

Data Models

DesktopSummary

Field Type Nullable Description
sessionId string (UUID) No Session being summarized.
id string (UUID) No Summary request identifier.
promptTemplate DesktopSummaryPromptTemplateSnapshotResponse No Template and exact version used for this request.
status string enum No One of: REQUESTED, COMPLETED, FAILED. Initial value: REQUESTED.
createdAt string (ISO 8601) No Creation time.
updatedAt string (ISO 8601) No Most recent status update time.
result string Yes Generated summary when status is COMPLETED; otherwise null.
error string Yes Failure detail when status is FAILED; otherwise null.
contextAudit SummaryContextAudit No Safe context-enrichment status and displayable values.
DesktopSummary
{
  "sessionId": "3f13e99a-5f5c-4b50-bf02-f9fb45d74cd2",
  "id": "8ac77882-61bf-445c-b464-27dfb06f7808",
  "promptTemplate": { "...": "..." },
  "status": "COMPLETED",
  "createdAt": "2026-09-26T08:14:00Z",
  "updatedAt": "2026-09-26T08:14:08Z",
  "result": "The consultation covered current symptoms and next steps.",
  "error": null,
  "contextAudit": { "...": "..." }
}

DesktopSummaryPromptTemplateSnapshotResponse

Field Type Nullable Description
id string (UUID) No Stable prompt template identifier.
name string No Template display name.
description string No Template description.
versionId string (UUID) No Immutable template version used for this request.

SummaryContextPlugin

Field Type Nullable Description
pluginId string No Stable identifier.
displayName string Yes User-facing name.
description string Yes User-facing description.
inputFields SummaryContextField[] No Fields accepted in additionalContext. Default: empty array.
outputFields SummaryContextField[] No Fields that may be represented in context audit data. Default: empty array.

SummaryContextField

Field Type Nullable Description
key string No JSON property name.
displayName string Yes User-facing field name.
description string Yes User-facing field description.
required boolean No Whether the field is required when its context source is active and no default is available. Default: false.
defaultValue string Yes Value applied when the context source is active and the field is omitted. null or an empty value means no default.
type string enum No STRING, INTEGER, BOOLEAN, or UNKNOWN. Request values are always JSON strings.
displayPolicy string enum No VISIBLE, STATUS, or HIDDEN. Default when unspecified: HIDDEN.

displayPolicy controls the audit representation:

Value Behavior
VISIBLE The field and its value can be returned.
STATUS The field can contribute status without exposing its value.
HIDDEN The field is omitted from audit field arrays.

SummaryContextAudit

Field Type Nullable Description
isPurged boolean No Whether retained plugin-created context has been removed. Default: false.
pluginUsages SummaryContextPluginUsage[] No Plugins that received input, produced output, or contributed summary context. Default: empty array; always empty when isPurged is true.

SummaryContextPluginUsage

Field Type Nullable Description
pluginId string No Stable plugin identifier.
displayName string Yes User-facing plugin name.
description string Yes User-facing plugin description.
status string enum No REQUESTED, RESOLVED, UNRESOLVED, or UNKNOWN.
inputFields SummaryContextFieldValue[] No Displayable input fields. Hidden fields are omitted. Default: empty array.
outputFields SummaryContextFieldValue[] No Displayable output fields. Hidden fields are omitted. Default: empty array.

SummaryContextFieldValue

Field Type Nullable Description
key string No Context field key.
displayName string Yes User-facing field name.
description string Yes User-facing field description.
value string Yes Field value when displayPolicy is VISIBLE; otherwise null.
type string enum No STRING, INTEGER, BOOLEAN, or UNKNOWN. Values are serialized as strings.
displayPolicy string enum No VISIBLE exposes the value, STATUS exposes only status, and HIDDEN fields are omitted from the arrays.