Skip to main content
Developer API

Build with Krasyn AI

Add ambient scribe, medical coding, prior authorization, and code search to your own EHR, practice management system, or clinical workflow—powered by the same AI that Krasyn clinicians use every day.

Authentication

Every request must include your API key in the Authorization header:

Authorization: Bearer krasyn_live_<your_key>

Generate and manage keys at app.krasyn.com/settings/api. Keys are scoped—grant only the capabilities each integration needs.

Security note: Your key is shown only once at creation time. Store it in a secrets manager (AWS Secrets Manager, Azure Key Vault, etc.) and never commit it to source control.

Endpoint reference

POST/api/v1/scribe/generatescope: scribe

Generate a structured SOAP note from an audio transcript.

Request body

{
  "audioTranscript": "Patient presents with 3-day history of chest pain...",
  "patientContext": "55yo male, hypertension, on lisinopril"
}

Response

{
  "note": "SUBJECTIVE:\nPatient is a 55-year-old male...",
  "tokens": 842
}

Example

curl -X POST https://app.krasyn.com/api/v1/scribe/generate \
  -H "Authorization: Bearer krasyn_live_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{"audioTranscript":"Patient presents with 3-day history of chest pain..."}'
POST/api/v1/coder/suggestscope: coder

Suggest ICD-10-CM diagnosis codes and CPT procedure codes from a clinical note.

Request body

{
  "noteText": "ASSESSMENT: Type 2 diabetes mellitus, well-controlled.\nPLAN: Continue metformin 1000mg BID. HbA1c in 3 months."
}

Response

{
  "icdCodes": [
    {"code": "E11.9", "description": "Type 2 diabetes mellitus without complications"}
  ],
  "cptCodes": [
    {"code": "99213", "description": "Office visit, established patient, low complexity"}
  ]
}

Example

curl -X POST https://app.krasyn.com/api/v1/coder/suggest \
  -H "Authorization: Bearer krasyn_live_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{"noteText":"ASSESSMENT: Type 2 diabetes mellitus, well-controlled..."}'
POST/api/v1/priorauth/generatescope: priorauth

Draft a prior authorization letter for a given patient summary, payer, and treatment.

Request body

{
  "patientSummary": "55yo male with chronic low back pain, failed 6 weeks PT",
  "payer": "Blue Cross Blue Shield",
  "treatment": "MRI lumbar spine without contrast",
  "diagnosisCodes": ["M54.50"]
}

Response

{
  "letter": "DATE: August 8, 2026\n\nTo Whom It May Concern,\n\nWe are writing to request prior authorization..."
}

Example

curl -X POST https://app.krasyn.com/api/v1/priorauth/generate \
  -H "Authorization: Bearer krasyn_live_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{"treatment":"MRI lumbar spine","payer":"BCBS","diagnosisCodes":["M54.50"]}'
GET/api/v1/codes/searchscope: codes

Natural-language medical code search. Returns ICD-10, CPT, and HCPCS codes.

Query parameters

ParameterTypeDescription
qstringNatural-language query (required)
typestringFilter: icd10, cpt, or hcpcs (optional)
limitintMax results (1–20, default 10)

Response

{
  "results": [
    {"code": "J06.9", "type": "ICD10", "desc": "Acute upper respiratory infection, unspecified", "rationale": "Primary diagnosis for URI"},
    {"code": "99213", "type": "CPT", "desc": "Office visit, established patient, low complexity", "rationale": "Standard E/M for URI follow-up"}
  ],
  "answer": "For a routine URI visit, use J06.9 as the primary diagnosis with 99213..."
}

Example

curl "https://app.krasyn.com/api/v1/codes/search?q=upper+respiratory+infection&type=icd10&limit=5" \
  -H "Authorization: Bearer krasyn_live_<your_key>"

Rate limits

Each API key has its own sliding-window rate limit. When the limit is exceeded, the API returns429 Too Many Requests with a Retry-After header indicating how many seconds to wait.

PlanDefault limitWindowNotes
Default (all keys)60 req/min60-second sliding windowRetry-After returned on 429
Need a higher limit? Contact info@krasyn.com.

Error codes

StatusMeaning
400 Bad RequestMissing or invalid request parameters
401 UnauthorizedMissing, invalid, or revoked API key
403 ForbiddenKey does not have the required scope
429 Too Many RequestsRate limit exceeded — see Retry-After header
503 Service UnavailableAI service temporarily unavailable
504 Gateway TimeoutAI request timed out — retry with a shorter input

Resources