Skip to main content
POST
/
tools
/
coding
cURL
curl --request POST \
  --url https://api.{environment}.corti.app/v2/tools/coding/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Tenant-Name: <tenant-name>' \
  --data '
{
  "system": [
    "icd10cm-outpatient",
    "cpt"
  ],
  "context": [
    {
      "type": "text",
      "text": "Short arm splint applied in ED for pain control."
    }
  ]
}
'
{
  "codes": [
    {
      "system": "icd10cm-outpatient",
      "code": "R1030",
      "display": "Lower abdominal pain, unspecified",
      "evidences": [
        {
          "contextIndex": 0,
          "text": "Example text mentioning lower abdominal pain",
          "start": 0,
          "end": 44
        }
      ],
      "alternatives": [
        {
          "code": "R1010",
          "display": "Upper abdominal pain, unspecified"
        },
        {
          "code": "R1032",
          "display": "Left lower quadrant pain"
        }
      ]
    }
  ],
  "candidates": [
    {
      "system": "icd10cm-outpatient",
      "code": "R509",
      "display": "Fever, unspecified",
      "evidences": [
        {
          "contextIndex": 1,
          "text": "Example text mentioning fever",
          "start": 0,
          "end": 29
        }
      ],
      "alternatives": [
        {
          "code": "R502",
          "display": "Drug induced fever"
        },
        {
          "code": "R5082",
          "display": "Postprocedural fever"
        }
      ]
    }
  ],
  "usageInfo": {
    "creditsConsumed": 123
  }
}

Authorizations

Authorization
string
header
required

Input your token

Headers

Tenant-Name
string
required

Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.

Example:

"base"

Body

application/json
system
enum<string>[]
required

List of coding systems for prediction

Required array length: 1 - 8 elements
Available options:
icd10cm-inpatient,
icd10cm-outpatient,
icd10pcs,
cpt,
icd10int-inpatient,
icd10int-outpatient,
icd10uk-inpatient,
icd10uk-outpatient
Example:
["icd10cm-outpatient", "cpt"]
context
(Text · object | DocumentID · object)[]
required

Select either text or documentId as input context to the model for code prediction. Evidence indices in the response map to this array.

filter
object

Optional filter to restrict predicted codes.

Response

List of predicted codes and candidate codes per system defined in the request, including evidence supporting the code prediction.

codes
object[]
required

Codes predicted by the model.

candidates
object[]
required

Lower-confidence codes the model considered potentially relevant but excluded from the predicted set.

usageInfo
object
required

Credits consumed for this request.