curl --location --request POST https://api.writer.com/v1/tools/comprehend/medical \
--header "Authorization: Bearer <token>" \
--header "Content-Type: application/json" \
--data-raw '{"content":"the symptoms are soreness, a temperature and cough","response_type":"Entities"}'{
"entities": [
{
"category": "<string>",
"begin_offset": 123,
"end_offset": 123,
"text": "<string>",
"traits": [
{
"score": 123,
"name": "<string>"
}
],
"concepts": [
{
"code": "<string>",
"score": 123,
"description": "<string>"
}
],
"score": 123,
"attributes": [
{
"relationship_score": 123,
"begin_offset": 123,
"end_offset": 123,
"text": "<string>",
"traits": [
{
"score": 123,
"name": "<string>"
}
],
"concepts": [
{
"code": "<string>",
"score": 123,
"description": "<string>"
}
],
"score": 123,
"type": "<string>",
"category": "<string>",
"relationship_type": "<string>"
}
],
"type": "<string>"
}
]
}Analyze unstructured medical text to extract entities labeled with standardized medical codes and confidence scores.
curl --location --request POST https://api.writer.com/v1/tools/comprehend/medical \
--header "Authorization: Bearer <token>" \
--header "Content-Type: application/json" \
--data-raw '{"content":"the symptoms are soreness, a temperature and cough","response_type":"Entities"}'{
"entities": [
{
"category": "<string>",
"begin_offset": 123,
"end_offset": 123,
"text": "<string>",
"traits": [
{
"score": 123,
"name": "<string>"
}
],
"concepts": [
{
"code": "<string>",
"score": 123,
"description": "<string>"
}
],
"score": 123,
"attributes": [
{
"relationship_score": 123,
"begin_offset": 123,
"end_offset": 123,
"text": "<string>",
"traits": [
{
"score": 123,
"name": "<string>"
}
],
"concepts": [
{
"code": "<string>",
"score": 123,
"description": "<string>"
}
],
"score": 123,
"type": "<string>",
"category": "<string>",
"relationship_type": "<string>"
}
],
"type": "<string>"
}
]
}/v1/tools/comprehend/medical is deprecated and will be removed on December 22, 2025.Migration path: Use the LLM tool in chat completions to delegate medical analysis tasks to the palmyra-med model. This approach provides the same medical analysis capabilities within a chat completion workflow. See the migration guide for detailed instructions.Bearer authentication header of the form Bearer <token>, where <token> is your Writer API key.
The text to analyze.
The structure of the response to return. Entities returns medical entities, RxNorm returns medication information, ICD-10-CM returns diagnosis codes, and SNOMED CT returns medical concepts.
Entities, RxNorm, ICD-10-CM, SNOMED CT An array of medical entities extracted from the input text.
Show child attributes
Show child attributes
Was this page helpful?