Skip to main content
POST
/
tools
/
coding
Predict Codes
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",
    "cpt"
  ],
  "context": [
    {
      "type": "text",
      "text": "Short arm splint applied in ED for pain control."
    }
  ],
  "maxCandidates": 5
}
'
{
  "codes": [
    {
      "system": "icd10cm",
      "code": "R1030",
      "display": "Lower abdominal pain, unspecified",
      "evidences": [
        {
          "contextIndex": 0,
          "text": "Example text mentioning lower abdominal pain"
        }
      ]
    }
  ],
  "candidates": [
    {
      "system": "icd10cm",
      "code": "R509",
      "display": "Fever, unspecified",
      "evidences": [
        {
          "contextIndex": 1,
          "text": "Example text mentioning fever"
        }
      ]
    }
  ]
}

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 - 3 elements
Available options:
icd10cm,
icd10pcs,
cpt
Example:
["icd10cm", "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.

maxCandidates
integer

Maximum number of code candidates to include in the response (per system).

Required range: 1 <= x <= 50

Response

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

codes
object[]
required

Highest confidence bundle of codes, preselected by the code prediction model

candidates
object[]
required

Full list of candidate codes as predicted by the model, rank sorted by model confidence

usageInfo
object

Credits consumed for this request.