/api/v1/content

Rewrite selected clinical text

Changed on

Rewrites a selected span of clinical text using a server-defined instruction (CONCISE, VERBOSE, or PATIENT_FRIENDLY). Send the selected text with surrounding context and selection offsets so the rewrite preserves meaning. The response returns the rewritten replacement text, selection offsets for your UI to apply, and a request_id for support.

post/api/v1/content/rewrite

Request

  • Base URL
    https://sdp.suki.ai
  • URL
    https://sdp.suki.ai/api/v1/content/rewrite
  • Auth
    API key in header sdp_suki_token

Headers

sdp_provider_idstring
Example:provider-123

Optional for standard partners.

Required for:

  • Bearer authentication. Use the same provider_id returned by the Login or Register API.
  • Single Auth Token authentication. Include the same provider_id on every request as sdp_provider_id.

Request body

instruction'CONCISE' | 'VERBOSE' | 'PATIENT_FRIENDLY' required

Server-defined rewrite instruction. Must be exactly one of CONCISE, VERBOSE, or PATIENT_FRIENDLY.

selected_textstring required

Text span to rewrite. Must be a subset of context.surrounding_content when surrounding content is provided. Length must be 1 to 5000 Unicode code points.

Example request

{
  "context": {
    "selection": {
      "start": 16,
      "end": 57
    },
    "surrounding_content": "Patient reports mild intermittent headache for three days."
  },
  "instruction": "CONCISE",
  "selected_text": "mild intermittent headache for three days"
}

Response

Request succeeded.

contentstring

Rewritten replacement for selected_text.

request_idstring

Server-assigned correlation ID. Share this with Technical Support when debugging a rewrite request.

Example response

{
  "content": "mild headache for 3 days",
  "request_id": "trace-123",
  "selection": {
    "start": 16,
    "end": 57
  }
}

Changes