Skip to main content
The Sully.ai API extracts standardized medical codes from clinical text, enabling automated billing workflows and clinical documentation. This guide covers submitting coding requests, understanding results, and integrating with your clinical workflow.

Overview

Sully.ai analyzes clinical text (transcripts or notes) and extracts relevant medical codes with their source locations. The API supports three major coding systems:

Supported Code Systems

ICD-10-CM (Diagnoses)

The International Classification of Diseases, 10th Revision, Clinical Modification is the standard for diagnosis coding in the United States. Sully.ai extracts ICD-10-CM codes for conditions, symptoms, and diagnoses mentioned in clinical text.

CPT (Procedures)

Current Procedural Terminology codes describe medical procedures and services. Sully.ai identifies procedure codes based on the clinical context and services documented.

SNOMED CT (Clinical Terminology)

Systematized Nomenclature of Medicine - Clinical Terms provides comprehensive clinical vocabulary. SNOMED CT codes are included alongside ICD-10-CM codes for diagnoses to support clinical interoperability.

Code Extraction by Type


Creating a Coding Request

Submit clinical text to extract medical codes. The coding operation is asynchronous and returns a coding ID for result retrieval.

Input Options

You can submit either raw transcripts or generated clinical notes. Notes often produce more accurate coding results because they contain structured clinical information.

Polling for Results

After submitting a coding request, poll the endpoint until processing completes.

Status Flow

Polling Example


Understanding Results

When coding completes, the result object contains arrays of diagnoses and procedures, each with associated codes and source text locations.

Diagnoses

The result.diagnoses array contains diagnosed conditions with their codes:

Procedures

The result.procedures array contains identified procedures with CPT codes:

Code Systems Reference

Full Response Example


Coding + Notes Workflow

A common pattern is to transcribe audio, generate a clinical note, then extract codes. You can run coding on either the raw transcript or the generated note.

Using Webhooks

For production applications, use webhooks instead of polling. Configure webhooks to receive coding.succeeded and coding.failed events.
For complete webhook setup including signature verification, see the Webhooks guide.

Validation and Review

Medical codes extracted by Sully.ai are suggestions to assist clinical and billing workflows. They are not definitive and should not be submitted for billing without human review.

Human Review Required

Always have qualified personnel review extracted codes before:
  • Submitting claims to payers
  • Recording codes in the patient’s medical record
  • Using codes for quality reporting

Using text_span for Verification

The text_span field helps reviewers verify the source context for each code:

Best Practices

Common Validation Checks

  1. Code specificity - Ensure codes aren’t unspecified when more specific codes apply
  2. Code combinations - Verify that diagnosis and procedure codes align appropriately
  3. Medical necessity - Confirm procedures are supported by documented diagnoses
  4. Date alignment - Ensure coded services match the encounter date

Next Steps

Clinical Notes

Generate structured notes that produce better coding results

Webhooks

Set up real-time notifications for coding completion

Audio Transcription

Capture patient encounters for coding workflows

API Reference

Full coding API documentation