{
"code": 500,
"message": "internal server error"
}
Use this endpoint to rephrase or rewrite a selected span of text during Dictation or any other text managed within your application.
Request details
Include the selected text, surrounding content, selection offsets, and one rewrite instruction in the request body.Use instruction to choose how the selection is rewritten:
Instruction
What it does
CONCISE
Shortens the selection while keeping essential details
VERBOSE
Expands terse wording with more clinical detail
PATIENT_FRIENDLY
Rewrites the selection in language that is easier for patients to understand
instruction must be exactly CONCISE, VERBOSE, or PATIENT_FRIENDLY. Custom free-form instructions are not supported.
Keep selected_text and surrounding_content at 5,000 Unicode code points or less.
selected_text must appear inside surrounding_content. If the full field is longer, send a shorter window of text around the selection.
Response processing
A successful call returns a 200 OK status with:
content: The rewritten replacement text.
selection: Start and end offsets for the span to replace in your UI.
request_id: An ID you can share with Technical Support when debugging.
Refer to the Rewrite Dictation content guide for implementation details, context window truncation strategies, and write-back guidance.
Authorizations
sdp_suki_token
string
header
required
Suki access token (suki_token) from Login or Register. Expires after one hour.
Headers
sdp_provider_id
string
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.
Example:
"provider-123"
Body
application/json
Request body for POST /api/v1/content/rewrite
context
object
required
Surrounding content and selection offsets for the rewrite.
Show child attributes
instruction
enum<string>
required
Server-defined rewrite instruction. Must be exactly one of CONCISE, VERBOSE, or PATIENT_FRIENDLY.
Available options:
CONCISE,
VERBOSE,
PATIENT_FRIENDLY
Example:
"CONCISE"
selected_text
string
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.
Required string length: 1 - 5000
Example:
"mild intermittent headache for three days"
Response
Request succeeded.
Response body for POST /api/v1/content/rewrite
content
string
Rewritten replacement for selected_text.
Example:
"mild headache for 3 days"
request_id
string
Server-assigned correlation ID. Share this with Technical Support when debugging a rewrite request.
Example:
"trace-123"
selection
object
Echo of the request selection offsets when provided. Use these offsets to replace the span in your UI.
Show child attributes
Last modified on October 26, 2026
Was this page helpful?
cURL
curl --request POST \
--url https://sdp.suki.ai/api/v1/content/rewrite \
--header 'Content-Type: application/json' \
--header 'sdp_suki_token: <sdp_suki_token>' \
--header 'sdp_provider_id: <sdp_provider_id>' \
--data '{
"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"
}'