{"openapi":"3.1.0","info":{"title":"Kantesti API","version":"12.0.0","summary":"AI blood test analysis and health modules.","description":"AI-powered blood test analysis with 100+ response languages, plus Body Map, Biological Blood Age, DNA Health, Nutrition, Comparison, Trend Analysis, Family Health and ICR modules.\n\n**Authentication.** Username and password are the primary method: send them as `username` and `password` form fields (multipart) or JSON fields with every request, or as HTTP Basic. As an alternative, create an API key in the dashboard and send `Authorization: Bearer kt_live_...`; a key replaces both fields. Keys are scoped (`analyze`, `modules`, `sandbox`); the scope each operation needs is in `x-kantesti-key-scope`, and a call outside the scopes of a key is answered with 401 `AUTH_1002`. An account has at most 20 active keys. A key can be created with an expiry date (from the next day to 730 days ahead; it works until the end of that day, UTC, and is then refused with 401 `AUTH_1005`, exactly like a revoked key) and with an IP allowlist (up to 10 IPv4/IPv6 addresses or CIDR ranges; from any other address the answer is 403 `AUTH_1006`). Both are fixed when the key is created; keys are created and revoked in the dashboard (https://www.kantesti.net/api/dashboard/). Never put credentials in client-side code. Support: api@kantesti.net.\n\n**Quota.** Credit based: each successful production request consumes 1 credit (ICR: 0.5); sandbox and failed requests consume none (`x-kantesti-credits`). The blood test sandbox endpoints (`/api/v.../sandbox`) also work with a balance of 0 credits once the e-mail address of the account is verified, and so do the sandbox endpoints of the other modules (an unverified account with 0 credits is answered with 403 `QUOTA_1101`); the ICR sandbox endpoints do not check the balance. Sandbox calls of an account with 0 credits are rate limited: 429 `RATE_LIMITED` with `Retry-After` (up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together). An account with credits is never rate limited on the sandbox. The API sends no `X-RateLimit-*` headers; read the balance with `POST /api/quota/check`. A 429 or 503 may carry `Retry-After`.\n\n**Async mode.** Long analyses accept `?async=1` (or `X-Async: 1`): the answer is 202 with a `job_id`; poll `GET /api/jobs/{job_id}`.\n\n**Files.** PDF, PNG, JPG/JPEG, WEBP. Upload either a single PDF or one or more images, never both.","contact":{"name":"Kantesti API","url":"https://www.kantesti.net/api/","email":"api@kantesti.net"}},"servers":[{"url":"https://app.aibloodtestinterpret.com","description":"Production"}],"externalDocs":{"description":"API documentation","url":"https://www.kantesti.net/docs/en/"},"tags":[{"name":"Blood Test Analysis","description":"Upload a blood test image or PDF; receive parameters, metadata and an interpretation."},{"name":"Sandbox","description":"Free test endpoints: same request format, stored data, no quota consumed."},{"name":"Trend Analysis","description":"Statistical trends over 2 to 50 tests."},{"name":"Nutrition","description":"Nutrition Diet AI with supplements."},{"name":"Comparison","description":"AI narrative comparison of 2 to 20 tests."},{"name":"Family Health","description":"Hereditary risk assessment."},{"name":"Body Map","description":"Out-of-range results on 13 body regions."},{"name":"Biological Blood Age","description":"PhenoAge blood age and derived clinical indices."},{"name":"DNA Health","description":"DNA Test Interpretation, DNA + Blood Health Report and Supplement Advisor."},{"name":"ICR","description":"Intelligent Character Recognition: structured text extraction."},{"name":"Async Jobs","description":"Polling for requests started with ?async=1."},{"name":"Utility","description":"Platform information, health check and quota."},{"name":"Legacy","description":"Older blood test versions kept for backward compatibility."}],"security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"paths":{"/api/v12/18-09-2026/analyze":{"post":{"operationId":"analyzeV12","tags":["Blood Test Analysis"],"summary":"Blood Test Analysis v12 (latest)","description":"Upload one or more blood test images or a PDF and receive structured parameters, patient and laboratory metadata and a clinical interpretation in the requested language. Consumes 1 credit per successful request; failed requests are not charged.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"},"pdf_password":{"type":"string","description":"Password for an encrypted PDF."}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Analysis result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodTestResponse"},"examples":{"example":{"value":{"status":"success","data":{"metadata":{"patient_name":"Jan Novák","lab_city":"Prague","lab_country":"Czech Republic","lab_date":"2025-05-11","lab_name":"BioLAB Medical Center","patient_age":"45","patient_sex":"Male","results_date":"2025-05-26"},"parameters":[{"short_name":"PT Ratio","long_name":"Prothrombin Time Ratio","category":"Coagulation","result":0.94,"unit":null,"evaluation":"optimal","type":"range","range_min":0.5,"range_max":1.5,"range_normal_min":0.8,"range_normal_max":1.2,"range_optimal_min":0.88,"range_optimal_max":1.12,"short_description":"The ratio of patient's prothrombin time to a control.","long_description":"<p>This test evaluates the extrinsic pathway of coagulation. It is crucial for monitoring anticoagulant therapy.</p>"},{"short_name":"WBC","long_name":"White Blood Cell Count","category":"Complete Blood Count","result":4.3,"unit":"10^9/l","evaluation":"normal","type":"range","range_min":2,"range_max":12,"range_normal_min":4,"range_normal_max":10,"range_optimal_min":4.8,"range_optimal_max":8,"short_description":"Measures the number of white blood cells.","long_description":"<p>White blood cells are key components of the immune system, fighting infections and disease.</p>"}],"interpretation":[{"title":"Introduction","shortcode":"introduction","subsections":[{"subtitle":"General Summary of Blood Test","shortcode":"introduction_summary","items":[{"item":"This laboratory assessment includes comprehensive coagulation, complete blood count, basic metabolic and liver function markers, and lipid profile analysis."},{"item":"Most hematology and coagulation parameters are within reference limits, indicating preserved organ function and normal blood clotting ability."}]}]},{"title":"Overall Health Assessment","shortcode":"overall_health_assessment","subsections":[{"subtitle":"Comprehensive Overview","shortcode":"overall_health_assessment_overview","items":[{"item":"The patient demonstrates preserved overall organ function with normal coagulation parameters and white blood cell count."},{"item":"Lipid abnormalities are present, specifically hypercholesterolemia (6.13 mmol/l), increasing the risk for atherosclerotic cardiovascular disease."}]}]}]},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"v12"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"analyze","x-kantesti-credits":1}},"/api/v12/18-09-2026/sandbox":{"post":{"operationId":"sandboxV12","tags":["Sandbox"],"summary":"Blood Test Analysis v12: sandbox","description":"Same request as the production endpoint, a file included. Returns stored test data, performs no analysis and consumes no quota. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"},"pdf_password":{"type":"string","description":"Password for an encrypted PDF."}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodTestResponse"},"examples":{"example":{"value":{"status":"success","data":{"metadata":{"patient_name":"Jan Novák","lab_city":"Prague","lab_country":"Czech Republic","lab_date":"2025-05-11","lab_name":"BioLAB Medical Center","patient_age":"45","patient_sex":"Male","results_date":"2025-05-26"},"parameters":[{"short_name":"PT Ratio","long_name":"Prothrombin Time Ratio","category":"Coagulation","result":0.94,"unit":null,"evaluation":"optimal","type":"range","range_min":0.5,"range_max":1.5,"range_normal_min":0.8,"range_normal_max":1.2,"range_optimal_min":0.88,"range_optimal_max":1.12,"short_description":"The ratio of patient's prothrombin time to a control.","long_description":"<p>This test evaluates the extrinsic pathway of coagulation. It is crucial for monitoring anticoagulant therapy.</p>"},{"short_name":"WBC","long_name":"White Blood Cell Count","category":"Complete Blood Count","result":4.3,"unit":"10^9/l","evaluation":"normal","type":"range","range_min":2,"range_max":12,"range_normal_min":4,"range_normal_max":10,"range_optimal_min":4.8,"range_optimal_max":8,"short_description":"Measures the number of white blood cells.","long_description":"<p>White blood cells are key components of the immune system, fighting infections and disease.</p>"}],"interpretation":[{"title":"Introduction","shortcode":"introduction","subsections":[{"subtitle":"General Summary of Blood Test","shortcode":"introduction_summary","items":[{"item":"This laboratory assessment includes comprehensive coagulation, complete blood count, basic metabolic and liver function markers, and lipid profile analysis."},{"item":"Most hematology and coagulation parameters are within reference limits, indicating preserved organ function and normal blood clotting ability."}]}]},{"title":"Overall Health Assessment","shortcode":"overall_health_assessment","subsections":[{"subtitle":"Comprehensive Overview","shortcode":"overall_health_assessment_overview","items":[{"item":"The patient demonstrates preserved overall organ function with normal coagulation parameters and white blood cell count."},{"item":"Lipid abnormalities are present, specifically hypercholesterolemia (6.13 mmol/l), increasing the risk for atherosclerotic cardiovascular disease."}]}]}]},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"v12","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual analysis was performed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v12/health-score/analyze":{"post":{"operationId":"analyzeV12HealthScore","tags":["Blood Test Analysis"],"summary":"Blood Test Analysis (Health Score) v12 (latest)","description":"Upload one or more blood test images or a PDF and receive structured parameters, patient and laboratory metadata and a clinical interpretation in the requested language. Consumes 1 credit per successful request; failed requests are not charged. Adds `health_score` and `disease_risks` to the response.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"},"pdf_password":{"type":"string","description":"Password for an encrypted PDF."}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Analysis result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthScoreResponse"},"examples":{"example":{"value":{"status":"success","data":{"metadata":{"patient_name":"Jan Novák","lab_city":"Prague","lab_country":"Czech Republic","lab_date":"2025-05-11","lab_name":"BioLAB Medical Center","patient_age":"45","patient_sex":"Male","results_date":"2025-05-26"},"parameters":[{"short_name":"PT Ratio","long_name":"Prothrombin Time Ratio","category":"Coagulation","result":0.94,"unit":null,"evaluation":"optimal","type":"range","range_min":0.5,"range_max":1.5,"range_normal_min":0.8,"range_normal_max":1.2,"range_optimal_min":0.88,"range_optimal_max":1.12,"short_description":"The ratio of patient's prothrombin time to a control.","long_description":"<p>This test evaluates the extrinsic pathway of coagulation. It is crucial for monitoring anticoagulant therapy.</p>"},{"short_name":"WBC","long_name":"White Blood Cell Count","category":"Complete Blood Count","result":4.3,"unit":"10^9/l","evaluation":"normal","type":"range","range_min":2,"range_max":12,"range_normal_min":4,"range_normal_max":10,"range_optimal_min":4.8,"range_optimal_max":8,"short_description":"Measures the number of white blood cells.","long_description":"<p>White blood cells are key components of the immune system, fighting infections and disease.</p>"}],"interpretation":[{"title":"Introduction","shortcode":"introduction","subsections":[{"subtitle":"General Summary of Blood Test","shortcode":"introduction_summary","items":[{"item":"This laboratory assessment includes comprehensive coagulation, complete blood count, basic metabolic and liver function markers, and lipid profile analysis."},{"item":"Most hematology and coagulation parameters are within reference limits, indicating preserved organ function and normal blood clotting ability."}]}]},{"title":"Overall Health Assessment","shortcode":"overall_health_assessment","subsections":[{"subtitle":"Comprehensive Overview","shortcode":"overall_health_assessment_overview","items":[{"item":"The patient demonstrates preserved overall organ function with normal coagulation parameters and white blood cell count."},{"item":"Lipid abnormalities are present, specifically hypercholesterolemia (6.13 mmol/l), increasing the risk for atherosclerotic cardiovascular disease."}]}]}],"health_score":{"overall":75,"optimal":1,"normal":1,"warning":1,"critical":1,"total_parameters":4,"score_interpretation":"good"},"disease_risks":[{"name":"Atherosclerotic Cardiovascular Disease","percentage":"42%"},{"name":"Metabolic Syndrome","percentage":"25%"}]},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"v12-health"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"analyze","x-kantesti-credits":1}},"/api/v12/health-score/sandbox":{"post":{"operationId":"sandboxV12HealthScore","tags":["Sandbox"],"summary":"Blood Test Analysis (Health Score) v12: sandbox","description":"Same request as the production endpoint, a file included. Returns stored test data, performs no analysis and consumes no quota. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"},"pdf_password":{"type":"string","description":"Password for an encrypted PDF."}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthScoreResponse"},"examples":{"example":{"value":{"status":"success","data":{"metadata":{"patient_name":"Jan Novák","lab_city":"Prague","lab_country":"Czech Republic","lab_date":"2025-05-11","lab_name":"BioLAB Medical Center","patient_age":"45","patient_sex":"Male","results_date":"2025-05-26"},"parameters":[{"short_name":"PT Ratio","long_name":"Prothrombin Time Ratio","category":"Coagulation","result":0.94,"unit":null,"evaluation":"optimal","type":"range","range_min":0.5,"range_max":1.5,"range_normal_min":0.8,"range_normal_max":1.2,"range_optimal_min":0.88,"range_optimal_max":1.12,"short_description":"The ratio of patient's prothrombin time to a control.","long_description":"<p>This test evaluates the extrinsic pathway of coagulation. It is crucial for monitoring anticoagulant therapy.</p>"},{"short_name":"WBC","long_name":"White Blood Cell Count","category":"Complete Blood Count","result":4.3,"unit":"10^9/l","evaluation":"normal","type":"range","range_min":2,"range_max":12,"range_normal_min":4,"range_normal_max":10,"range_optimal_min":4.8,"range_optimal_max":8,"short_description":"Measures the number of white blood cells.","long_description":"<p>White blood cells are key components of the immune system, fighting infections and disease.</p>"}],"interpretation":[{"title":"Introduction","shortcode":"introduction","subsections":[{"subtitle":"General Summary of Blood Test","shortcode":"introduction_summary","items":[{"item":"This laboratory assessment includes comprehensive coagulation, complete blood count, basic metabolic and liver function markers, and lipid profile analysis."},{"item":"Most hematology and coagulation parameters are within reference limits, indicating preserved organ function and normal blood clotting ability."}]}]},{"title":"Overall Health Assessment","shortcode":"overall_health_assessment","subsections":[{"subtitle":"Comprehensive Overview","shortcode":"overall_health_assessment_overview","items":[{"item":"The patient demonstrates preserved overall organ function with normal coagulation parameters and white blood cell count."},{"item":"Lipid abnormalities are present, specifically hypercholesterolemia (6.13 mmol/l), increasing the risk for atherosclerotic cardiovascular disease."}]}]}],"health_score":{"overall":75,"optimal":1,"normal":1,"warning":1,"critical":1,"total_parameters":4,"score_interpretation":"good"},"disease_risks":[{"name":"Atherosclerotic Cardiovascular Disease","percentage":"42%"},{"name":"Metabolic Syndrome","percentage":"25%"}]},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"v12-health","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual analysis was performed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v11/01-06-2025/analyze":{"post":{"operationId":"analyzeV11","tags":["Blood Test Analysis"],"summary":"Blood Test Analysis v11 (stable)","description":"Upload one or more blood test images or a PDF and receive structured parameters, patient and laboratory metadata and a clinical interpretation in the requested language. Consumes 1 credit per successful request; failed requests are not charged.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Analysis result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodTestResponse"},"examples":{"example":{"value":{"status":"success","data":{"metadata":{"patient_name":"Jan Novák","lab_city":"Prague","lab_country":"Czech Republic","lab_date":"2025-05-11","lab_name":"BioLAB Medical Center","patient_age":"45","patient_sex":"Male","results_date":"2025-05-26"},"parameters":[{"short_name":"PT Ratio","long_name":"Prothrombin Time Ratio","category":"Coagulation","result":0.94,"unit":null,"evaluation":"optimal","type":"range","range_min":0.5,"range_max":1.5,"range_normal_min":0.8,"range_normal_max":1.2,"range_optimal_min":0.88,"range_optimal_max":1.12,"short_description":"The ratio of patient's prothrombin time to a control.","long_description":"<p>This test evaluates the extrinsic pathway of coagulation. It is crucial for monitoring anticoagulant therapy.</p>"},{"short_name":"WBC","long_name":"White Blood Cell Count","category":"Complete Blood Count","result":4.3,"unit":"10^9/l","evaluation":"normal","type":"range","range_min":2,"range_max":12,"range_normal_min":4,"range_normal_max":10,"range_optimal_min":4.8,"range_optimal_max":8,"short_description":"Measures the number of white blood cells.","long_description":"<p>White blood cells are key components of the immune system, fighting infections and disease.</p>"}],"interpretation":[{"title":"Introduction","shortcode":"introduction","subsections":[{"subtitle":"General Summary of Blood Test","shortcode":"introduction_summary","items":[{"item":"This laboratory assessment includes comprehensive coagulation, complete blood count, basic metabolic and liver function markers, and lipid profile analysis."},{"item":"Most hematology and coagulation parameters are within reference limits, indicating preserved organ function and normal blood clotting ability."}]}]},{"title":"Overall Health Assessment","shortcode":"overall_health_assessment","subsections":[{"subtitle":"Comprehensive Overview","shortcode":"overall_health_assessment_overview","items":[{"item":"The patient demonstrates preserved overall organ function with normal coagulation parameters and white blood cell count."},{"item":"Lipid abnormalities are present, specifically hypercholesterolemia (6.13 mmol/l), increasing the risk for atherosclerotic cardiovascular disease."}]}]}]},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"v12"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"analyze","x-kantesti-credits":1}},"/api/v11/01-06-2025/sandbox":{"post":{"operationId":"sandboxV11","tags":["Sandbox"],"summary":"Blood Test Analysis v11: sandbox","description":"Same request as the production endpoint, a file included. Returns stored test data, performs no analysis and consumes no quota. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodTestResponse"},"examples":{"example":{"value":{"status":"success","data":{"metadata":{"patient_name":"Jan Novák","lab_city":"Prague","lab_country":"Czech Republic","lab_date":"2025-05-11","lab_name":"BioLAB Medical Center","patient_age":"45","patient_sex":"Male","results_date":"2025-05-26"},"parameters":[{"short_name":"PT Ratio","long_name":"Prothrombin Time Ratio","category":"Coagulation","result":0.94,"unit":null,"evaluation":"optimal","type":"range","range_min":0.5,"range_max":1.5,"range_normal_min":0.8,"range_normal_max":1.2,"range_optimal_min":0.88,"range_optimal_max":1.12,"short_description":"The ratio of patient's prothrombin time to a control.","long_description":"<p>This test evaluates the extrinsic pathway of coagulation. It is crucial for monitoring anticoagulant therapy.</p>"},{"short_name":"WBC","long_name":"White Blood Cell Count","category":"Complete Blood Count","result":4.3,"unit":"10^9/l","evaluation":"normal","type":"range","range_min":2,"range_max":12,"range_normal_min":4,"range_normal_max":10,"range_optimal_min":4.8,"range_optimal_max":8,"short_description":"Measures the number of white blood cells.","long_description":"<p>White blood cells are key components of the immune system, fighting infections and disease.</p>"}],"interpretation":[{"title":"Introduction","shortcode":"introduction","subsections":[{"subtitle":"General Summary of Blood Test","shortcode":"introduction_summary","items":[{"item":"This laboratory assessment includes comprehensive coagulation, complete blood count, basic metabolic and liver function markers, and lipid profile analysis."},{"item":"Most hematology and coagulation parameters are within reference limits, indicating preserved organ function and normal blood clotting ability."}]}]},{"title":"Overall Health Assessment","shortcode":"overall_health_assessment","subsections":[{"subtitle":"Comprehensive Overview","shortcode":"overall_health_assessment_overview","items":[{"item":"The patient demonstrates preserved overall organ function with normal coagulation parameters and white blood cell count."},{"item":"Lipid abnormalities are present, specifically hypercholesterolemia (6.13 mmol/l), increasing the risk for atherosclerotic cardiovascular disease."}]}]}]},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"v12","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual analysis was performed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v11/health-score/analyze":{"post":{"operationId":"analyzeV11HealthScore","tags":["Blood Test Analysis"],"summary":"Blood Test Analysis (Health Score) v11 (stable)","description":"Upload one or more blood test images or a PDF and receive structured parameters, patient and laboratory metadata and a clinical interpretation in the requested language. Consumes 1 credit per successful request; failed requests are not charged. Adds `health_score` and `disease_risks` to the response.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Analysis result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthScoreResponse"},"examples":{"example":{"value":{"status":"success","data":{"metadata":{"patient_name":"Jan Novák","lab_city":"Prague","lab_country":"Czech Republic","lab_date":"2025-05-11","lab_name":"BioLAB Medical Center","patient_age":"45","patient_sex":"Male","results_date":"2025-05-26"},"parameters":[{"short_name":"PT Ratio","long_name":"Prothrombin Time Ratio","category":"Coagulation","result":0.94,"unit":null,"evaluation":"optimal","type":"range","range_min":0.5,"range_max":1.5,"range_normal_min":0.8,"range_normal_max":1.2,"range_optimal_min":0.88,"range_optimal_max":1.12,"short_description":"The ratio of patient's prothrombin time to a control.","long_description":"<p>This test evaluates the extrinsic pathway of coagulation. It is crucial for monitoring anticoagulant therapy.</p>"},{"short_name":"WBC","long_name":"White Blood Cell Count","category":"Complete Blood Count","result":4.3,"unit":"10^9/l","evaluation":"normal","type":"range","range_min":2,"range_max":12,"range_normal_min":4,"range_normal_max":10,"range_optimal_min":4.8,"range_optimal_max":8,"short_description":"Measures the number of white blood cells.","long_description":"<p>White blood cells are key components of the immune system, fighting infections and disease.</p>"}],"interpretation":[{"title":"Introduction","shortcode":"introduction","subsections":[{"subtitle":"General Summary of Blood Test","shortcode":"introduction_summary","items":[{"item":"This laboratory assessment includes comprehensive coagulation, complete blood count, basic metabolic and liver function markers, and lipid profile analysis."},{"item":"Most hematology and coagulation parameters are within reference limits, indicating preserved organ function and normal blood clotting ability."}]}]},{"title":"Overall Health Assessment","shortcode":"overall_health_assessment","subsections":[{"subtitle":"Comprehensive Overview","shortcode":"overall_health_assessment_overview","items":[{"item":"The patient demonstrates preserved overall organ function with normal coagulation parameters and white blood cell count."},{"item":"Lipid abnormalities are present, specifically hypercholesterolemia (6.13 mmol/l), increasing the risk for atherosclerotic cardiovascular disease."}]}]}],"health_score":{"overall":75,"optimal":1,"normal":1,"warning":1,"critical":1,"total_parameters":4,"score_interpretation":"good"},"disease_risks":[{"name":"Atherosclerotic Cardiovascular Disease","percentage":"42%"},{"name":"Metabolic Syndrome","percentage":"25%"}]},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"v12-health"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"analyze","x-kantesti-credits":1}},"/api/v11/health-score/sandbox":{"post":{"operationId":"sandboxV11HealthScore","tags":["Sandbox"],"summary":"Blood Test Analysis (Health Score) v11: sandbox","description":"Same request as the production endpoint, a file included. Returns stored test data, performs no analysis and consumes no quota. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthScoreResponse"},"examples":{"example":{"value":{"status":"success","data":{"metadata":{"patient_name":"Jan Novák","lab_city":"Prague","lab_country":"Czech Republic","lab_date":"2025-05-11","lab_name":"BioLAB Medical Center","patient_age":"45","patient_sex":"Male","results_date":"2025-05-26"},"parameters":[{"short_name":"PT Ratio","long_name":"Prothrombin Time Ratio","category":"Coagulation","result":0.94,"unit":null,"evaluation":"optimal","type":"range","range_min":0.5,"range_max":1.5,"range_normal_min":0.8,"range_normal_max":1.2,"range_optimal_min":0.88,"range_optimal_max":1.12,"short_description":"The ratio of patient's prothrombin time to a control.","long_description":"<p>This test evaluates the extrinsic pathway of coagulation. It is crucial for monitoring anticoagulant therapy.</p>"},{"short_name":"WBC","long_name":"White Blood Cell Count","category":"Complete Blood Count","result":4.3,"unit":"10^9/l","evaluation":"normal","type":"range","range_min":2,"range_max":12,"range_normal_min":4,"range_normal_max":10,"range_optimal_min":4.8,"range_optimal_max":8,"short_description":"Measures the number of white blood cells.","long_description":"<p>White blood cells are key components of the immune system, fighting infections and disease.</p>"}],"interpretation":[{"title":"Introduction","shortcode":"introduction","subsections":[{"subtitle":"General Summary of Blood Test","shortcode":"introduction_summary","items":[{"item":"This laboratory assessment includes comprehensive coagulation, complete blood count, basic metabolic and liver function markers, and lipid profile analysis."},{"item":"Most hematology and coagulation parameters are within reference limits, indicating preserved organ function and normal blood clotting ability."}]}]},{"title":"Overall Health Assessment","shortcode":"overall_health_assessment","subsections":[{"subtitle":"Comprehensive Overview","shortcode":"overall_health_assessment_overview","items":[{"item":"The patient demonstrates preserved overall organ function with normal coagulation parameters and white blood cell count."},{"item":"Lipid abnormalities are present, specifically hypercholesterolemia (6.13 mmol/l), increasing the risk for atherosclerotic cardiovascular disease."}]}]}],"health_score":{"overall":75,"optimal":1,"normal":1,"warning":1,"critical":1,"total_parameters":4,"score_interpretation":"good"},"disease_risks":[{"name":"Atherosclerotic Cardiovascular Disease","percentage":"42%"},{"name":"Metabolic Syndrome","percentage":"25%"}]},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"v12-health","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual analysis was performed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v10/health-score/analyze":{"post":{"operationId":"analyzeV10HealthScore","tags":["Legacy"],"summary":"Blood Test Analysis (Health Score) v10 (legacy)","description":"Maintained for backward compatibility; not recommended for new integrations. Use the v12 endpoints.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"deprecated":true,"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Analysis result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthScoreResponse"}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"analyze","x-kantesti-credits":1}},"/api/v9/14-04-2025/analyze":{"post":{"operationId":"analyzeV9","tags":["Legacy"],"summary":"Blood Test Analysis v9 (legacy)","description":"Maintained for backward compatibility; not recommended for new integrations. Use the v12 endpoints.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"deprecated":true,"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Analysis result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodTestResponse"}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"analyze","x-kantesti-credits":1}},"/api/v8/31-03-2025/analyze":{"post":{"operationId":"analyzeV8","tags":["Legacy"],"summary":"Blood Test Analysis v8 (legacy)","description":"Maintained for backward compatibility; not recommended for new integrations. Use the v12 endpoints.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"deprecated":true,"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Analysis result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodTestResponse"}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"analyze","x-kantesti-credits":1}},"/api/v6-1/21-11-2024/analyze":{"post":{"operationId":"analyzeV6","tags":["Legacy"],"summary":"Blood Test Analysis v6 (legacy)","description":"Maintained for backward compatibility; not recommended for new integrations. Use the v12 endpoints.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"deprecated":true,"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Blood test report: one PDF, or one or more images (PNG, JPG, WEBP). Repeat the `file` part to send several images. Max 20 MB. A PDF cannot be mixed with images, and only one PDF is accepted.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Analysis result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodTestResponse"}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"analyze","x-kantesti-credits":1}},"/api/v3/10-10-2024/analyze":{"post":{"operationId":"analyzeV3","tags":["Legacy"],"summary":"Blood Test Analysis v3 (legacy)","description":"Maintained for backward compatibility; not recommended for new integrations. Use the v12 endpoints.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"deprecated":true,"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"string","format":"binary","description":"Blood test image or PDF (one file). Max 20 MB."},"language":{"$ref":"#/components/schemas/Language"}}},"encoding":{"file":{"contentType":"application/pdf, image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Analysis result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodTestResponse"}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"analyze","x-kantesti-credits":1}},"/api/v1/analytics/trends/analyze":{"post":{"operationId":"trendsAnalyze","tags":["Trend Analysis"],"summary":"Trend Analysis v1","description":"Analyzes blood test parameter trends over 2 to 50 test dates: statistics, chart data and an AI reading of each parameter. Consumes 1 credit.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendsRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","language":"en","analysis_type":"comprehensive","analysis_options":{"include_predictions":true,"include_statistics":true,"include_charts":true},"blood_tests":[{"lab_date":"2024-01-15","parameters":[{"name":"Fasting Glucose","short_name":"GLU","value":98,"unit":"mg/dL"},{"name":"LDL Cholesterol","short_name":"LDL","value":110,"unit":"mg/dL"}]},{"lab_date":"2024-05-20","parameters":[{"name":"Fasting Glucose","short_name":"GLU","value":92,"unit":"mg/dL"},{"name":"LDL Cholesterol","short_name":"LDL","value":102,"unit":"mg/dL"}]}]}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"analysis_id":"TRD-SANDBOX0","generated_at":"2026-11-30T12:00:00.000000Z","analysis_period":{"start_date":"2024-01-15","end_date":"2024-12-18","total_tests":4,"span_months":11},"report_count":4,"categories":["Iron Studies","Metabolic Panel"],"chart_config":{"dates":["Jan 2024","May 2024"],"raw_dates":["2024-01-15","2024-05-20"],"simple_dates":["2024-01-15","2024-05-20"]},"overall_health_trend":{"summary":"The data reveals overall improvement and stabilization in key blood parameters, with normalization of previously low or elevated levels. Hemoglobin, vitamin D, LDL cholesterol, and iron markers showed positive trends. Lipid profile improved with decreased total cholesterol, LDL, and triglycerides, alongside increase...","health_risks":[],"recommendations":[]},"parameter_trends":[{"parameter":"Hemoglobin (Hb)","short_name":"Hemoglobin","original_names":["Hemoglobin","HGB"],"category":"Complete Blood Count","unit":"g/dL","trend_data":[{"date":"2024-01-15","value":12.8},{"date":"2024-05-20","value":13.5}],"statistical_analysis":{"min":12.8,"max":14.8,"average":13.82,"standard_deviation":0.87,"trend_direction":"upward","trend_strength":"moderate"},"analysis":{"description":"Hemoglobin measures the amount of oxygen-carrying protein in red blood cells, important for oxygen transport throughout the body.","normalized_unit":"g/dL","significant_variations":"Initially low at 12.8 g/dL (2024-01-15), levels increased to normal range by 2024-05-20 and continued rising to 14.8 g/dL by 2024-12-18.","trend_pattern":"Increasing"},"interpretation":"Hemoglobin measures the amount of oxygen-carrying protein in red blood cells, important for oxygen transport throughout the body."},{"parameter":"White Blood Cells (WBC)","short_name":"White Blood","original_names":["White Blood Cells","WBC"],"category":"Complete Blood Count","unit":"10^9/L","trend_data":[{"date":"2024-01-15","value":6.5},{"date":"2024-05-20","value":7.2}],"statistical_analysis":{"min":6.5,"max":7.2,"average":6.88,"standard_deviation":0.3,"trend_direction":"stable","trend_strength":"mild"},"analysis":{"description":"White blood cell count indicates immune system activity and response to infection or inflammation.","normalized_unit":"10^9/L","significant_variations":"Values remained within normal range across all dates with minor fluctuations between 6.5 and 7.2.","trend_pattern":"Stable"},"interpretation":"White blood cell count indicates immune system activity and response to infection or inflammation."}],"risk_factors":[],"language":"en"},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":1}},"/api/v1/analytics/trends/sandbox":{"post":{"operationId":"trendsSandbox","tags":["Sandbox"],"summary":"Trend Analysis v1: sandbox","description":"Returns a sample response in the shape `/analyze` produces. Authentication is required; no quota is consumed and no analysis is performed. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","language":"en","analysis_type":"comprehensive","analysis_options":{"include_predictions":true,"include_statistics":true,"include_charts":true},"blood_tests":[{"lab_date":"2024-01-15","parameters":[{"name":"Fasting Glucose","short_name":"GLU","value":98,"unit":"mg/dL"},{"name":"LDL Cholesterol","short_name":"LDL","value":110,"unit":"mg/dL"}]},{"lab_date":"2024-05-20","parameters":[{"name":"Fasting Glucose","short_name":"GLU","value":92,"unit":"mg/dL"},{"name":"LDL Cholesterol","short_name":"LDL","value":102,"unit":"mg/dL"}]}]}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"analysis_id":"TRD-SANDBOX0","generated_at":"2026-11-30T12:00:00.000000Z","analysis_period":{"start_date":"2024-01-15","end_date":"2024-12-18","total_tests":4,"span_months":11},"report_count":4,"categories":["Iron Studies","Metabolic Panel"],"chart_config":{"dates":["Jan 2024","May 2024"],"raw_dates":["2024-01-15","2024-05-20"],"simple_dates":["2024-01-15","2024-05-20"]},"overall_health_trend":{"summary":"The data reveals overall improvement and stabilization in key blood parameters, with normalization of previously low or elevated levels. Hemoglobin, vitamin D, LDL cholesterol, and iron markers showed positive trends. Lipid profile improved with decreased total cholesterol, LDL, and triglycerides, alongside increase...","health_risks":[],"recommendations":[]},"parameter_trends":[{"parameter":"Hemoglobin (Hb)","short_name":"Hemoglobin","original_names":["Hemoglobin","HGB"],"category":"Complete Blood Count","unit":"g/dL","trend_data":[{"date":"2024-01-15","value":12.8},{"date":"2024-05-20","value":13.5}],"statistical_analysis":{"min":12.8,"max":14.8,"average":13.82,"standard_deviation":0.87,"trend_direction":"upward","trend_strength":"moderate"},"analysis":{"description":"Hemoglobin measures the amount of oxygen-carrying protein in red blood cells, important for oxygen transport throughout the body.","normalized_unit":"g/dL","significant_variations":"Initially low at 12.8 g/dL (2024-01-15), levels increased to normal range by 2024-05-20 and continued rising to 14.8 g/dL by 2024-12-18.","trend_pattern":"Increasing"},"interpretation":"Hemoglobin measures the amount of oxygen-carrying protein in red blood cells, important for oxygen transport throughout the body."},{"parameter":"White Blood Cells (WBC)","short_name":"White Blood","original_names":["White Blood Cells","WBC"],"category":"Complete Blood Count","unit":"10^9/L","trend_data":[{"date":"2024-01-15","value":6.5},{"date":"2024-05-20","value":7.2}],"statistical_analysis":{"min":6.5,"max":7.2,"average":6.88,"standard_deviation":0.3,"trend_direction":"stable","trend_strength":"mild"},"analysis":{"description":"White blood cell count indicates immune system activity and response to infection or inflammation.","normalized_unit":"10^9/L","significant_variations":"Values remained within normal range across all dates with minor fluctuations between 6.5 and 7.2.","trend_pattern":"Stable"},"interpretation":"White blood cell count indicates immune system activity and response to infection or inflammation."}],"risk_factors":[],"language":"en","sandbox_mode":true},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual processing was performed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v1/nutrition/diet-plan/analyze":{"post":{"operationId":"nutritionAnalyze","tags":["Nutrition"],"summary":"Nutrition Diet AI v1","description":"Generates a nutrition plan, a weekly meal plan and supplement recommendations from blood test parameters and the patient profile. The plan follows `dietary_preferences`, `dietary_restrictions` and `allergies` in every section. Consumes 1 credit.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","language":"en","patient":{"age":45,"gender":"male","weight":82,"height":178,"activity_level":"moderate","conditions":["hypertension"],"medications":["lisinopril"],"allergies":["shellfish"],"meal_frequency":5,"snacks":1},"blood_test":{"parameters":[{"name":"Ferritin","value":18,"unit":"ng/mL","range_min":30,"range_max":400},{"name":"LDL Cholesterol","value":142,"unit":"mg/dL"}]},"health_goals":["heart_health"],"dietary_restrictions":["low_sodium"]}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"analysis_id":"NUT-SANDBOX0","generated_at":"2026-11-30T12:00:00.000000Z","patient_summary":{"age":34,"gender":"female","weight":62,"height":165,"conditions":[],"dietary_preferences":"omnivore"},"nutrition_plan":{"nutrition_summary":{"daily_calories":2046,"macro_distribution":{"protein_g":153,"fat_g":57,"carbs_g":230,"fiber_g":29},"key_focus_areas":["Rebuild iron stores (low ferritin and haemoglobin)","Raise vitamin D into the optimal range"],"primary_recommendations":["Eat a heme-iron source (red meat, poultry, fish or shellfish) at least once a day","Pair plant iron with vitamin C and keep tea and coffee one hour away from meals"]},"weekly_meal_plan":{"monday":{"breakfast":{"main_dish":"Spinach and mushroom omelette (2 eggs) on wholegrain toast","sides":["Orange segments","Cherry tomatoes"],"calories":510,"protein":30,"preparation_time":"15 minutes","cost_estimate":"$3-4"},"morning_snack":{"items":["Pumpkin seeds (30 g)","Kiwi"],"calories":150},"lunch":{"main_dish":"Lentil and vegetable soup","sides":["Wholegrain bread","Red pepper salad with lemon"],"calories":640,"protein":32,"preparation_time":"25 minutes","cost_estimate":"$3-5"},"afternoon_snack":{"items":["Greek yogurt (150 g)","Strawberries"],"calories":150},"dinner":{"main_dish":"Grilled lean beef steak (150 g)","sides":["Roasted sweet potato","Steamed broccoli with lemon"],"calories":600,"protein":45,"preparation_time":"30 minutes","cost_estimate":"$6-8"}}},"food_recommendations":{"power_foods":[{"name":"Lean red meat (beef, lamb)","benefits":"Heme iron is absorbed two to three times better than plant iron and refills ferritin fastest; also supplies B12 and zinc.","serving_size":"120-150 g","frequency":"3 times a week","blood_marker_impact":"Ferritin, Hemoglobin"},{"name":"Mussels and clams","benefits":"Among the richest heme-iron foods, with B12 and omega-3 fats.","serving_size":"100 g (cooked, shelled)","frequency":"Once a week","blood_marker_impact":"Ferritin, Hemoglobin"}],"foods_to_limit":[{"name":"Tea and coffee with meals","reason":"Tannins and polyphenols can cut iron absorption from a meal by more than half.","alternative":"Drink them at least one hour before or after eating; water or rooibos with meals","impact_on_health":"Slows the rebuilding of ferritin"},{"name":"Processed meats (sausages, salami, bacon)","reason":"High in saturated fat and salt, which raise LDL and blood pressure.","alternative":"Grilled chicken, turkey or lean beef","impact_on_health":"Keeps LDL cholesterol high"}],"hydration":{"daily_water":"3.1 L","timing":"A glass on waking, then evenly through the day; less in the hour before bed","special_considerations":"Keep tea and coffee at least one hour away from iron-rich meals"}},"supplement_recommendations":[{"name":"Iron bisglycinate","dosage":"25 mg elemental iron a day","timing":"In the morning on an empty stomach, with vitamin C","reason":"Ferritin 14 ng/mL and haemoglobin 11.8 g/dL show depleted iron stores","duration":"3 months, then retest ferritin","contraindications":"Haemochromatosis; take 2 hours apart from calcium, antacids and thyroid medication","source":"evidence_based","priority":"high","blood_marker_addressed":"Ferritin, Hemoglobin","priority_label":"High","source_label":"Evidence-Based"},{"name":"Vitamin D3","dosage":"2000 IU a day","timing":"With the largest meal of the day","reason":"Vitamin D 18 ng/mL is below the 30 ng/mL threshold","duration":"3 months, then retest","contraindications":"Hypercalcaemia, sarcoidosis","source":"evidence_based","priority":"high","blood_marker_addressed":"Vitamin D (25-OH)","priority_label":"High","source_label":"Evidence-Based"}],"lifestyle_integration":{"meal_prep_tips":["Cook a large pot of lentils or chickpeas on Sunday for three lunches","Keep cut peppers and kiwi ready to add vitamin C to meals"],"shopping_list":{"proteins":["Lean beef","Salmon"],"vegetables":["Spinach","Kale"],"fruits":["Kiwi","Oranges"],"grains":["Oats","Quinoa"],"dairy_alternatives":["Greek yogurt","Kefir"],"pantry_staples":["Lentils","Chickpeas"]},"eating_schedule":{"breakfast":"07:30-08:30","morning_snack":"10:30","lunch":"12:30-13:30","afternoon_snack":"16:00","dinner":"19:00-20:00"},"special_occasions":"When eating out, choose grilled meat or fish with salad, and keep coffee for after the meal."},"monitoring_plan":{"weekly_goals":["Heme iron at least 5 days a week","Oily fish twice a week"],"tracking_metrics":["Energy levels","Fatigue and breathlessness"],"adjustment_signs":["Constipation or stomach upset from the iron supplement","No improvement in energy after 6 weeks"],"follow_up_tests":["Ferritin, iron and haemoglobin in 8-12 weeks","Vitamin D (25-OH) in 3 months"],"expected_improvements":["Ferritin up 15-30 ng/mL within 3 months","Vitamin D above 30 ng/mL within 3 months"]},"educational_insights":{"blood_test_connections":[{"parameter":"Ferritin","current_value":"14 ng/mL","dietary_impact":"Iron stores are low; heme iron and vitamin C with meals refill them fastest.","foods_that_help":["Lean red meat","Mussels"]},{"parameter":"Hemoglobin","current_value":"11.8 g/dL","dietary_impact":"Slightly below range, consistent with iron deficiency; it rises as ferritin recovers.","foods_that_help":["Beef","Spinach with lemon"]}],"nutritional_science":["Heme iron from animal foods is absorbed at 15-35%, plant iron at 2-20%.","Vitamin C turns plant iron into a form the gut absorbs more easily."],"success_strategies":["Plan the week's meals and shop once","Add a vitamin C food to every iron-rich meal"]},"metadata":{"generated_at":"2026-11-30T12:00:00.000000Z","patient_id":"api_f13bc67b","bmr":1320.25,"tdee":2046.39,"nutritional_concerns":["vitamin_d_deficiency","anemia"],"version":"2.2","used_clinic_supplements":false,"clinic_supplements_count":0,"report_language":"english","meal_slots":["breakfast","morning_snack"],"meal_frequency":"3 meals and 2 snacks a day (breakfast, morning snack, lunch, afternoon snack, dinner)","budget":"moderate","api_provider":"KantestiAI Engine","model":"KantestiAI Engine"}},"labels":{"nutrition_summary":"Nutrition Summary","daily_calories":"Daily Calorie Target","macro_distribution":"Macro Distribution","protein_g":"Protein","fat_g":"Fat","carbs_g":"Carbs","fiber_g":"Fiber","key_focus_areas":"Key Focus Areas","primary_recommendations":"Primary Recommendations","weekly_meal_plan":"Weekly Meal Plan","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday","sunday":"Sunday","breakfast":"Breakfast","morning_snack":"Morning Snack","mid_morning_meal":"Mid-Morning Meal","lunch":"Lunch","afternoon_snack":"Afternoon Snack","afternoon_meal":"Afternoon Meal","dinner":"Dinner","evening_snack":"Evening Snack","main_dish":"Main Dish","sides":"Sides","calories":"Calories","protein":"Protein","preparation_time":"Preparation Time","cost_estimate":"Estimated Cost","items":"Items","food_recommendations":"Food Recommendations","power_foods":"Power Foods","name":"Name","benefits":"Benefits","serving_size":"Serving Size","frequency":"Frequency","blood_marker_impact":"Blood Marker Impact","foods_to_limit":"Foods to Limit","reason":"Reason","alternative":"Alternative","impact_on_health":"Impact on Health","hydration":"Hydration","daily_water":"Daily Water","timing":"Timing","special_considerations":"Special Considerations","supplement_recommendations":"Supplement Recommendations","dosage":"Dosage","duration":"Duration","contraindications":"Contraindications","source":"Source","priority":"Priority","blood_marker_addressed":"Blood Marker Addressed","lifestyle_integration":"Lifestyle Integration","meal_prep_tips":"Meal Prep Tips","shopping_list":"Shopping List","proteins":"Proteins","vegetables":"Vegetables","fruits":"Fruits","grains":"Grains","dairy_alternatives":"Dairy Alternatives","pantry_staples":"Pantry Staples","eating_schedule":"Eating Schedule","special_occasions":"Special Occasions","monitoring_plan":"Monitoring Plan","weekly_goals":"Weekly Goals","tracking_metrics":"Tracking Metrics","adjustment_signs":"Adjustment Signs","follow_up_tests":"Follow-up Tests","expected_improvements":"Expected Improvements","educational_insights":"Educational Insights","blood_test_connections":"Blood Test Connections","parameter":"Parameter","current_value":"Current Value","dietary_impact":"Dietary Impact","foods_that_help":"Foods That Help","nutritional_science":"Nutritional Science","success_strategies":"Success Strategies","high":"High","medium":"Medium","low":"Low","clinic_library":"Clinic Library","evidence_based":"Evidence-Based"},"language":"en"},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":1}},"/api/v1/nutrition/diet-plan/sandbox":{"post":{"operationId":"nutritionSandbox","tags":["Sandbox"],"summary":"Nutrition Diet AI v1: sandbox","description":"Returns a sample response in the shape `/analyze` produces. Authentication is required; no quota is consumed and no analysis is performed. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","language":"en","patient":{"age":45,"gender":"male","weight":82,"height":178,"activity_level":"moderate","conditions":["hypertension"],"medications":["lisinopril"],"allergies":["shellfish"],"meal_frequency":5,"snacks":1},"blood_test":{"parameters":[{"name":"Ferritin","value":18,"unit":"ng/mL","range_min":30,"range_max":400},{"name":"LDL Cholesterol","value":142,"unit":"mg/dL"}]},"health_goals":["heart_health"],"dietary_restrictions":["low_sodium"]}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"analysis_id":"NUT-SANDBOX0","generated_at":"2026-11-30T12:00:00.000000Z","patient_summary":{"age":34,"gender":"female","weight":62,"height":165,"conditions":[],"dietary_preferences":"omnivore"},"nutrition_plan":{"nutrition_summary":{"daily_calories":2046,"macro_distribution":{"protein_g":153,"fat_g":57,"carbs_g":230,"fiber_g":29},"key_focus_areas":["Rebuild iron stores (low ferritin and haemoglobin)","Raise vitamin D into the optimal range"],"primary_recommendations":["Eat a heme-iron source (red meat, poultry, fish or shellfish) at least once a day","Pair plant iron with vitamin C and keep tea and coffee one hour away from meals"]},"weekly_meal_plan":{"monday":{"breakfast":{"main_dish":"Spinach and mushroom omelette (2 eggs) on wholegrain toast","sides":["Orange segments","Cherry tomatoes"],"calories":510,"protein":30,"preparation_time":"15 minutes","cost_estimate":"$3-4"},"morning_snack":{"items":["Pumpkin seeds (30 g)","Kiwi"],"calories":150},"lunch":{"main_dish":"Lentil and vegetable soup","sides":["Wholegrain bread","Red pepper salad with lemon"],"calories":640,"protein":32,"preparation_time":"25 minutes","cost_estimate":"$3-5"},"afternoon_snack":{"items":["Greek yogurt (150 g)","Strawberries"],"calories":150},"dinner":{"main_dish":"Grilled lean beef steak (150 g)","sides":["Roasted sweet potato","Steamed broccoli with lemon"],"calories":600,"protein":45,"preparation_time":"30 minutes","cost_estimate":"$6-8"}}},"food_recommendations":{"power_foods":[{"name":"Lean red meat (beef, lamb)","benefits":"Heme iron is absorbed two to three times better than plant iron and refills ferritin fastest; also supplies B12 and zinc.","serving_size":"120-150 g","frequency":"3 times a week","blood_marker_impact":"Ferritin, Hemoglobin"},{"name":"Mussels and clams","benefits":"Among the richest heme-iron foods, with B12 and omega-3 fats.","serving_size":"100 g (cooked, shelled)","frequency":"Once a week","blood_marker_impact":"Ferritin, Hemoglobin"}],"foods_to_limit":[{"name":"Tea and coffee with meals","reason":"Tannins and polyphenols can cut iron absorption from a meal by more than half.","alternative":"Drink them at least one hour before or after eating; water or rooibos with meals","impact_on_health":"Slows the rebuilding of ferritin"},{"name":"Processed meats (sausages, salami, bacon)","reason":"High in saturated fat and salt, which raise LDL and blood pressure.","alternative":"Grilled chicken, turkey or lean beef","impact_on_health":"Keeps LDL cholesterol high"}],"hydration":{"daily_water":"3.1 L","timing":"A glass on waking, then evenly through the day; less in the hour before bed","special_considerations":"Keep tea and coffee at least one hour away from iron-rich meals"}},"supplement_recommendations":[{"name":"Iron bisglycinate","dosage":"25 mg elemental iron a day","timing":"In the morning on an empty stomach, with vitamin C","reason":"Ferritin 14 ng/mL and haemoglobin 11.8 g/dL show depleted iron stores","duration":"3 months, then retest ferritin","contraindications":"Haemochromatosis; take 2 hours apart from calcium, antacids and thyroid medication","source":"evidence_based","priority":"high","blood_marker_addressed":"Ferritin, Hemoglobin","priority_label":"High","source_label":"Evidence-Based"},{"name":"Vitamin D3","dosage":"2000 IU a day","timing":"With the largest meal of the day","reason":"Vitamin D 18 ng/mL is below the 30 ng/mL threshold","duration":"3 months, then retest","contraindications":"Hypercalcaemia, sarcoidosis","source":"evidence_based","priority":"high","blood_marker_addressed":"Vitamin D (25-OH)","priority_label":"High","source_label":"Evidence-Based"}],"lifestyle_integration":{"meal_prep_tips":["Cook a large pot of lentils or chickpeas on Sunday for three lunches","Keep cut peppers and kiwi ready to add vitamin C to meals"],"shopping_list":{"proteins":["Lean beef","Salmon"],"vegetables":["Spinach","Kale"],"fruits":["Kiwi","Oranges"],"grains":["Oats","Quinoa"],"dairy_alternatives":["Greek yogurt","Kefir"],"pantry_staples":["Lentils","Chickpeas"]},"eating_schedule":{"breakfast":"07:30-08:30","morning_snack":"10:30","lunch":"12:30-13:30","afternoon_snack":"16:00","dinner":"19:00-20:00"},"special_occasions":"When eating out, choose grilled meat or fish with salad, and keep coffee for after the meal."},"monitoring_plan":{"weekly_goals":["Heme iron at least 5 days a week","Oily fish twice a week"],"tracking_metrics":["Energy levels","Fatigue and breathlessness"],"adjustment_signs":["Constipation or stomach upset from the iron supplement","No improvement in energy after 6 weeks"],"follow_up_tests":["Ferritin, iron and haemoglobin in 8-12 weeks","Vitamin D (25-OH) in 3 months"],"expected_improvements":["Ferritin up 15-30 ng/mL within 3 months","Vitamin D above 30 ng/mL within 3 months"]},"educational_insights":{"blood_test_connections":[{"parameter":"Ferritin","current_value":"14 ng/mL","dietary_impact":"Iron stores are low; heme iron and vitamin C with meals refill them fastest.","foods_that_help":["Lean red meat","Mussels"]},{"parameter":"Hemoglobin","current_value":"11.8 g/dL","dietary_impact":"Slightly below range, consistent with iron deficiency; it rises as ferritin recovers.","foods_that_help":["Beef","Spinach with lemon"]}],"nutritional_science":["Heme iron from animal foods is absorbed at 15-35%, plant iron at 2-20%.","Vitamin C turns plant iron into a form the gut absorbs more easily."],"success_strategies":["Plan the week's meals and shop once","Add a vitamin C food to every iron-rich meal"]},"metadata":{"generated_at":"2026-11-30T12:00:00.000000Z","patient_id":"api_f13bc67b","bmr":1320.25,"tdee":2046.39,"nutritional_concerns":["vitamin_d_deficiency","anemia"],"version":"2.2","used_clinic_supplements":false,"clinic_supplements_count":0,"report_language":"english","meal_slots":["breakfast","morning_snack"],"meal_frequency":"3 meals and 2 snacks a day (breakfast, morning snack, lunch, afternoon snack, dinner)","budget":"moderate","api_provider":"KantestiAI Engine","model":"KantestiAI Engine"}},"labels":{"nutrition_summary":"Nutrition Summary","daily_calories":"Daily Calorie Target","macro_distribution":"Macro Distribution","protein_g":"Protein","fat_g":"Fat","carbs_g":"Carbs","fiber_g":"Fiber","key_focus_areas":"Key Focus Areas","primary_recommendations":"Primary Recommendations","weekly_meal_plan":"Weekly Meal Plan","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday","sunday":"Sunday","breakfast":"Breakfast","morning_snack":"Morning Snack","mid_morning_meal":"Mid-Morning Meal","lunch":"Lunch","afternoon_snack":"Afternoon Snack","afternoon_meal":"Afternoon Meal","dinner":"Dinner","evening_snack":"Evening Snack","main_dish":"Main Dish","sides":"Sides","calories":"Calories","protein":"Protein","preparation_time":"Preparation Time","cost_estimate":"Estimated Cost","items":"Items","food_recommendations":"Food Recommendations","power_foods":"Power Foods","name":"Name","benefits":"Benefits","serving_size":"Serving Size","frequency":"Frequency","blood_marker_impact":"Blood Marker Impact","foods_to_limit":"Foods to Limit","reason":"Reason","alternative":"Alternative","impact_on_health":"Impact on Health","hydration":"Hydration","daily_water":"Daily Water","timing":"Timing","special_considerations":"Special Considerations","supplement_recommendations":"Supplement Recommendations","dosage":"Dosage","duration":"Duration","contraindications":"Contraindications","source":"Source","priority":"Priority","blood_marker_addressed":"Blood Marker Addressed","lifestyle_integration":"Lifestyle Integration","meal_prep_tips":"Meal Prep Tips","shopping_list":"Shopping List","proteins":"Proteins","vegetables":"Vegetables","fruits":"Fruits","grains":"Grains","dairy_alternatives":"Dairy Alternatives","pantry_staples":"Pantry Staples","eating_schedule":"Eating Schedule","special_occasions":"Special Occasions","monitoring_plan":"Monitoring Plan","weekly_goals":"Weekly Goals","tracking_metrics":"Tracking Metrics","adjustment_signs":"Adjustment Signs","follow_up_tests":"Follow-up Tests","expected_improvements":"Expected Improvements","educational_insights":"Educational Insights","blood_test_connections":"Blood Test Connections","parameter":"Parameter","current_value":"Current Value","dietary_impact":"Dietary Impact","foods_that_help":"Foods That Help","nutritional_science":"Nutritional Science","success_strategies":"Success Strategies","high":"High","medium":"Medium","low":"Low","clinic_library":"Clinic Library","evidence_based":"Evidence-Based"},"language":"en","sandbox_mode":true},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual processing was performed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v1/bloodtest/comparison/analyze":{"post":{"operationId":"comparisonAnalyze","tags":["Comparison"],"summary":"AI Blood Test Comparison v1","description":"Compares 2 to 20 blood tests and returns an AI narrative of what changed. Each test needs `lab_date` or `results_date`, and the tests need at least one parameter in common. Consumes 1 credit.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","language":"en","blood_tests":[{"lab_date":"2024-06-15","parameters":[{"name":"Hemoglobin","value":12.2,"unit":"g/dL"},{"name":"Fasting Glucose","value":108,"unit":"mg/dL"}]},{"lab_date":"2024-12-15","parameters":[{"name":"Hemoglobin","value":14.5,"unit":"g/dL"},{"name":"Fasting Glucose","value":94,"unit":"mg/dL"}]}]}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"comparison_id":"CMP-SANDBOX0","generated_at":"2026-11-30T12:00:00.000000Z","tests_compared":2,"date_range":{"earliest":"2024-06-15","latest":"2024-12-15","span_days":183},"comparison_summary":{"key_findings":["Hemoglobin and RBC levels normalized indicating resolution of anemia","Improved lipid profile with cholesterol, LDL, HDL, and triglycerides in normal range"],"overall_trend":"improved","report1_date":"2024-06-15","report2_date":"2024-12-15","time_interval":"183 days between reports"},"summary":{"improved_parameters":13,"worsened_parameters":0,"stable_parameters":0,"overall_trend":"improved"},"parameter_analysis":[{"parameter_name":"Hemoglobin","report1_value":"12.2 g/dL","report2_value":"14.5 g/dL","change_type":"increased","change_magnitude":"significant","trend_assessment":"positive","clinical_significance":"Correction of anemia likely due to improved iron status or treatment"},{"parameter_name":"Red Blood Cells","report1_value":"4.2 10^12/L","report2_value":"4.8 10^12/L","change_type":"increased","change_magnitude":"moderate","trend_assessment":"positive","clinical_significance":"Improved erythropoiesis consistent with hemoglobin improvement"}],"health_assessment":{"overall_health_trend":"improved","positive_developments":["Normalized hemoglobin and RBC counts","Improved cardiovascular risk markers"],"areas_of_improvement":["Anemia correction","Metabolic and lipid profile normalization"],"areas_of_concern":[],"risk_factors":["Previous iron deficiency anemia","Prior dyslipidemia"]},"detailed_interpretation":{"sections":[{"title":"Executive Summary","content":"The patient shows marked improvement in anemia, lipid profile, glucose control, and vitamin levels over six months."},{"title":"Significant Changes Analysis","content":"Hemoglobin and RBC increased to normal, indicating anemia resolution. Lipids improved with cholesterol and triglycerides normalized. Vitamin D and iron stores replenished."}]},"recommendations":{"immediate_actions":["Continue iron and vitamin D supplementation as needed","Maintain glucose monitoring to prevent diabetes"],"lifestyle_modifications":["Adopt heart-healthy diet to sustain lipid improvements","Regular physical activity to support metabolic health"],"follow_up_tests":["Repeat CBC and iron studies in 3 months","Lipid panel and glucose markers in 3 months"],"specialist_referrals":["Consult hematologist if anemia recurs","Endocrinologist referral if glucose control worsens"],"monitoring_frequency":"3 months"},"language":"en"},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":1}},"/api/v1/bloodtest/comparison/sandbox":{"post":{"operationId":"comparisonSandbox","tags":["Sandbox"],"summary":"AI Blood Test Comparison v1: sandbox","description":"Returns a sample response in the shape `/analyze` produces. Authentication is required; no quota is consumed and no analysis is performed. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","language":"en","blood_tests":[{"lab_date":"2024-06-15","parameters":[{"name":"Hemoglobin","value":12.2,"unit":"g/dL"},{"name":"Fasting Glucose","value":108,"unit":"mg/dL"}]},{"lab_date":"2024-12-15","parameters":[{"name":"Hemoglobin","value":14.5,"unit":"g/dL"},{"name":"Fasting Glucose","value":94,"unit":"mg/dL"}]}]}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"comparison_id":"CMP-SANDBOX0","generated_at":"2026-11-30T12:00:00.000000Z","tests_compared":2,"date_range":{"earliest":"2024-06-15","latest":"2024-12-15","span_days":183},"comparison_summary":{"key_findings":["Hemoglobin and RBC levels normalized indicating resolution of anemia","Improved lipid profile with cholesterol, LDL, HDL, and triglycerides in normal range"],"overall_trend":"improved","report1_date":"2024-06-15","report2_date":"2024-12-15","time_interval":"183 days between reports"},"summary":{"improved_parameters":13,"worsened_parameters":0,"stable_parameters":0,"overall_trend":"improved"},"parameter_analysis":[{"parameter_name":"Hemoglobin","report1_value":"12.2 g/dL","report2_value":"14.5 g/dL","change_type":"increased","change_magnitude":"significant","trend_assessment":"positive","clinical_significance":"Correction of anemia likely due to improved iron status or treatment"},{"parameter_name":"Red Blood Cells","report1_value":"4.2 10^12/L","report2_value":"4.8 10^12/L","change_type":"increased","change_magnitude":"moderate","trend_assessment":"positive","clinical_significance":"Improved erythropoiesis consistent with hemoglobin improvement"}],"health_assessment":{"overall_health_trend":"improved","positive_developments":["Normalized hemoglobin and RBC counts","Improved cardiovascular risk markers"],"areas_of_improvement":["Anemia correction","Metabolic and lipid profile normalization"],"areas_of_concern":[],"risk_factors":["Previous iron deficiency anemia","Prior dyslipidemia"]},"detailed_interpretation":{"sections":[{"title":"Executive Summary","content":"The patient shows marked improvement in anemia, lipid profile, glucose control, and vitamin levels over six months."},{"title":"Significant Changes Analysis","content":"Hemoglobin and RBC increased to normal, indicating anemia resolution. Lipids improved with cholesterol and triglycerides normalized. Vitamin D and iron stores replenished."}]},"recommendations":{"immediate_actions":["Continue iron and vitamin D supplementation as needed","Maintain glucose monitoring to prevent diabetes"],"lifestyle_modifications":["Adopt heart-healthy diet to sustain lipid improvements","Regular physical activity to support metabolic health"],"follow_up_tests":["Repeat CBC and iron studies in 3 months","Lipid panel and glucose markers in 3 months"],"specialist_referrals":["Consult hematologist if anemia recurs","Endocrinologist referral if glucose control worsens"],"monitoring_frequency":"3 months"},"language":"en","sandbox_mode":true},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual processing was performed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v1/family-health/analyze":{"post":{"operationId":"familyHealthAnalyze","tags":["Family Health"],"summary":"Family Health Risk Assessment v1","description":"Hereditary risk report from family medical history, the patient profile and optional blood test data. `family_members` or `health_profile` is required. Consumes 1 credit.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamilyHealthRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","patient_data":{"age":42,"gender":"female"},"family_members":[{"relation":"father","age":70,"conditions":["hypertension","type 2 diabetes"]},{"relation":"mother","conditions":["breast cancer"],"age_at_diagnosis":52}],"language":"en"}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"report_data":{"report_id":"FHR-SANDBOX0","generated_at":"2026-11-30T12:00:00.000000Z","patient":{"name":"Jane Sample","age":42,"gender":"female","dob":"1982-06-15"},"family_members":[{"relation":"father","age":70,"conditions":["hypertension","type2_diabetes"],"deceased":false},{"relation":"mother","age":67,"conditions":["breast_cancer","osteoporosis"],"deceased":false}],"risk_assessment":{"overall_risk_level":"moderate","cardiovascular_risk":{"level":"moderate-high","score":65,"factors":["paternal hypertension","paternal diabetes"],"recommendations":["Regular blood pressure monitoring","Annual lipid panel"]},"cancer_risk":{"level":"moderate","score":50,"factors":["maternal breast cancer history"],"recommendations":["Annual mammogram starting at age 40","Consider genetic counseling for BRCA testing"]},"metabolic_risk":{"level":"moderate-high","score":60,"factors":["paternal type 2 diabetes","family history of high cholesterol"],"recommendations":["Annual fasting glucose and HbA1c screening","Mediterranean or low-glycemic diet"]},"bone_health_risk":{"level":"moderate","score":45,"factors":["maternal osteoporosis","female gender"],"recommendations":["Adequate calcium and vitamin D intake","Weight-bearing exercise"]}},"preventive_screenings":[{"test":"Blood Pressure","frequency":"Every 6 months","priority":"high"},{"test":"Fasting Glucose","frequency":"Annually","priority":"high"}],"lifestyle_recommendations":["Adopt a heart-healthy diet rich in fruits, vegetables, and whole grains","Engage in at least 150 minutes of moderate aerobic activity per week"],"genetic_considerations":["Family history suggests potential hereditary cardiovascular risk factors","Consider genetic counseling given maternal breast cancer history"],"summary":"Based on your family history, you have a moderate overall health risk with elevated cardiovascular and metabolic risk factors. Proactive screening and lifestyle modifications are strongly recommended.","language":"en","sandbox_mode":true}},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":1}},"/api/v1/family-health/sandbox/analyze":{"post":{"operationId":"familyHealthSandbox","tags":["Sandbox"],"summary":"Family Health Risk Assessment v1: sandbox","description":"Returns a sample response in the shape `/analyze` produces. Authentication is required; no quota is consumed and no analysis is performed. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","patient_data":{"age":42,"gender":"female"},"family_members":[{"relation":"father","age":70,"conditions":["hypertension","type 2 diabetes"]},{"relation":"mother","conditions":["breast cancer"],"age_at_diagnosis":52}],"language":"en"}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"report_data":{"report_id":"FHR-SANDBOX0","generated_at":"2026-11-30T12:00:00.000000Z","patient":{"name":"Jane Sample","age":42,"gender":"female","dob":"1982-06-15"},"family_members":[{"relation":"father","age":70,"conditions":["hypertension","type2_diabetes"],"deceased":false},{"relation":"mother","age":67,"conditions":["breast_cancer","osteoporosis"],"deceased":false}],"risk_assessment":{"overall_risk_level":"moderate","cardiovascular_risk":{"level":"moderate-high","score":65,"factors":["paternal hypertension","paternal diabetes"],"recommendations":["Regular blood pressure monitoring","Annual lipid panel"]},"cancer_risk":{"level":"moderate","score":50,"factors":["maternal breast cancer history"],"recommendations":["Annual mammogram starting at age 40","Consider genetic counseling for BRCA testing"]},"metabolic_risk":{"level":"moderate-high","score":60,"factors":["paternal type 2 diabetes","family history of high cholesterol"],"recommendations":["Annual fasting glucose and HbA1c screening","Mediterranean or low-glycemic diet"]},"bone_health_risk":{"level":"moderate","score":45,"factors":["maternal osteoporosis","female gender"],"recommendations":["Adequate calcium and vitamin D intake","Weight-bearing exercise"]}},"preventive_screenings":[{"test":"Blood Pressure","frequency":"Every 6 months","priority":"high"},{"test":"Fasting Glucose","frequency":"Annually","priority":"high"}],"lifestyle_recommendations":["Adopt a heart-healthy diet rich in fruits, vegetables, and whole grains","Engage in at least 150 minutes of moderate aerobic activity per week"],"genetic_considerations":["Family history suggests potential hereditary cardiovascular risk factors","Consider genetic counseling given maternal breast cancer history"],"summary":"Based on your family history, you have a moderate overall health risk with elevated cardiovascular and metabolic risk factors. Proactive screening and lifestyle modifications are strongly recommended.","language":"en","sandbox_mode":true}},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0","message":"Sandbox family health risk assessment report generated successfully","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual processing was performed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v1/family-health/validate":{"post":{"operationId":"familyHealthValidate","tags":["Family Health"],"summary":"Family Health Risk Assessment v1: validate","description":"Checks a payload without running the analysis. Authentication is required; no quota is consumed.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamilyHealthRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","patient_data":{"age":42,"gender":"female"},"family_members":[{"relation":"father","age":70,"conditions":["hypertension","type 2 diabetes"]},{"relation":"mother","conditions":["breast cancer"],"age_at_diagnosis":52}],"language":"en"}}}},"responses":{"200":{"description":"Validation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"validation":{"valid":true,"data_validation":{"valid":true,"error":null},"language_valid":true}},"message":"Validation completed","timestamp":"2026-03-23T10:30:00Z","api_version":"1.0.0"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":0}},"/api/v1/family-health/supported-languages":{"get":{"operationId":"familyHealthLanguages","tags":["Family Health"],"summary":"Supported languages","description":"All supported language codes and names. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/v1/family-health/condition-categories":{"get":{"operationId":"familyHealthConditionCategories","tags":["Family Health"],"summary":"Condition categories","description":"The 9 condition categories with their conditions. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/v1/family-health/family-relations":{"get":{"operationId":"familyHealthRelations","tags":["Family Health"],"summary":"Family relation types","description":"The 14 supported family relation types. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/v1/body-map/analyze":{"post":{"operationId":"bodyMapAnalyze","tags":["Body Map"],"summary":"Body Map v1","description":"Places every out-of-range and borderline result of a laboratory panel on one of 13 body regions. Deterministic by default. Consumes 1 credit per successful request; a request that fails validation, or whose flagged markers cannot be placed, is not charged. `body_map.fallback_url` answers 503 with `Retry-After` while the illustration is still being produced.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BodyMapRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","parameters":[{"short_name":"ALT","long_name":"Alanine aminotransferase","result":"65","unit":"U/L","range_normal_min":7,"range_normal_max":45,"evaluation":"high"},{"short_name":"AST","long_name":"Aspartate aminotransferase","result":"48","unit":"U/L","range_normal_min":8,"range_normal_max":40,"evaluation":"slightly_high"},{"short_name":"TSH","long_name":"Thyrotropin","result":"6.2","unit":"mIU/L","range_normal_min":0.4,"range_normal_max":4,"evaluation":"high"}]}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"body_map":{"v":4,"spec":"v4-thy2-liv2-kid1-bld2","unmapped":0,"image_url":"/static/body_maps/v4-thy2-liv2-kid1-bld2.webp","fallback_url":"/body-map/v4-thy2-liv2-kid1-bld2.0123456789abcdef.webp","regions":[{"key":"thyroid","level":2,"drawn":true,"markers":["TSH"]},{"key":"heart_vessels","level":1,"drawn":true,"markers":["LDL Cholesterol"]}]},"engine_version":4,"region_keys":["brain_nerves","thyroid"],"mode":"deterministic","all_clear":false},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":1}},"/api/v1/body-map/sandbox":{"post":{"operationId":"bodyMapSandbox","tags":["Sandbox"],"summary":"Body Map v1: sandbox","description":"Returns a sample response in the shape `/analyze` produces. Authentication is required; no quota is consumed and no analysis is performed. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","parameters":[{"short_name":"ALT","long_name":"Alanine aminotransferase","result":"65","unit":"U/L","range_normal_min":7,"range_normal_max":45,"evaluation":"high"},{"short_name":"AST","long_name":"Aspartate aminotransferase","result":"48","unit":"U/L","range_normal_min":8,"range_normal_max":40,"evaluation":"slightly_high"},{"short_name":"TSH","long_name":"Thyrotropin","result":"6.2","unit":"mIU/L","range_normal_min":0.4,"range_normal_max":4,"evaluation":"high"}]}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"body_map":{"v":4,"spec":"v4-thy2-liv2-kid1-bld2","unmapped":0,"image_url":"/static/body_maps/v4-thy2-liv2-kid1-bld2.webp","fallback_url":"/body-map/v4-thy2-liv2-kid1-bld2.0123456789abcdef.webp","regions":[{"key":"thyroid","level":2,"drawn":true,"markers":["TSH"]},{"key":"heart_vessels","level":1,"drawn":true,"markers":["LDL Cholesterol"]}]},"engine_version":4,"region_keys":["brain_nerves","thyroid"],"mode":"deterministic","all_clear":false,"sandbox_mode":true},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0","message":"Sandbox body map returned successfully","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual analysis was performed and no quota was consumed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v1/body-map/validate":{"post":{"operationId":"bodyMapValidate","tags":["Body Map"],"summary":"Body Map v1: validate","description":"Checks a payload without running the analysis and reports which analyte names the engine recognises. Authentication is required; no quota is consumed, and it keeps working on an account with no credit left.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BodyMapRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","parameters":[{"short_name":"ALT","long_name":"Alanine aminotransferase","result":"65","unit":"U/L","range_normal_min":7,"range_normal_max":45,"evaluation":"high"},{"short_name":"AST","long_name":"Aspartate aminotransferase","result":"48","unit":"U/L","range_normal_min":8,"range_normal_max":40,"evaluation":"slightly_high"},{"short_name":"TSH","long_name":"Thyrotropin","result":"6.2","unit":"mIU/L","range_normal_min":0.4,"range_normal_max":4,"evaluation":"high"}]}}}},"responses":{"200":{"description":"Validation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","api_version":"1.0.0","message":"Payload is valid","data":{"valid":true,"errors":[],"parameter_count":2,"flagged_count":2,"recognised":[{"name":"ALT","region":"liver","level":2}],"unrecognised":[{"name":"Unobtainium","region":null,"level":2}]},"timestamp":"2026-09-18T10:30:00Z"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":0}},"/api/v1/body-map/regions":{"get":{"operationId":"bodyMapRegions","tags":["Body Map"],"summary":"Body regions","description":"The 13 body regions in canonical order, with the severity levels. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"examples":{"example":{"value":{"status":"success","data":{"regions":[{"key":"brain_nerves","code":"brn","order":0},{"key":"thyroid","code":"thy","order":1},{"key":"heart_vessels","code":"hrt","order":2},{"key":"liver","code":"liv","order":3}],"region_keys":["brain_nerves","thyroid","heart_vessels","liver","pancreas","adrenals","kidneys","gut","reproductive","blood","immune","bones","muscles"],"levels":{"0":"within range — not shown","1":"borderline (slightly high / slightly low)","2":"out of range (high / low / abnormal)"},"count":13}}}}}}}},"x-kantesti-credits":0}},"/api/v1/body-map/info":{"get":{"operationId":"bodyMapInfo","tags":["Body Map"],"summary":"Capability metadata","description":"Whether the engine is enabled, request limits, authentication scheme and endpoint list. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/v1/blood-age/analyze":{"post":{"operationId":"bloodAgeAnalyze","tags":["Biological Blood Age"],"summary":"Biological Blood Age v1","description":"Computes PhenoAge biological blood age and up to 18 derived clinical indices from a laboratory panel. Send a chronological age (`metadata.patient_age`, `patient.age` or `patient.dob`); without one the result is `status: \"missing_age\"`. Consumes 1 credit per successful request.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodAgeRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","metadata":{"patient_age":"40","patient_sex":"Male"},"parameters":[{"short_name":"MCV","result":90,"unit":"fL"},{"short_name":"WBC","result":6,"unit":"10^9/L"},{"short_name":"Lymphocytes","result":30,"unit":"%"}]}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"blood_age":{"version":1,"age":{"status":"ok","source":"formula","chrono":40,"pheno":35.1,"delta":-4.9,"sex":"m","found":["albumin","creatinine"],"missing":[],"labels":{"albumin":"Albumin","creatinine":"Creatinine","glucose":"Glucose","crp":"CRP","lymph":"Lymphocytes","mcv":"MCV","rdw":"RDW","alp":"ALP","wbc":"WBC"},"inputs":{"albumin":44,"creatinine":79.56,"glucose":5,"crp":1,"lymph":30,"mcv":90,"rdw":13,"alp":70,"wbc":6}},"indices":[{"key":"non_hdl","group":"heart_vessels","value":130,"unit":"mg/dL","band":"borderline","from":["Cholesterol","HDL"]},{"key":"tyg","group":"pancreas","value":8.4,"unit":"","band":"ok","from":["Triglycerides","Glucose"]}]},"engine_version":1,"mode":"deterministic","summary":{"status":"ok","source":"formula","chronological_age":40,"biological_age":35.1,"delta_years":-4.9,"sex":"m","markers_found":9,"markers_missing":[],"indices_count":5}},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":1}},"/api/v1/blood-age/sandbox":{"post":{"operationId":"bloodAgeSandbox","tags":["Sandbox"],"summary":"Biological Blood Age v1: sandbox","description":"Returns a sample response in the shape `/analyze` produces. Authentication is required; no quota is consumed and no analysis is performed. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","metadata":{"patient_age":"40","patient_sex":"Male"},"parameters":[{"short_name":"MCV","result":90,"unit":"fL"},{"short_name":"WBC","result":6,"unit":"10^9/L"},{"short_name":"Lymphocytes","result":30,"unit":"%"}]}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"blood_age":{"version":1,"age":{"status":"ok","source":"formula","chrono":40,"pheno":35.1,"delta":-4.9,"sex":"m","found":["albumin","creatinine"],"missing":[],"labels":{"albumin":"Albumin","creatinine":"Creatinine","glucose":"Glucose","crp":"CRP","lymph":"Lymphocytes","mcv":"MCV","rdw":"RDW","alp":"ALP","wbc":"WBC"},"inputs":{"albumin":44,"creatinine":79.56,"glucose":5,"crp":1,"lymph":30,"mcv":90,"rdw":13,"alp":70,"wbc":6}},"indices":[{"key":"non_hdl","group":"heart_vessels","value":130,"unit":"mg/dL","band":"borderline","from":["Cholesterol","HDL"]},{"key":"tyg","group":"pancreas","value":8.4,"unit":"","band":"ok","from":["Triglycerides","Glucose"]}]},"engine_version":1,"mode":"deterministic","summary":{"status":"ok","source":"formula","chronological_age":40,"biological_age":35.1,"delta_years":-4.9,"sex":"m","markers_found":9,"markers_missing":[],"indices_count":5},"sandbox_mode":true},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0","message":"Sandbox blood age returned successfully","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual analysis was performed and no quota was consumed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v1/blood-age/validate":{"post":{"operationId":"bloodAgeValidate","tags":["Biological Blood Age"],"summary":"Biological Blood Age v1: validate","description":"Checks a payload without running the analysis and reports which of the nine PhenoAge markers the panel supplies. Authentication is required; no quota is consumed.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BloodAgeRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","metadata":{"patient_age":"40","patient_sex":"Male"},"parameters":[{"short_name":"MCV","result":90,"unit":"fL"},{"short_name":"WBC","result":6,"unit":"10^9/L"},{"short_name":"Lymphocytes","result":30,"unit":"%"}]}}}},"responses":{"200":{"description":"Validation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","api_version":"1.0.0","message":"Payload is valid","data":{"valid":true,"errors":[],"parameter_count":3,"looks_like_blood_panel":true,"chronological_age":40,"sex":"m","phenoage_markers_found":["lymph","mcv","wbc"],"phenoage_markers_missing":["albumin","creatinine","glucose","crp","rdw","alp"],"expected_source":"partial","recognised_markers":["lymph_pct","mcv","wbc"]},"timestamp":"2026-09-18T10:30:00Z"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":0}},"/api/v1/blood-age/biomarkers":{"get":{"operationId":"bloodAgeBiomarkers","tags":["Biological Blood Age"],"summary":"Readable markers","description":"The nine PhenoAge inputs, every marker the engine reads with its target unit, and the age range of the formula. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"examples":{"example":{"value":{"status":"success","data":{"phenoage_inputs":["albumin","creatinine","glucose","crp","lymph","mcv","rdw","alp","wbc"],"phenoage_age_range":{"min":18,"max":100},"markers":[{"key":"albumin","target_unit":"g/l"},{"key":"alp","target_unit":"u/l"},{"key":"alt","target_unit":"u/l"}],"marker_count":33,"name_matching":"Markers are matched by the analyte name your laboratory printed, in any of the supported report languages. You never send these keys."}}}}}}}},"x-kantesti-credits":0}},"/api/v1/blood-age/info":{"get":{"operationId":"bloodAgeInfo","tags":["Biological Blood Age"],"summary":"Capability metadata","description":"Whether the engine is enabled, the two modes, request limits and supported languages. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/v1/dna-interpretation/analyze":{"post":{"operationId":"dnaInterpretationAnalyze","tags":["DNA Health"],"summary":"DNA Test Interpretation v1","description":"Interprets one DNA test and returns a genetic health report. Send a file as `multipart/form-data`, or pasted genotype lines as JSON. An unreadable upload is answered at once with 400 and costs nothing. An AI report usually takes one to three minutes: prefer `?async=1`.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"maxItems":6,"description":"One raw genotype file (.txt, .csv, .tsv, .vcf, .zip, .gz, up to 80 MB) or up to 6 report files (PDF up to 20 MB, JPG/PNG up to 10 MB each). Send either `file` or `genotype_text`.","items":{"type":"string","format":"binary"}},"genotype_text":{"type":"string","description":"Pasted genotype lines (rsID, chromosome, position, genotype).","maxLength":2000000},"language":{"$ref":"#/components/schemas/Language"},"patient":{"type":"string","description":"The patient object as a JSON string, e.g. `{\"age\": 41, \"sex\": \"female\"}`."},"source_label":{"type":"string","description":"Your own name for the source.","maxLength":120}}}},"application/json":{"schema":{"$ref":"#/components/schemas/DnaInterpretationRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","genotype_text":"rs1801133\t1\t11856378\tAG\nrs4244285\t10\t96541616\tGA","language":"en","patient":{"age":41,"sex":"female","medications":"clopidogrel"}}}}},"responses":{"200":{"description":"Genetic health report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"analysis_id":"DNA-SANDBOX000","module":"dna_interpretation","generated_at":"2026-11-30T12:00:00.000000Z","language":"en","source":{"kind":"raw","format":"23andme","build":"GRCh37","total_records":638463,"called":631022,"panel_total":271,"panel_found":238,"filename":"sample.txt"},"report":{"report_type":"dna","title":"Genetic health report (sample)","executive_summary":"Sample data. Array genotyping with good coverage of the clinical panel. One cardiovascular marker and two nutrient-metabolism markers deserve follow-up.","data_quality":{"source":"23andMe v5 raw file","markers_analyzed":238,"coverage_note":"238 of 271 panel markers called.","limitations":"Array data, not sequencing."},"overall_assessment":{"level":"slightly_elevated","summary":"Mostly typical findings with a few actionable ones."},"sections":[{"key":"nutrigenomics","title":"Nutrient metabolism","summary":"Reduced folate cycle activity and lower vitamin D binding protein.","risk_level":"slightly_elevated","findings":[{"gene":"MTHFR","rsid":"rs1801133","genotype":"AG","phenotype":"C677T heterozygous","risk_level":"slightly_elevated","evidence":"established","explanation":"About 65% of typical enzyme activity.","recommendation":"Check homocysteine."},{"gene":"GC","rsid":"rs2282679","genotype":"GT","phenotype":"Lower vitamin D binding","risk_level":"informational","evidence":"probable","explanation":"Associated with lower 25-OH vitamin D.","recommendation":"Measure 25-OH vitamin D."}]}],"disease_risks":[],"carrier_status":[],"pharmacogenomics":[{"gene":"CYP2C19","rsids":["rs4244285"],"predicted_phenotype":"Intermediate metabolizer","affected_drugs":["clopidogrel","omeprazole"],"recommendation":"Review before prescribing clopidogrel."}],"nutrigenomics":[{"nutrient":"Folate","genes":["MTHFR"],"finding":"Reduced conversion.","recommendation":"Folate-rich diet; consider methylfolate."}],"traits":[],"lifestyle_recommendations":["Daily leafy greens","Regular sun exposure within safe limits"],"recommended_tests":[{"test":"Homocysteine","reason":"MTHFR C677T"}],"red_flags":[],"limitations":"Consumer arrays miss rare variants.","disclaimer":"AI-generated clinical decision support for clinician review; not a diagnosis."}},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":1}},"/api/v1/dna-interpretation/validate":{"post":{"operationId":"dnaInterpretationValidate","tags":["DNA Health"],"summary":"DNA Test Interpretation v1: validate","description":"Parses the upload exactly like `/analyze` and reports what was found, without an AI call. No credit is consumed.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"maxItems":6,"description":"One raw genotype file (.txt, .csv, .tsv, .vcf, .zip, .gz, up to 80 MB) or up to 6 report files (PDF up to 20 MB, JPG/PNG up to 10 MB each). Send either `file` or `genotype_text`.","items":{"type":"string","format":"binary"}},"genotype_text":{"type":"string","description":"Pasted genotype lines (rsID, chromosome, position, genotype).","maxLength":2000000},"language":{"$ref":"#/components/schemas/Language"},"patient":{"type":"string","description":"The patient object as a JSON string, e.g. `{\"age\": 41, \"sex\": \"female\"}`."},"source_label":{"type":"string","description":"Your own name for the source.","maxLength":120}}}},"application/json":{"schema":{"$ref":"#/components/schemas/DnaInterpretationRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","genotype_text":"rs1801133\t1\t11856378\tAG\nrs4244285\t10\t96541616\tGA","language":"en","patient":{"age":41,"sex":"female","medications":"clopidogrel"}}}}},"responses":{"200":{"description":"Validation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","message":"Payload is valid","data":{"valid":true,"language":"en","source":{"kind":"raw","format":"ancestrydna","build":"GRCh37","panel_total":334,"panel_found":287,"warnings":[]}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":0}},"/api/v1/dna-interpretation/sandbox":{"post":{"operationId":"dnaInterpretationSandbox","tags":["Sandbox"],"summary":"DNA Test Interpretation v1: sandbox","description":"Sample genetic report in the shape `/analyze` produces. Authentication is required; no credit is consumed. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","language":"en"}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"analysis_id":"DNA-SANDBOX000","module":"dna_interpretation","generated_at":"2026-11-30T12:00:00.000000Z","language":"en","source":{"kind":"raw","format":"23andme","build":"GRCh37","total_records":638463,"called":631022,"panel_total":271,"panel_found":238,"filename":"sample.txt"},"report":{"report_type":"dna","title":"Genetic health report (sample)","executive_summary":"Sample data. Array genotyping with good coverage of the clinical panel. One cardiovascular marker and two nutrient-metabolism markers deserve follow-up.","data_quality":{"source":"23andMe v5 raw file","markers_analyzed":238,"coverage_note":"238 of 271 panel markers called.","limitations":"Array data, not sequencing."},"overall_assessment":{"level":"slightly_elevated","summary":"Mostly typical findings with a few actionable ones."},"sections":[{"key":"nutrigenomics","title":"Nutrient metabolism","summary":"Reduced folate cycle activity and lower vitamin D binding protein.","risk_level":"slightly_elevated","findings":[{"gene":"MTHFR","rsid":"rs1801133","genotype":"AG","phenotype":"C677T heterozygous","risk_level":"slightly_elevated","evidence":"established","explanation":"About 65% of typical enzyme activity.","recommendation":"Check homocysteine."},{"gene":"GC","rsid":"rs2282679","genotype":"GT","phenotype":"Lower vitamin D binding","risk_level":"informational","evidence":"probable","explanation":"Associated with lower 25-OH vitamin D.","recommendation":"Measure 25-OH vitamin D."}]}],"disease_risks":[],"carrier_status":[],"pharmacogenomics":[{"gene":"CYP2C19","rsids":["rs4244285"],"predicted_phenotype":"Intermediate metabolizer","affected_drugs":["clopidogrel","omeprazole"],"recommendation":"Review before prescribing clopidogrel."}],"nutrigenomics":[{"nutrient":"Folate","genes":["MTHFR"],"finding":"Reduced conversion.","recommendation":"Folate-rich diet; consider methylfolate."}],"traits":[],"lifestyle_recommendations":["Daily leafy greens","Regular sun exposure within safe limits"],"recommended_tests":[{"test":"Homocysteine","reason":"MTHFR C677T"}],"red_flags":[],"limitations":"Consumer arrays miss rare variants.","disclaimer":"AI-generated clinical decision support for clinician review; not a diagnosis."}},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual analysis was performed and no quota was consumed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v1/dna-interpretation/info":{"get":{"operationId":"dnaInterpretationInfo","tags":["DNA Health"],"summary":"DNA Test Interpretation: info","description":"Accepted inputs, limits and report languages. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/v1/dna-blood-report/analyze":{"post":{"operationId":"dnaBloodReportAnalyze","tags":["DNA Health"],"summary":"DNA + Blood Health Report v1","description":"Combines a DNA report with an interpreted blood test. Every link between a genetic finding and a lab value is classified (`confirms`, `contradicts`, `neutral`, `watch`), followed by a risk matrix, priority actions and a monitoring plan. Consumes 1 credit.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnaBloodReportRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","dna_report":{"report_type":"dna","title":"Genetic health report","sections":[{"key":"nutrigenomics","findings":[{"gene":"MTHFR","rsid":"rs1801133","genotype":"AG"}]}]},"blood_test":{"parameters":[{"name":"25-OH vitamin D","result":18,"unit":"ng/mL"},{"name":"Homocysteine","result":13.5,"unit":"µmol/L"}]},"language":"en"}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","message":"DNA + blood health report completed successfully","data":{"analysis_id":"DNB-8C21E40A9D","module":"dna_blood_report","language":"en","report":{"report_type":"dna_blood","executive_summary":"The low vitamin D level matches the GC genotype; homocysteine is borderline, in line with MTHFR C677T.","overall_status":{"level":"watch","summary":"Two gene-lab matches to act on."},"correlations":[{"topic":"Vitamin D","genetic_finding":"GC rs2282679 GT","lab_finding":"25-OH D 18 ng/mL","concordance":"confirms","interpretation":"Genetic tendency and lab value agree.","action":"Supplement and recheck in 12 weeks."}],"risk_matrix":[{"area":"Folate cycle","genetic_risk":"slightly_elevated","lab_status":"borderline","combined_assessment":"Watch homocysteine."}],"priority_actions":[{"priority":"high","action":"Start vitamin D3","why":"Deficient level and GC genotype"}],"monitoring_plan":[{"marker":"25-OH vitamin D","interval":"12 weeks","reason":"Dose check"}],"lifestyle_plan":[],"questions_for_clinician":[],"red_flags":[],"limitations":"One blood test; values vary.","disclaimer":"AI-generated clinical decision support for clinician review; not a diagnosis."}}}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":1}},"/api/v1/dna-blood-report/sandbox":{"post":{"operationId":"dnaBloodReportSandbox","tags":["Sandbox"],"summary":"DNA + Blood Health Report v1: sandbox","description":"Returns a sample response in the shape `/analyze` produces. Authentication is required; no quota is consumed and no analysis is performed. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","dna_report":{"report_type":"dna","title":"Genetic health report","sections":[{"key":"nutrigenomics","findings":[{"gene":"MTHFR","rsid":"rs1801133","genotype":"AG"}]}]},"blood_test":{"parameters":[{"name":"25-OH vitamin D","result":18,"unit":"ng/mL"},{"name":"Homocysteine","result":13.5,"unit":"µmol/L"}]},"language":"en"}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","message":"DNA + blood health report completed successfully","data":{"analysis_id":"DNB-8C21E40A9D","module":"dna_blood_report","language":"en","report":{"report_type":"dna_blood","executive_summary":"The low vitamin D level matches the GC genotype; homocysteine is borderline, in line with MTHFR C677T.","overall_status":{"level":"watch","summary":"Two gene-lab matches to act on."},"correlations":[{"topic":"Vitamin D","genetic_finding":"GC rs2282679 GT","lab_finding":"25-OH D 18 ng/mL","concordance":"confirms","interpretation":"Genetic tendency and lab value agree.","action":"Supplement and recheck in 12 weeks."}],"risk_matrix":[{"area":"Folate cycle","genetic_risk":"slightly_elevated","lab_status":"borderline","combined_assessment":"Watch homocysteine."}],"priority_actions":[{"priority":"high","action":"Start vitamin D3","why":"Deficient level and GC genotype"}],"monitoring_plan":[{"marker":"25-OH vitamin D","interval":"12 weeks","reason":"Dose check"}],"lifestyle_plan":[],"questions_for_clinician":[],"red_flags":[],"limitations":"One blood test; values vary.","disclaimer":"AI-generated clinical decision support for clinician review; not a diagnosis."}},"sandbox":true,"sandbox_notice":"This is sandbox test data. No actual analysis was performed and no quota was consumed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v1/dna-blood-report/validate":{"post":{"operationId":"dnaBloodReportValidate","tags":["DNA Health"],"summary":"DNA + Blood Health Report v1: validate","description":"Checks the payload without an AI call. No credit is consumed.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnaBloodReportRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","dna_report":{"report_type":"dna","title":"Genetic health report","sections":[{"key":"nutrigenomics","findings":[{"gene":"MTHFR","rsid":"rs1801133","genotype":"AG"}]}]},"blood_test":{"parameters":[{"name":"25-OH vitamin D","result":18,"unit":"ng/mL"},{"name":"Homocysteine","result":13.5,"unit":"µmol/L"}]},"language":"en"}}}},"responses":{"200":{"description":"Validation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","message":"Payload is valid","data":{"valid":true,"language":"en","dna_sections":1,"blood_parameters":2}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":0}},"/api/v1/dna-blood-report/info":{"get":{"operationId":"dnaBloodReportInfo","tags":["DNA Health"],"summary":"DNA + Blood Health Report: info","description":"Request fields and limits. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/v1/dna-supplements/analyze":{"post":{"operationId":"dnaSupplementsAnalyze","tags":["DNA Health"],"summary":"DNA Supplement Advisor v1","description":"Builds a personalised supplement plan from the DNA report, the questionnaire answers and, optionally, an interpreted blood test. The clinic product catalogue and advisor settings are applied automatically. Consumes 1 credit.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnaSupplementsRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","dna_report":{"report_type":"dna","title":"Genetic health report","sections":[{"key":"nutrigenomics","findings":[{"gene":"MTHFR","rsid":"rs1801133","genotype":"AG"}]}]},"answers":{"diet_type":"vegetarian","pregnancy":"no","sun_exposure":"low","goals":["energy","immunity"]},"language":"en"}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","message":"Supplement plan completed successfully","data":{"analysis_id":"SUP-51B7D2E6F0","module":"dna_supplements","language":"en","catalogue":{"mode":"prefer","products":24},"report":{"report_type":"supplement","summary":"Plan built from GC and MTHFR findings, a low vitamin D level and a vegetarian diet.","recommendations":[{"name":"Vitamin D3 + K2","source":"clinic_library","product":"Vitamin D3 + K2 (Clinic Brand)","form":"softgel","dose":"2000 IU","timing":"with lunch","duration":"12 weeks","priority":"high","rationale":{"genetic":"GC rs2282679 GT","lab":"25-OH D 18 ng/mL","questionnaire":"little sun"},"evidence":"established","cautions":["Recheck calcium"],"interactions":["Thiazide diuretics"],"retest":"25-OH D in 12 weeks"}],"avoid_or_caution":[{"name":"High-dose vitamin A","reason":"Pregnancy planning"}],"uncovered_needs":[],"dietary_sources":[{"nutrient":"Folate","foods":["lentils","spinach"]}],"retest_plan":[{"marker":"25-OH vitamin D","when":"12 weeks","why":"Dose check"}],"clinician_review_required":["Thiazide co-medication"],"disclaimer":"AI-generated clinical decision support for clinician review; not a diagnosis."}}}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":1}},"/api/v1/dna-supplements/sandbox":{"post":{"operationId":"dnaSupplementsSandbox","tags":["Sandbox"],"summary":"DNA Supplement Advisor v1: sandbox","description":"Returns a sample response in the shape `/analyze` produces. Authentication is required; no quota is consumed and no analysis is performed. Works with a balance of 0 credits once the e-mail address of the account is verified; an unverified account with 0 credits is answered with 403 `QUOTA_1101`. An account with 0 credits is rate limited on the sandbox (429 `RATE_LIMITED` with `Retry-After`; up to 30 requests a minute and 500 a day are always accepted, counted over all sandbox endpoints together); an account with credits is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","dna_report":{"report_type":"dna","title":"Genetic health report","sections":[{"key":"nutrigenomics","findings":[{"gene":"MTHFR","rsid":"rs1801133","genotype":"AG"}]}]},"answers":{"diet_type":"vegetarian","pregnancy":"no","sun_exposure":"low","goals":["energy","immunity"]},"language":"en"}}}},"responses":{"200":{"description":"Stored sandbox result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","message":"Supplement plan completed successfully","data":{"analysis_id":"SUP-51B7D2E6F0","module":"dna_supplements","language":"en","catalogue":{"mode":"prefer","products":24},"report":{"report_type":"supplement","summary":"Plan built from GC and MTHFR findings, a low vitamin D level and a vegetarian diet.","recommendations":[{"name":"Vitamin D3 + K2","source":"clinic_library","product":"Vitamin D3 + K2 (Clinic Brand)","form":"softgel","dose":"2000 IU","timing":"with lunch","duration":"12 weeks","priority":"high","rationale":{"genetic":"GC rs2282679 GT","lab":"25-OH D 18 ng/mL","questionnaire":"little sun"},"evidence":"established","cautions":["Recheck calcium"],"interactions":["Thiazide diuretics"],"retest":"25-OH D in 12 weeks"}],"avoid_or_caution":[{"name":"High-dose vitamin A","reason":"Pregnancy planning"}],"uncovered_needs":[],"dietary_sources":[{"nutrient":"Folate","foods":["lentils","spinach"]}],"retest_plan":[{"marker":"25-OH vitamin D","when":"12 weeks","why":"Dose check"}],"clinician_review_required":["Thiazide co-medication"],"disclaimer":"AI-generated clinical decision support for clinician review; not a diagnosis."}},"sandbox":true,"sandbox_notice":"This is sandbox test data. No actual analysis was performed and no quota was consumed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/v1/dna-supplements/validate":{"post":{"operationId":"dnaSupplementsValidate","tags":["DNA Health"],"summary":"DNA Supplement Advisor v1: validate","description":"Checks the payload and the answers without an AI call. No credit is consumed.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnaSupplementsRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD","dna_report":{"report_type":"dna","title":"Genetic health report","sections":[{"key":"nutrigenomics","findings":[{"gene":"MTHFR","rsid":"rs1801133","genotype":"AG"}]}]},"answers":{"diet_type":"vegetarian","pregnancy":"no","sun_exposure":"low","goals":["energy","immunity"]},"language":"en"}}}},"responses":{"200":{"description":"Validation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","message":"Payload is valid","data":{"valid":true,"language":"en","answers":{"diet_type":"vegetarian","pregnancy":"no","sun_exposure":"low","goals":["energy","immunity"]},"blood_parameters":0,"catalogue":{"mode":"prefer","products":24}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":0}},"/api/v1/dna-supplements/questionnaire":{"get":{"operationId":"dnaSupplementsQuestionnaire","tags":["DNA Health"],"summary":"Supplement questionnaire","description":"The 25 questions and their allowed answers. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/v1/dna-supplements/info":{"get":{"operationId":"dnaSupplementsInfo","tags":["DNA Health"],"summary":"DNA Supplement Advisor: info","description":"Request fields and limits. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/v1/dna-supplements/settings":{"get":{"operationId":"dnaSupplementsSettingsGet","tags":["DNA Health"],"summary":"Read the clinic catalogue and advisor settings","description":"Reads the clinic product catalogue and the advisor settings (the same catalogue as in the clinic panel and in Nutrition Diet AI). No credit is consumed.","security":[{"bearerAuth":[]},{"basicAuth":[]}],"responses":{"200":{"description":"Catalogue and settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"catalogue":[{"name":"Vitamin D3 + K2","brand":"Clinic Brand","form":"softgel","dosage":"2000 IU / 75 µg","category":"vitamin"},{"name":"Omega-3 EPA/DHA","brand":"Clinic Brand","form":"softgel","dosage":"1000 mg","category":"omega"}],"settings":{"mode":"prefer","instructions":"Prefer our own brand.","max_items":8},"categories":["vitamin","mineral","probiotic","omega","herbal","other"],"modes":["prefer","only","off"],"limits":{"max_catalogue_items":200,"max_instructions_chars":1500,"max_items_range":[3,12]},"shared_with":["dna_health_page","nutrition_diet_ai"]},"timestamp":"2026-09-23T10:30:00Z","api_version":"1.0.0"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/KeyIpNotAllowed"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":0},"put":{"operationId":"dnaSupplementsSettingsPut","tags":["DNA Health"],"summary":"Update the clinic catalogue and advisor settings","description":"Replaces the product catalogue (up to 200 products) and/or the advisor settings; send `catalogue`, `settings` or both, a key left out keeps that part. POST is accepted as an alias of PUT. No credit is consumed.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplementSettings"},"example":{"catalogue":[{"name":"Vitamin D3 + K2","brand":"Clinic Brand","form":"softgel","dosage":"2000 IU / 75 µg","category":"vitamin"},{"name":"Omega-3 EPA/DHA","brand":"Clinic Brand","form":"softgel","dosage":"1000 mg","category":"omega"}],"settings":{"mode":"prefer","instructions":"Prefer our own brand.","max_items":8}}}}},"responses":{"200":{"description":"Stored catalogue and settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"catalogue":[{"name":"Vitamin D3 + K2","brand":"Clinic Brand","form":"softgel","dosage":"2000 IU / 75 µg","category":"vitamin"},{"name":"Omega-3 EPA/DHA","brand":"Clinic Brand","form":"softgel","dosage":"1000 mg","category":"omega"}],"settings":{"mode":"prefer","instructions":"Prefer our own brand.","max_items":8},"categories":["vitamin","mineral","probiotic","omega","herbal","other"],"modes":["prefer","only","off"],"limits":{"max_catalogue_items":200,"max_instructions_chars":1500,"max_items_range":[3,12]},"shared_with":["dna_health_page","nutrition_diet_ai"]},"timestamp":"2026-09-23T10:30:00Z","api_version":"1.0.0","message":"Settings saved"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"x-kantesti-key-scope":"modules","x-kantesti-credits":0}},"/api/icr/v1/extract":{"post":{"operationId":"icrExtract","tags":["ICR"],"summary":"ICR text extraction","description":"Extracts all text from a document as structured JSON: document type, sections, tables and metadata. 0.5 credit per call. Error codes carry the `ICR_` prefix. API keys are not accepted here: send username and password.","security":[{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Document (PDF, JPG, JPEG, PNG): one PDF, or one or more images.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"document_type":"blood_test_report","page_count":1,"pages":[{"page_number":1,"content":{"raw_text":"Cologne University Hospital - Blutbild\n\nPatient: Max Mustermann\nDOB: 15.03.1990\nGender: Male\nDate: 10.01.2026\n\nGlucose: 92 mg/dL (74-100)\nALT: 22 U/L (<35)","sections":[{"type":"header","content":"Cologne University Hospital - Blutbild"},{"type":"table","content":"Blood test results with 6 parameters"}],"tables":[{"headers":["Test","Result","Unit","Reference Range"],"rows":[["Glucose","92","mg/dL","74-100"],["ALT","22","U/L","<35"]]}]}}]},"credit_cost":0.5,"api_version":"icr-v1","timestamp":"2026-02-14T10:30:00Z"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-credits":0.5}},"/api/icr/v1/sandbox":{"post":{"operationId":"icrSandbox","tags":["Sandbox"],"summary":"ICR text extraction: sandbox","description":"Sample ICR extraction data. No credit is consumed and the balance is not checked. An account created by developer portal signup is rate limited here while it has 0 credits (429 `RATE_LIMITED` with `Retry-After`, the same budget as the other sandbox endpoints); every other account is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Document (PDF, JPG, JPEG, PNG): one PDF, or one or more images.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"}}}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"document_type":"blood_test_report","page_count":1,"pages":[{"page_number":1,"content":{"raw_text":"Cologne University Hospital - Blutbild\n\nPatient: Max Mustermann\nDOB: 15.03.1990\nGender: Male\nDate: 10.01.2026\n\nGlucose: 92 mg/dL (74-100)\nALT: 22 U/L (<35)","sections":[{"type":"header","content":"Cologne University Hospital - Blutbild"},{"type":"table","content":"Blood test results with 6 parameters"}],"tables":[{"headers":["Test","Result","Unit","Reference Range"],"rows":[["Glucose","92","mg/dL","74-100"],["ALT","22","U/L","<35"]]}]}}]},"credit_cost":0,"api_version":"icr-v1","timestamp":"2026-02-14T10:30:00Z","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual processing was performed. No credits consumed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/icr/v1/kan":{"post":{"operationId":"icrKan","tags":["ICR"],"summary":"ICR Kan: blood test extraction","description":"Extracts test parameters, patient information and metadata from a blood test document. 0.5 credit per call. API keys are not accepted here: send username and password.","security":[{"basicAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/Async"},{"$ref":"#/components/parameters/X-Async"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Document (PDF, JPG, JPEG, PNG): one PDF, or one or more images.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"},"pdf_password":{"type":"string","description":"Password for an encrypted PDF."}}}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"institute_info":{"name":"Cologne University Hospital"},"test_metadata":{"report_date":"10.01.2026","sample_type":"Blood","test_date":"10.01.2026"},"test_parameters":[{"name":"Glucose (Fasting Blood Sugar)","value":"92","unit":"mg/dL","reference_range":"74 - 100","type":"range"},{"name":"HBsAg","value":"Negative","unit":"","reference_range":"","type":"binary"}],"tester_info":{"age":"35 (Calculated from 15.03.1990 to 10.01.2026)","gender":"Male"},"kan_metadata":{"engine":"kantesti-kan","version":"1.0.0","language":"en","timestamp":"2026-02-14T10:30:00Z"}},"credit_cost":0.5,"api_version":"icr-v1","timestamp":"2026-02-14T10:30:00Z"}}}}}},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/ServerError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/Timeout"}},"x-kantesti-credits":0.5}},"/api/icr/v1/kan/sandbox":{"post":{"operationId":"icrKanSandbox","tags":["Sandbox"],"summary":"ICR Kan: sandbox","description":"Sample blood test parameter data. No credit is consumed and the balance is not checked. An account created by developer portal signup is rate limited here while it has 0 credits (429 `RATE_LIMITED` with `Retry-After`, the same budget as the other sandbox endpoints); every other account is never limited.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"file":{"type":"array","minItems":1,"description":"Document (PDF, JPG, JPEG, PNG): one PDF, or one or more images.","items":{"type":"string","format":"binary"}},"language":{"$ref":"#/components/schemas/Language"},"pdf_password":{"type":"string","description":"Password for an encrypted PDF."}}}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"institute_info":{"name":"Cologne University Hospital"},"test_metadata":{"report_date":"10.01.2026","sample_type":"Blood","test_date":"10.01.2026"},"test_parameters":[{"name":"Glucose (Fasting Blood Sugar)","value":"92","unit":"mg/dL","reference_range":"74 - 100","type":"range"},{"name":"HBsAg","value":"Negative","unit":"","reference_range":"","type":"binary"}],"tester_info":{"age":"35 (Calculated from 15.03.1990 to 10.01.2026)","gender":"Male"},"kan_metadata":{"engine":"kantesti-kan","version":"1.0.0","language":"en","timestamp":"2026-02-14T10:30:00Z"}},"credit_cost":0,"api_version":"icr-v1","timestamp":"2026-02-14T10:30:00Z","sandbox":true,"sandbox_notice":"This is sandbox test data. No actual processing was performed. No credits consumed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/SandboxRateLimited"}},"x-kantesti-key-scope":"sandbox","x-kantesti-credits":0}},"/api/icr/info":{"get":{"operationId":"icrInfo","tags":["ICR"],"summary":"ICR API information","description":"ICR documentation and features. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/icr/health":{"get":{"operationId":"icrHealth","tags":["ICR"],"summary":"ICR health check","description":"Health check of the ICR service. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"x-kantesti-credits":0}},"/api/icr/v1/quota":{"post":{"operationId":"icrQuota","tags":["ICR"],"summary":"Remaining ICR credits","description":"Remaining credits and how many ICR calls they pay for. API keys are not accepted here: send username and password.","security":[{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD"}}}},"responses":{"200":{"description":"Credit balance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"},"examples":{"example":{"value":{"status":"success","data":{"username":"your_username","remaining_credits":150,"icr_calls_remaining":300,"credit_cost_per_call":0.5,"timestamp":"2026-02-14T10:30:00Z"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}},"x-kantesti-credits":0}},"/api/info":{"get":{"operationId":"platformInfo","tags":["Utility"],"summary":"Platform information","description":"Platform information, available versions and supported features. No authentication. The example is shortened: `versions` and `endpoints` list every version from v3 to v12, and the response also carries `error_codes`, `supported_languages`, `documentation_url` and `oem_architecture`.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"examples":{"example":{"value":{"status":"success","platform":"Blood Test Interpretation API","platform_version":"2.0.0","versions":[{"version":"v12","release_date":"2026-09-18","status":"latest","description":"Multi-file blood test analysis with 100-language reporting","features":{"multi_file_upload":true,"health_score":false}}],"endpoints":{"production":{"v12":"/api/v12/18-09-2026/analyze","v12_health":"/api/v12/health-score/analyze"},"sandbox":{"v12":"/api/v12/18-09-2026/sandbox","v12_health":"/api/v12/health-score/sandbox"}},"authentication":{"type":"form-data","required_fields":["username","password"],"quota_system":"Credits consumed on successful production requests only"},"supported_file_types":[".jpg",".jpeg",".png",".pdf",".heic",".heif",".webp",".avif",".bmp",".tif",".tiff",".gif",".jfif",".jpe"],"rate_limits":{"sandbox":"Unlimited (no quota consumed)","production":"1 credit per successful request"},"recommendations":{"latest_stable":"v12","with_health_score":"v12-health-score"}}}}}}}},"x-kantesti-credits":0}},"/api/health":{"get":{"operationId":"healthCheck","tags":["Utility"],"summary":"Health check","description":"Service status for monitoring. No authentication.","security":[],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"examples":{"example":{"value":{"status":"healthy","platform_version":"2.0.0","timestamp":"2026-11-30T10:30:00.123456Z","services":{"icr":"operational","metadata_extraction":"operational","parameters_analysis":"operational","interpretation":"operational","health_score":"operational"}}}}}}}},"x-kantesti-credits":0}},"/api/quota/check":{"post":{"operationId":"quotaCheck","tags":["Utility"],"summary":"Check the remaining quota","description":"Remaining credits of the account. Each successful production request consumes 1 credit; sandbox and failed requests consume none.","security":[{"bearerAuth":[]},{"basicAuth":[]},{}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRequest"},"example":{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD"}}}},"responses":{"200":{"description":"Credit balance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaResponse"},"examples":{"example":{"value":{"status":"success","data":{"username":"your_username","remaining_quota":150,"timestamp":"2025-12-22T10:30:00Z"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/KeyIpNotAllowed"}},"x-kantesti-key-scope":"analyze | modules | sandbox","x-kantesti-credits":0}},"/api/jobs/{job_id}":{"get":{"operationId":"jobStatus","tags":["Async Jobs"],"summary":"Poll an async job","description":"Status of a job started with `?async=1` (or `X-Async: 1`). Poll every `poll_interval_ms` with the credentials that started the job, until `status` is `completed` or `failed`. On `completed`, `result.response` is the JSON the synchronous endpoint would have returned and `result.http_status` its HTTP code. A job without progress for 90 seconds is reported as `failed`.","security":[{"bearerAuth":[]},{"basicAuth":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"description":"The `job_id` of the 202 response.","schema":{"type":"string"}}],"responses":{"200":{"description":"Job status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatus"},"examples":{"running":{"value":{"job_id":"JOB_ID","status":"running","progress":40,"stage":"analysis","result":null,"error":null}},"completed":{"value":{"job_id":"JOB_ID","status":"completed","progress":100,"stage":"completed","result":{"http_status":200,"response":{"status":"success","data":{"body_map":{"v":4,"spec":"v4-thy2-liv2-kid1-bld2","unmapped":0,"image_url":"/static/body_maps/v4-thy2-liv2-kid1-bld2.webp","fallback_url":"/body-map/v4-thy2-liv2-kid1-bld2.0123456789abcdef.webp","regions":[{"key":"thyroid","level":2,"drawn":true,"markers":["TSH"]},{"key":"heart_vessels","level":1,"drawn":true,"markers":["LDL Cholesterol"]}]},"engine_version":4,"region_keys":["brain_nerves","thyroid"],"mode":"deterministic","all_clear":false},"timestamp":"2026-11-30T12:00:00.000000Z","api_version":"1.0.0"}},"error":null}},"failed":{"value":{"job_id":"JOB_ID","status":"failed","progress":40,"stage":"analysis","result":{"http_status":500,"response":{"status":"error","error":{"code":"PROC_3007","message":"Analysis failed after retries","timestamp":"2025-12-22T10:30:00Z"}}},"error":"Analysis failed after retries"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"The job belongs to another account, or the API key is used from an address outside its IP allowlist (AUTH_1006, in the standard error envelope).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/JobError"},{"$ref":"#/components/schemas/Error"}]},"examples":{"forbidden":{"value":{"error":{"code":"FORBIDDEN","message":"Job belongs to another account"}}},"AUTH_1006":{"summary":"This API key is not allowed from this IP address","value":{"status":"error","error":{"code":"AUTH_1006","message":"This API key is not allowed from this IP address","timestamp":"2025-12-22T10:30:00Z"}}}}}}},"404":{"description":"Unknown job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobError"},"examples":{"example":{"value":{"error":{"code":"JOB_NOT_FOUND","message":"Job not found"}}}}}}}},"x-kantesti-key-scope":"analyze | modules","x-kantesti-credits":0}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"kt_live_...","description":"API key created in the dashboard of the Kantesti Health API platform (https://www.kantesti.net/api/dashboard/): `Authorization: Bearer kt_live_...`. Shown once, revocable, scoped (`analyze`, `modules`, `sandbox`); at most 20 active keys per account. Optional at creation: an expiry date (an expired key gets the same 401 `AUTH_1005` as a revoked one) and an IP allowlist of up to 10 addresses or CIDR ranges (403 `AUTH_1006` from any other address). A key is also accepted in the `password` field next to its owner's `username`; there an invalid, revoked or expired key is answered with 401 `AUTH_1002`."},"basicAuth":{"type":"http","scheme":"basic","description":"Legacy credentials: API username and password as HTTP Basic. The same pair is accepted as `username` and `password` form fields (multipart/form-data) or JSON fields in the request body, which is what the documentation examples send; body fields are read first."}},"parameters":{"Async":{"name":"async","in":"query","required":false,"description":"Set to 1 (or true/yes/on) to get 202 with a job_id at once and poll /api/jobs/{job_id}.","schema":{"type":"string","enum":["1","true","yes","on"]}},"X-Async":{"name":"X-Async","in":"header","required":false,"description":"Header form of `?async=1`.","schema":{"type":"string","enum":["1"]}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying. Optional: sent when a request is throttled or the resource is not ready yet.","schema":{"type":"integer","minimum":1}}},"responses":{"Accepted":{"description":"Async mode: the job was accepted. Poll `poll_url`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingJob"},"examples":{"pending":{"value":{"status":"pending","job_id":"JOB_ID","poll_url":"/api/jobs/JOB_ID","poll_interval_ms":3000,"estimated_seconds":240}}}}}},"BadRequest":{"description":"Validation error, or malformed credentials (AUTH_1004).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"VAL_2001":{"summary":"No file uploaded","value":{"status":"error","error":{"code":"VAL_2001","message":"No file uploaded","timestamp":"2025-12-22T10:30:00Z"}}},"VAL_2002":{"summary":"Invalid file format","value":{"status":"error","error":{"code":"VAL_2002","message":"Invalid file format","timestamp":"2025-12-22T10:30:00Z"}}},"VAL_2003":{"summary":"Multiple PDF files not allowed","value":{"status":"error","error":{"code":"VAL_2003","message":"Multiple PDF files not allowed","timestamp":"2025-12-22T10:30:00Z"}}},"VAL_2004":{"summary":"PDF and images cannot be mixed","value":{"status":"error","error":{"code":"VAL_2004","message":"PDF and images cannot be mixed","timestamp":"2025-12-22T10:30:00Z"}}},"VAL_2005":{"summary":"Unsupported language code","value":{"status":"error","error":{"code":"VAL_2005","message":"Unsupported language code","timestamp":"2025-12-22T10:30:00Z"}}},"AUTH_1004":{"summary":"Invalid credentials format","value":{"status":"error","error":{"code":"AUTH_1004","message":"Invalid credentials format","timestamp":"2025-12-22T10:30:00Z"}}}}}}},"Unauthorized":{"description":"Missing or invalid credentials. An API key that is unknown, malformed, revoked or expired is answered with AUTH_1005 when it is sent in the `Authorization` header; revoked and expired keys look the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"AUTH_1001":{"summary":"Missing authentication credentials","value":{"status":"error","error":{"code":"AUTH_1001","message":"Missing authentication credentials","details":"Both 'username' and 'password' fields are required","timestamp":"2025-12-22T10:30:00Z"}}},"AUTH_1002":{"summary":"Invalid username or password","value":{"status":"error","error":{"code":"AUTH_1002","message":"Invalid username or password","timestamp":"2025-12-22T10:30:00Z"}}},"AUTH_1005":{"summary":"Invalid API key","value":{"status":"error","error":{"code":"AUTH_1005","message":"Invalid API key","timestamp":"2025-12-22T10:30:00Z"}}}}}}},"Forbidden":{"description":"Not enough quota, the account is locked, or the API key is used from an address outside its IP allowlist (AUTH_1006).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"QUOTA_1101":{"summary":"Insufficient API quota","value":{"status":"error","error":{"code":"QUOTA_1101","message":"Insufficient API quota","details":"Current quota: 0. Visit our website to purchase more credits.","timestamp":"2025-12-22T10:30:00Z"}}},"AUTH_1003":{"summary":"Account temporarily locked","value":{"status":"error","error":{"code":"AUTH_1003","message":"Account temporarily locked","timestamp":"2025-12-22T10:30:00Z"}}},"AUTH_1006":{"summary":"This API key is not allowed from this IP address","value":{"status":"error","error":{"code":"AUTH_1006","message":"This API key is not allowed from this IP address","timestamp":"2025-12-22T10:30:00Z"}}}}}}},"KeyIpNotAllowed":{"description":"The API key has an IP allowlist and the request came from another address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"AUTH_1006":{"summary":"This API key is not allowed from this IP address","value":{"status":"error","error":{"code":"AUTH_1006","message":"This API key is not allowed from this IP address","timestamp":"2025-12-22T10:30:00Z"}}}}}}},"Unprocessable":{"description":"Flagged results exist but nothing can be mapped or computed. Not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"RES_4004":{"summary":"Nothing can be mapped or computed from these parameters","value":{"status":"error","error":{"code":"RES_4004","message":"Nothing can be mapped or computed from these parameters","timestamp":"2025-12-22T10:30:00Z"}}}}}}},"TooManyRequests":{"description":"Quota exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"QUOTA_1102":{"summary":"API quota exceeded","value":{"status":"error","error":{"code":"QUOTA_1102","message":"API quota exceeded","timestamp":"2025-12-22T10:30:00Z"}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"SandboxRateLimited":{"description":"Sandbox rate limit, for an account with 0 credits only: too many sandbox requests in the last minute or day (one budget for all sandbox endpoints together; up to 30 requests a minute and 500 a day are always accepted). An account with credits never receives this answer. Wait the seconds of `Retry-After` (the same number as `error.retry_after`), then retry. The refused request is not counted.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"RATE_LIMITED":{"summary":"Too many sandbox requests for this account","value":{"status":"error","sandbox":true,"error":{"code":"RATE_LIMITED","message":"Too many sandbox requests for this account. Please retry later.","retry_after":42}}}}}}},"ServerError":{"description":"Processing or server error. Not charged; retry with exponential backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"PROC_3001":{"summary":"Document processing failed","value":{"status":"error","error":{"code":"PROC_3001","message":"Document processing failed","timestamp":"2025-12-22T10:30:00Z"}}},"PROC_3002":{"summary":"Metadata extraction failed","value":{"status":"error","error":{"code":"PROC_3002","message":"Metadata extraction failed","timestamp":"2025-12-22T10:30:00Z"}}},"PROC_3003":{"summary":"Parameters extraction failed","value":{"status":"error","error":{"code":"PROC_3003","message":"Parameters extraction failed","timestamp":"2025-12-22T10:30:00Z"}}},"PROC_3004":{"summary":"Interpretation generation failed","value":{"status":"error","error":{"code":"PROC_3004","message":"Interpretation generation failed","timestamp":"2025-12-22T10:30:00Z"}}},"PROC_3007":{"summary":"Analysis failed after retries","value":{"status":"error","error":{"code":"PROC_3007","message":"Analysis failed after retries","timestamp":"2025-12-22T10:30:00Z"}}},"SRV_5001":{"summary":"Internal server error","value":{"status":"error","error":{"code":"SRV_5001","message":"Internal server error","timestamp":"2025-12-22T10:30:00Z"}}}}}}},"Unavailable":{"description":"Service temporarily unavailable, or the engine is switched off on this deployment (RES_4005).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"SRV_5002":{"summary":"Service temporarily unavailable","value":{"status":"error","error":{"code":"SRV_5002","message":"Service temporarily unavailable","timestamp":"2025-12-22T10:30:00Z"}}},"RES_4005":{"summary":"The engine is disabled on this deployment","value":{"status":"error","error":{"code":"RES_4005","message":"The engine is disabled on this deployment","timestamp":"2025-12-22T10:30:00Z"}}}}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"Timeout":{"description":"Processing timeout. Reduce the file size, or call with `?async=1` and poll.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"PROC_3006":{"summary":"Processing timeout","value":{"status":"error","error":{"code":"PROC_3006","message":"Processing timeout","timestamp":"2025-12-22T10:30:00Z"}}}}}}}},"schemas":{"Language":{"type":"string","description":"Response language code (default: en). The keys of languages.json; an unknown code is answered with an \"Unsupported language code\" error.","enum":["en","tr","de","es","fr","ru","zh","ja","ko","pt","it","nl","ar","hi","bn","pa","gu","te","mr","ta","kn","ml","th","fa","uk","vi","el","he","hu","id","ro","sr","bg","hr","sk","sl","lt","lv","et","fil","mn","si","zu","ka","am","af","az","eu","be","ca","gl","is","kk","km","lo","mk","ne","tg","uz","cy","xh","yi","hy","sw","ur","pl","sd","my","sv","no","da","fi","cs","ms","bs","sq","mt","ga","ky","tk","so","ps","ku","as","or","jv","su","mg","ht","lb","la","tl","mi","sm","to","haw","eo","ha","yo","ig","ceb"],"default":"en"},"Gender":{"type":"string","enum":["male","female","other"]},"Error":{"type":"object","description":"Error envelope of every endpoint. `x-kantesti-error-codes` at the root of this document lists every code with its HTTP status.","required":["status","error"],"properties":{"status":{"type":"string","const":"error"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Unique error identifier, e.g. AUTH_1001, QUOTA_1101, VAL_2001, PROC_3001, RES_4004, SRV_5001; ICR endpoints prefix it with ICR_. The sandbox rate limit answers with RATE_LIMITED (no number).","examples":["AUTH_1001"]},"message":{"type":"string","description":"Human-readable error message."},"details":{"type":"string","description":"Additional context (optional)."},"timestamp":{"type":"string","description":"ISO 8601 timestamp.","format":"date-time"},"retry_after":{"type":"integer","minimum":1,"description":"Seconds to wait before retrying; the same number as the `Retry-After` header. Only with `RATE_LIMITED`."}}},"sandbox":{"type":"boolean","description":"Present on errors of sandbox endpoints."}}},"JobError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["JOB_NOT_FOUND","FORBIDDEN"]},"message":{"type":"string"}}}}},"PendingJob":{"type":"object","description":"Answer of an analyze endpoint called with `?async=1` or `X-Async: 1`.","required":["status","job_id","poll_url"],"properties":{"status":{"type":"string","const":"pending"},"job_id":{"type":"string"},"poll_url":{"type":"string","description":"Relative URL to poll: /api/jobs/{job_id}."},"poll_interval_ms":{"type":"integer","examples":[3000]},"estimated_seconds":{"type":"integer"},"version":{"type":"string","description":"API version (blood test endpoints only)."}}},"JobStatus":{"type":"object","required":["job_id","status"],"properties":{"job_id":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed"]},"progress":{"type":["integer","number","null"],"description":"Percent done."},"stage":{"type":["string","null"]},"result":{"type":["object","null"],"description":"Set on `completed` and `failed`: the envelope the synchronous call would have produced.","properties":{"http_status":{"type":"integer"},"response":{"type":"object","additionalProperties":true}},"additionalProperties":true},"error":{"type":["string","null"],"description":"Short message, on `failed` only."}}},"SuccessEnvelope":{"type":"object","description":"Success envelope. `data` depends on the endpoint; see the example of each operation.","required":["status"],"additionalProperties":true,"properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"},"api_version":{"type":"string"},"timestamp":{"type":"string"},"sandbox":{"type":"boolean","description":"true on sandbox responses."},"sandbox_notice":{"type":"string"}}},"QuotaResponse":{"type":"object","required":["status","data"],"properties":{"status":{"type":"string","const":"success"},"data":{"type":"object","required":["username","remaining_quota"],"properties":{"username":{"type":"string"},"remaining_quota":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"}}}}},"SandboxRequest":{"type":"object","description":"Credentials (unless sent in a header) and an optional language.","additionalProperties":true,"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"language":{"$ref":"#/components/schemas/Language"}}},"Metadata":{"type":"object","additionalProperties":true,"properties":{"lab_date":{"type":"string","description":"Blood collection date (YYYY-MM-DD); the result date when the report prints only that one; empty when the report shows no date."},"results_date":{"type":"string","description":"Results issue date (YYYY-MM-DD)."},"lab_name":{"type":"string","description":"Laboratory name."},"lab_city":{"type":"string","description":"Laboratory city."},"lab_country":{"type":"string","description":"Laboratory country."},"patient_name":{"type":"string","description":"Patient full name (metadata only, not sent to interpretation)."},"patient_age":{"type":"string","description":"Patient age."},"patient_sex":{"type":"string","description":"Patient sex."}}},"Parameter":{"type":"object","additionalProperties":true,"properties":{"category":{"type":["string","null"],"description":"Parameter category, e.g. \"Complete Blood Count\"."},"long_name":{"type":"string","description":"Full parameter name."},"short_name":{"type":"string","description":"Abbreviated parameter name."},"result":{"type":["number","string","null"],"description":"Measured value."},"unit":{"type":["string","null"],"description":"Unit of measurement."},"type":{"type":"string","enum":["range","binary"],"description":"range: a numeric result rated against reference ranges. binary: a qualitative result; its range fields are null and evaluation is good or bad."},"range_optimal_min":{"type":["number","null"],"description":"Lower bound of the optimal range."},"range_optimal_max":{"type":["number","null"],"description":"Upper bound of the optimal range."},"range_normal_min":{"type":["number","null"],"description":"Lower bound of the normal (reference) range."},"range_normal_max":{"type":["number","null"],"description":"Upper bound of the normal (reference) range."},"range_min":{"type":["number","null"],"description":"Lower borderline limit."},"range_max":{"type":["number","null"],"description":"Upper borderline limit."},"evaluation":{"type":"string","description":"optimal, normal (range rows: normal); slightly_low, slightly_high (borderline); low, high (abnormal); good, bad (binary rows); Unknown (not rated)."},"short_description":{"type":"string"},"long_description":{"type":"string"}}},"InterpretationSection":{"type":"object","additionalProperties":true,"properties":{"title":{"type":"string","description":"Section title, e.g. \"Overall Health Assessment\"."},"shortcode":{"type":"string"},"subsections":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"subtitle":{"type":"string"},"shortcode":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"}}}}}}}}},"BloodTestData":{"type":"object","additionalProperties":true,"properties":{"metadata":{"$ref":"#/components/schemas/Metadata"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/Parameter"}},"interpretation":{"type":"array","items":{"$ref":"#/components/schemas/InterpretationSection"}}}},"BloodTestResponse":{"type":"object","required":["status","data"],"additionalProperties":true,"properties":{"status":{"type":"string","const":"success"},"data":{"$ref":"#/components/schemas/BloodTestData"},"api_version":{"type":"string","description":"API version used for processing."},"timestamp":{"type":"string","description":"ISO 8601 timestamp of the response."},"sandbox":{"type":"boolean"},"sandbox_notice":{"type":"string"}}},"HealthScore":{"type":"object","additionalProperties":true,"properties":{"overall":{"type":"number"},"optimal":{"type":"integer"},"normal":{"type":"integer"},"warning":{"type":"integer"},"critical":{"type":"integer"},"total_parameters":{"type":"integer"},"score_interpretation":{"type":"string","description":"excellent, good, fair or poor."},"recommendations":{"type":"array","items":{"type":"string"}}}},"HealthScoreResponse":{"type":"object","required":["status","data"],"additionalProperties":true,"properties":{"status":{"type":"string","const":"success"},"data":{"allOf":[{"$ref":"#/components/schemas/BloodTestData"}],"properties":{"health_score":{"$ref":"#/components/schemas/HealthScore"},"disease_risks":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"name":{"type":"string"},"percentage":{"type":"string"},"severity":{"type":"string"}}}}}},"api_version":{"type":"string"},"timestamp":{"type":"string"},"sandbox":{"type":"boolean"},"sandbox_notice":{"type":"string"}}},"ParameterInput":{"type":"object","description":"One laboratory result.","additionalProperties":true,"properties":{"name":{"type":"string","description":"Parameter name; use the same name across tests."},"short_name":{"type":"string","description":"Short parameter code, e.g. HGB."},"value":{"type":["number","string"],"description":"Measured value (`result` is read too)."},"result":{"type":["number","string"],"description":"Measured value."},"unit":{"type":"string","description":"Unit of measurement."},"range_min":{"type":"number","description":"Minimum reference range value."},"range_max":{"type":"number","description":"Maximum reference range value."},"category":{"type":"string","description":"Parameter category, e.g. \"Lipid Panel\"."},"evaluation":{"type":"string","description":"Pre-evaluated status: normal, low, high, critical_low, critical_high, borderline_low, borderline_high."}}},"BloodTestInput":{"type":"object","description":"One blood test. `lab_date` or `results_date` is required.","required":["parameters"],"anyOf":[{"required":["lab_date"]},{"required":["results_date"]}],"properties":{"lab_date":{"type":"string","description":"Test date (YYYY-MM-DD).","format":"date"},"results_date":{"type":"string","description":"Alternative to lab_date (YYYY-MM-DD).","format":"date"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/ParameterInput"}},"metadata":{"type":"object","additionalProperties":true,"description":"Additional metadata (lab_name, notes, ...)."}}},"TrendsRequest":{"type":"object","required":["blood_tests"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"language":{"$ref":"#/components/schemas/Language"},"blood_tests":{"type":"array","minItems":2,"maxItems":50,"items":{"$ref":"#/components/schemas/BloodTestInput"}},"analysis_type":{"type":"string","enum":["comprehensive","statistical","summary"],"default":"comprehensive"},"analysis_options":{"type":"object","properties":{"include_predictions":{"type":"boolean","default":true},"include_statistics":{"type":"boolean","default":true},"include_charts":{"type":"boolean","default":true}}}}},"ComparisonRequest":{"type":"object","required":["blood_tests"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"language":{"$ref":"#/components/schemas/Language"},"blood_tests":{"type":"array","minItems":2,"maxItems":20,"items":{"$ref":"#/components/schemas/BloodTestInput"}}}},"NutritionPatient":{"type":"object","required":["age","gender"],"additionalProperties":true,"properties":{"age":{"type":"integer","minimum":18,"maximum":120},"gender":{"$ref":"#/components/schemas/Gender"},"weight":{"type":["number","null"],"description":"Weight in kg."},"height":{"type":["number","null"],"description":"Height in cm."},"conditions":{"type":"array","items":{"type":"string"}},"allergies":{"type":"array","items":{"type":"string"}},"dietary_preferences":{"type":"array","items":{"type":"string"},"description":"omnivore (default), vegetarian, vegan, pescatarian, keto, paleo, mediterranean."},"activity_level":{"type":"string","enum":["sedentary","light","moderate","active","very_active"],"default":"moderate"},"dietary_restrictions":{"type":"array","items":{"type":"string"},"description":"low_sodium, low_sugar, low_fat, gluten_free, dairy_free, nut_free, soy_free, egg_free, halal, kosher, or free text."},"liked_foods":{"type":"array","items":{"type":"string"}},"disliked_foods":{"type":"array","items":{"type":"string"}},"meal_frequency":{"description":"Meals per day: a number (default 5), a phrase such as \"5 meals plus one snack\" or \"16:8\", an object {\"meals\": 5, \"snacks\": 1}, or the list of meals.","oneOf":[{"type":"integer","minimum":1},{"type":"string"},{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"string"}}],"default":5},"snacks":{"type":"integer","minimum":0,"description":"Snacks per day; with it, meal_frequency is the number of meals."},"budget":{"description":"A level (low, moderate, high) or an amount such as \"10-20 EUR/day\" or {\"min\": 10, \"max\": 20, \"currency\": \"EUR\"}.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":true}],"default":"moderate"},"medications":{"type":"array","items":{"type":"string"}}}},"NutritionRequest":{"type":"object","required":["patient","blood_test"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"language":{"$ref":"#/components/schemas/Language"},"patient":{"$ref":"#/components/schemas/NutritionPatient"},"blood_test":{"type":"object","additionalProperties":true,"description":"Blood test parameters.","properties":{"parameters":{"type":"array","items":{"$ref":"#/components/schemas/ParameterInput"}}}},"health_goals":{"type":"array","items":{"type":"string","enum":["maintain","improve_energy","weight_management","heart_health","immune_support","digestive_health","bone_health","mental_clarity"]}},"dietary_restrictions":{"type":"array","items":{"type":"string"}}}},"FamilyMember":{"type":"object","required":["relation"],"additionalProperties":true,"properties":{"relation":{"type":"string","enum":["father","mother","brother","sister","paternal_grandfather","paternal_grandmother","maternal_grandfather","maternal_grandmother","paternal_uncle","paternal_aunt","maternal_uncle","maternal_aunt","son","daughter"]},"age":{"type":"integer"},"conditions":{"type":"array","items":{"type":"string"}},"age_at_diagnosis":{"type":"integer"},"deceased":{"type":"boolean"},"age_at_death":{"type":"integer"},"cause_of_death":{"type":"string"}}},"FamilyHealthRequest":{"type":"object","required":["patient_data"],"anyOf":[{"required":["family_members"]},{"required":["health_profile"]}],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"patient_data":{"type":"object","required":["age","gender"],"properties":{"name":{"type":"string"},"age":{"type":"integer"},"gender":{"$ref":"#/components/schemas/Gender"},"dob":{"type":"string","format":"date"}}},"family_members":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/FamilyMember"}},"health_profile":{"type":"object","additionalProperties":true,"description":"Patient health profile; required when family_members is absent."},"blood_test_data":{"type":"array","items":{"type":"object","additionalProperties":true}},"language":{"$ref":"#/components/schemas/Language"}}},"BodyMapRequest":{"type":"object","required":["parameters"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"parameters":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","additionalProperties":true,"description":"At least one of short_name, long_name, name, parameter_name or parameter is required.","properties":{"short_name":{"type":"string","description":"Analyte name as printed by the laboratory."},"long_name":{"type":"string","description":"Full analyte name; improves matching for abbreviations."},"evaluation":{"type":"string","enum":["high","low","bad","slightly_high","slightly_low","normal"]},"result":{"type":["string","number"]},"unit":{"type":"string"},"range_normal_min":{"type":"number"},"range_normal_max":{"type":"number"},"category":{"type":"string"}}}},"interpretation":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Clinical interpretation; context only when ai_assist is enabled."},"ai_assist":{"type":"boolean","default":false},"include_image":{"type":"boolean","default":false},"image_wait":{"type":"integer","minimum":0,"maximum":30,"default":0}}},"BloodAgeRequest":{"type":"object","required":["parameters"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"parameters":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","additionalProperties":true},"description":"Laboratory result objects; each needs an analyte name and a result."},"metadata":{"type":"object","additionalProperties":true,"description":"Report header: patient_age, patient_sex, dob, lab_date."},"patient":{"type":"object","additionalProperties":true,"properties":{"age":{"type":"integer"},"gender":{"$ref":"#/components/schemas/Gender"},"dob":{"type":"string"}}},"interpretation":{"type":"array","items":{"type":"object","additionalProperties":true}},"language":{"$ref":"#/components/schemas/Language"},"ai_assist":{"type":"boolean","default":false},"ai_estimate":{"type":"boolean","default":false},"ai_note":{"type":"boolean","default":false}}},"DnaInterpretationRequest":{"type":"object","required":["genotype_text"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"genotype_text":{"type":"string","description":"Pasted genotype lines (rsID, chromosome, position, genotype).","maxLength":2000000},"language":{"$ref":"#/components/schemas/Language"},"patient":{"type":"object","additionalProperties":true,"description":"age, sex, diagnoses, comorbidities, medications, treatments, notes."},"source_label":{"type":"string","description":"Your own name for the source.","maxLength":120}}},"DnaBloodReportRequest":{"type":"object","required":["dna_report","blood_test"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"dna_report":{"type":"object","additionalProperties":true,"description":"The report from /api/v1/dna-interpretation/analyze: `data.report`, the whole `data` or the full response."},"blood_test":{"description":"An interpreted blood test as the Blood Test API returns it (metadata, parameters, interpretation), or a list of up to 500 parameters with a name and a result.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","maxItems":500,"items":{"type":"object","additionalProperties":true}}]},"language":{"$ref":"#/components/schemas/Language"},"patient":{"type":"object","additionalProperties":true,"description":"age, sex, diagnoses, comorbidities, medications, treatments, notes."}}},"DnaSupplementsRequest":{"type":"object","required":["dna_report","answers"],"properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"dna_report":{"type":"object","additionalProperties":true,"description":"The report from /api/v1/dna-interpretation/analyze: `data.report`, the whole `data` or the full response."},"answers":{"type":"object","required":["diet_type","pregnancy"],"additionalProperties":true,"description":"Questionnaire answers; see GET /api/v1/dna-supplements/questionnaire. Unknown keys and values are dropped."},"blood_test":{"description":"An interpreted blood test as the Blood Test API returns it (metadata, parameters, interpretation), or a list of up to 500 parameters with a name and a result.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","maxItems":500,"items":{"type":"object","additionalProperties":true}}]},"use_clinic_catalogue":{"type":"boolean","default":true},"language":{"$ref":"#/components/schemas/Language"},"patient":{"type":"object","additionalProperties":true,"description":"age, sex, diagnoses, comorbidities, medications, treatments, notes."}}},"SupplementSettings":{"type":"object","properties":{"username":{"type":"string","description":"API username. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":100,"examples":["YOUR_USERNAME"]},"password":{"type":"string","description":"API password. Legacy credential field; leave out when you send an `Authorization` header.","maxLength":200,"format":"password","examples":["YOUR_PASSWORD"]},"catalogue":{"type":"array","maxItems":200,"items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"brand":{"type":"string"},"form":{"type":"string"},"dosage":{"type":"string"},"category":{"type":"string","enum":["vitamin","mineral","probiotic","omega","herbal","other"]},"description":{"type":"string"}}}},"settings":{"type":"object","properties":{"mode":{"type":"string","enum":["prefer","only","off"]},"instructions":{"type":"string","maxLength":1500},"max_items":{"type":"integer","minimum":3,"maximum":12}}}}}}},"x-kantesti-error-codes":{"common":{"AUTH_1001":{"http":401,"message":"Missing authentication credentials"},"AUTH_1002":{"http":401,"message":"Invalid username or password (also: an API key without the scope for this path)"},"AUTH_1003":{"http":403,"message":"Account temporarily locked"},"AUTH_1004":{"http":400,"message":"Malformed credentials (wrong type or oversize)"},"AUTH_1005":{"http":401,"message":"Invalid API key (unknown, revoked, expired or malformed kt_live_ key)"},"AUTH_1006":{"http":403,"message":"This API key is not allowed from this IP address (the key has an IP allowlist)"},"QUOTA_1101":{"http":403,"message":"Insufficient API quota"},"QUOTA_1102":{"http":429,"message":"API quota exceeded"},"RATE_LIMITED":{"http":429,"message":"Too many sandbox requests for this account (sandbox endpoints only, and only an account with 0 credits; see Retry-After)"},"SRV_5001":{"http":500,"message":"Internal server error"},"SRV_5002":{"http":503,"message":"Service temporarily unavailable"}},"bloodTest":{"VAL_2001":{"http":400,"message":"No file uploaded"},"VAL_2002":{"http":400,"message":"Invalid file format"},"VAL_2003":{"http":400,"message":"Multiple PDF files not allowed"},"VAL_2004":{"http":400,"message":"PDF and images cannot be mixed"},"VAL_2005":{"http":400,"message":"Unsupported language code"},"PROC_3001":{"http":500,"message":"Document processing failed"},"PROC_3002":{"http":500,"message":"Metadata extraction failed"},"PROC_3003":{"http":500,"message":"Parameters extraction failed"},"PROC_3004":{"http":500,"message":"Interpretation generation failed"},"PROC_3006":{"http":504,"message":"Processing timeout"},"PROC_3007":{"http":500,"message":"Analysis failed after retries"}},"modules":{"VAL_2001":{"http":400,"message":"Required field is missing"},"VAL_2002":{"http":400,"message":"Invalid data format"},"VAL_2003":{"http":400,"message":"Unsupported language code"},"VAL_2004":{"http":400,"message":"Invalid date format. Use ISO 8601 (YYYY-MM-DD)"},"VAL_2005":{"http":400,"message":"Request data cannot be empty"},"VAL_2006":{"http":400,"message":"Array exceeds maximum allowed size"},"VAL_2007":{"http":400,"message":"Invalid patient data structure"},"VAL_2008":{"http":400,"message":"Invalid blood test data structure / malformed parameter row"},"VAL_2009":{"http":400,"message":"Unsupported patient.gender value"},"PROC_3001":{"http":500,"message":"Data processing failed"},"PROC_3002":{"http":504,"message":"Processing timeout"},"PROC_3003":{"http":500,"message":"AI processing error. Retry; no credit is charged"},"RES_4004":{"http":422,"message":"Nothing can be mapped or computed from these parameters"},"RES_4005":{"http":503,"message":"The engine is disabled on this deployment"}},"icr":{"ICR_AUTH_1001":{"http":401,"message":"Missing authentication credentials"},"ICR_AUTH_1002":{"http":401,"message":"Invalid username or password"},"ICR_QUOTA_1101":{"http":403,"message":"Insufficient credits (0.5 credits required per call)"},"ICR_VAL_2001":{"http":400,"message":"No file uploaded"},"ICR_VAL_2002":{"http":400,"message":"Invalid file format"},"ICR_VAL_2003":{"http":400,"message":"Multiple PDF files not allowed in single request"},"ICR_VAL_2004":{"http":400,"message":"Cannot mix PDF and image files in single request"},"ICR_VAL_2005":{"http":400,"message":"Unsupported language code"},"ICR_VAL_2006":{"http":400,"message":"File size exceeds maximum limit"},"ICR_PROC_3001":{"http":500,"message":"ICR text extraction failed"},"ICR_PROC_3002":{"http":500,"message":"Blood test processing (kan) failed"},"ICR_PROC_3003":{"http":500,"message":"PDF to image conversion failed"},"ICR_PROC_3004":{"http":504,"message":"Processing timeout"},"ICR_SRV_5001":{"http":500,"message":"Internal server error"},"ICR_SRV_5002":{"http":503,"message":"ICR service temporarily unavailable"}},"jobs":{"JOB_NOT_FOUND":{"http":404,"message":"Job not found"},"FORBIDDEN":{"http":403,"message":"Job belongs to another account"}}},"x-kantesti-quota":{"model":"credits","production_request":1,"icr_request":0.5,"sandbox_request":0,"failed_request":0,"sandbox_with_zero_balance":{"blood_test":"allowed once the e-mail address of the account is verified; otherwise 403 QUOTA_1101","icr":"allowed (the balance is not checked)","modules":"allowed once the e-mail address of the account is verified; otherwise 403 QUOTA_1101","rate_limit":"429 RATE_LIMITED with Retry-After, only for an account with 0 credits (ICR: only one created by developer portal signup); an account with credits is never limited"},"check":"POST /api/quota/check","exceeded":{"code":"QUOTA_1101","http":403}},"x-kantesti-api-keys":{"dashboard":"https://www.kantesti.net/api/dashboard/","support":"api@kantesti.net","scopes":["analyze","modules","sandbox"],"max_active_keys":20,"expiry":{"optional":true,"format":"YYYY-MM-DD","min_days_ahead":1,"max_days_ahead":730,"valid_through":"end of that day, UTC","after":{"code":"AUTH_1005","http":401}},"ip_allowlist":{"optional":true,"max_entries":10,"entries":"IPv4 or IPv6 addresses or CIDR ranges","other_addresses":{"code":"AUTH_1006","http":403}},"revoked":{"code":"AUTH_1005","http":401},"outside_scope":{"code":"AUTH_1002","http":401}}}