POST
/
extraction
curl --request POST \
  --url https://api.totoy.ai/v1/extraction \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "rre-de-2025-03-31",
  "document": "JVBERi0xLjUNCiW1tbW1DQox...",
  "expand_abbreviations": true
}'
{
  "fields": {
    "patient_first_name": {
      "content": "Maria",
      "review": {
        "reasoning": "The first name 'Maria' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "patient_last_name": {
      "content": "Musterfrau",
      "review": {
        "reasoning": "The last name 'Musterfrau' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "patient_birth_date": {
      "content": "1990-02-01",
      "review": {
        "reasoning": "The birth date '01.02.1990' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "patient_social_security_number": {
      "content": "123401021990",
      "review": {
        "reasoning": "The social security number '1234 01 02 1990' is clearly visible and legible in the document, with spaces removed as per instructions.",
        "recommended": false
      }
    },
    "patient_gender": {
      "content": "Frau",
      "review": {
        "reasoning": "The gender is explicitly mentioned as 'Frau' in the document.",
        "recommended": false
      }
    },
    "patient_title": {
      "content": null,
      "review": {
        "reasoning": "No title is mentioned for the patient in the document.",
        "recommended": true
      }
    },
    "patient_address": {
      "content": "Musterstraße 1/2",
      "review": {
        "reasoning": "The address 'Musterstraße 1/2' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "patient_city": {
      "content": "Wien",
      "review": {
        "reasoning": "The city 'Wien' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "patient_postal_code": {
      "content": "1230",
      "review": {
        "reasoning": "The postal code '1230' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "insurance_provider": {
      "content": "SVS-GW",
      "review": {
        "reasoning": "The insurance provider 'SVS-GW' is clearly marked in the document.",
        "recommended": false
      }
    },
    "employment_status": {
      "content": 1,
      "review": {
        "reasoning": "The employment status is indicated as 'Erwerbstätig' in the document, corresponding to '1'.",
        "recommended": false
      }
    },
    "insured_first_name": {
      "content": null,
      "review": {
        "reasoning": "No information about the primary insured person's first name is present in the document.",
        "recommended": true
      }
    },
    "insured_last_name": {
      "content": null,
      "review": {
        "reasoning": "No information about the primary insured person's last name is present in the document.",
        "recommended": true
      }
    },
    "insured_birth_date": {
      "content": null,
      "review": {
        "reasoning": "No information about the primary insured person's birth date is present in the document.",
        "recommended": true
      }
    },
    "insured_social_security_number": {
      "content": null,
      "review": {
        "reasoning": "No information about the primary insured person's social security number is present in the document.",
        "recommended": true
      }
    },
    "employer_name": {
      "content": null,
      "review": {
        "reasoning": "No information about the employer's name is present in the document.",
        "recommended": true
      }
    },
    "employer_address": {
      "content": null,
      "review": {
        "reasoning": "No information about the employer's address is present in the document.",
        "recommended": true
      }
    },
    "employer_city": {
      "content": null,
      "review": {
        "reasoning": "No information about the employer's city is present in the document.",
        "recommended": true
      }
    },
    "employer_postal_code": {
      "content": null,
      "review": {
        "reasoning": "No information about the employer's postal code is present in the document.",
        "recommended": true
      }
    },
    "referral_date": {
      "content": "2025-01-01",
      "review": {
        "reasoning": "The referral date '01.01.2025' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "referral_diagnosis": {
      "content": "Verdacht auf Arthrose os pisiforme links",
      "review": {
        "reasoning": "The diagnosis is clearly visible and legible, but contains abbreviations that need replacement.",
        "recommended": true
      }
    },
    "clinical_symptoms": {
      "content": "therapieresistente anhaltende Schmerzen",
      "review": {
        "reasoning": "The clinical symptoms 'therapieresistente anhaltende Schmerzen' are clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "ordered_procedure": {
      "content": "MRT HG links",
      "review": {
        "reasoning": "The procedure is clearly visible and legible, but contains abbreviations that need replacement.",
        "recommended": true
      }
    },
    "previous_findings": {
      "content": "NativRöntgen",
      "review": {
        "reasoning": "The previous findings 'NativRöntgen' are clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "referrer_first_name": {
      "content": "Max",
      "review": {
        "reasoning": "The referrer's first name 'Max' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "referrer_last_name": {
      "content": "Mustermann",
      "review": {
        "reasoning": "The referrer's last name 'Mustermann' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "referrer_title": {
      "content": "Dr.",
      "review": {
        "reasoning": "The referrer's title 'Dr.' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "referrer_address": {
      "content": "Orthogasse 1/2",
      "review": {
        "reasoning": "The referrer's address 'Orthogasse 1/2' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "referrer_city": {
      "content": "Wien",
      "review": {
        "reasoning": "The referrer's city 'Wien' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "referrer_postal_code": {
      "content": "1010",
      "review": {
        "reasoning": "The referrer's postal code '1010' is clearly visible and legible in the document.",
        "recommended": false
      }
    },
    "partner_contract_number": {
      "content": "01123456",
      "review": {
        "reasoning": "The partner contract number '01 12 34 56' is clearly visible and legible in the document, with spaces removed as per instructions.",
        "recommended": false
      }
    },
    "report_delivery_address": {
      "content": null,
      "review": {
        "reasoning": "No report delivery address is present in the document.",
        "recommended": true
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

The name of the model that will be used for the extraction. A model name without a date is an alias to the latest version of that model, i.e. rre-de always points to the latest version of rre-de.

Available options:
rre-de-2025-02-14,
rre-de-2025-03-31,
rre-de
Example:

"rre-de-2025-03-31"

document
string
required

Base64-encoded contents of a document (PDF, JPG or PNG)

Example:

"JVBERi0xLjUNCiW1tbW1DQox..."

expand_abbreviations
boolean
default:false

If set to true, the extraction will expand abbreviations in the extracted fields.

Example:

false

Response

200
application/json
OK
fields
object
required

The extracted data fields and review recommendations. Each key represents a field name, and the value conforms to the ExtractionField schema.

Example:
{
  "referral_diagnosis": {
    "content": "C61 - Castration-resistant prostate cancer in progress, N28.1 - Right renal cyst, F52.2 - Erectile dysfunction",
    "review": {
      "reasoning": "The referral diagnosis is clearly stated with multiple diagnoses. The referral is complete and no review is needed.",
      "recommended": false
    }
  },
  "ordered_procedure": {
    "content": "MRI of the prostate, CT of the abdomen, PSA test",
    "review": {
      "reasoning": "The ordered procedures are clearly stated. No review is needed.",
      "recommended": false
    }
  }
}