{"openapi":"3.1.0","info":{"title":"Maskena API","version":"1.1.0","description":"Detects prompt injection, hidden content and data leaks in texts and files before they reach a language model, and removes personal data. Errors always return JSON with a human-readable detail and a stable code. Send a User-Agent that identifies your application, for example my-app/1.4.","termsOfService":"https://maskena.com/termos?lang=en"},"externalDocs":{"description":"Documentation","url":"https://maskena.com/docs?lang=en"},"servers":[{"url":"https://maskena.com"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Text"},{"name":"Files"},{"name":"RAG"},{"name":"Account"}],"paths":{"/api/v1/me":{"get":{"operationId":"getAccount","tags":["Account"],"summary":"Plan, usage and credits","parameters":[{"name":"lang","in":"query","required":false,"description":"Language of titles, descriptions and messages. Alternatively, send Accept-Language.","schema":{"type":"string","enum":["en","pt","es"]}}],"responses":{"200":{"description":"Success.","headers":{"X-Terms-Update-Required":{"description":"Present when the account has not yet accepted the current Terms of Use. Requests keep working; accept the new version on the website.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"Missing or invalid API key. Codes: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account email is not confirmed, or the option requires a higher plan. Codes: email_not_verified, plan_required, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/check":{"post":{"operationId":"checkText","tags":["Text"],"summary":"Check a text or prompt","description":"Run before sending user input, a web page or a retrieved RAG passage to the model. Nothing is stored. Each call uses one text check from the monthly quota; prepaid credits do not apply. Rate limit: 600 requests per minute.","parameters":[{"name":"lang","in":"query","required":false,"description":"Language of titles, descriptions and messages. Alternatively, send Accept-Language.","schema":{"type":"string","enum":["en","pt","es"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"},"example":{"text":"Summarize this email: ...","clean":true}}}},"responses":{"200":{"description":"Success.","headers":{"X-Terms-Update-Required":{"description":"Present when the account has not yet accepted the current Terms of Use. Requests keep working; accept the new version on the website.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckResult"}}}},"400":{"description":"Invalid request: invalid option, empty or corrupted file. Codes: invalid_request, invalid_json, invalid_option, invalid_document, empty_file, empty_text.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key. Codes: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Monthly quota for this operation is used up and there are not enough prepaid credits. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account email is not confirmed, or the option requires a higher plan. Codes: email_not_verified, plan_required, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File or text larger than the limit of the plan. Codes: file_too_large, text_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A required field is missing or has the wrong type. Codes: validation_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Processing failed. Any charge for the request is refunded. Codes: processing_failed, internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/scan":{"post":{"operationId":"scanFile","tags":["Files"],"summary":"Scan a file","description":"Analyzes the file in memory and returns the report. The original file is not stored. When the file contains personal data or dangerous passages, clean versions are available for a limited time (clean_files). Uses one file scan from the monthly quota or one prepaid credit. Rate limit: 60 requests per minute.","parameters":[{"name":"lang","in":"query","required":false,"description":"Language of titles, descriptions and messages. Alternatively, send Accept-Language.","schema":{"type":"string","enum":["en","pt","es"]}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"PDF, DOCX, XLSX, PPTX, ODF, HTML, SVG, TXT, MD, CSV, JSON, YAML, source code, PNG, JPEG or ZIP. Maximum file size by plan: Free 5 MB, Essential 10 MB, Pro 10 MB, Business 25 MB."},"depth":{"$ref":"#/components/schemas/Depth"},"sensitivity":{"$ref":"#/components/schemas/Sensitivity"}}}}}},"responses":{"200":{"description":"Success.","headers":{"X-Terms-Update-Required":{"description":"Present when the account has not yet accepted the current Terms of Use. Requests keep working; accept the new version on the website.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanReport"}}}},"400":{"description":"Invalid request: invalid option, empty or corrupted file. Codes: invalid_request, invalid_json, invalid_option, invalid_document, empty_file, empty_text.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key. Codes: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Monthly quota for this operation is used up and there are not enough prepaid credits. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account email is not confirmed, or the option requires a higher plan. Codes: email_not_verified, plan_required, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File or text larger than the limit of the plan. Codes: file_too_large, text_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A required field is missing or has the wrong type. Codes: validation_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Processing failed. Any charge for the request is refunded. Codes: processing_failed, internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/scans/{scan_id}":{"get":{"operationId":"getScan","tags":["Files"],"summary":"Retrieve a scan report","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lang","in":"query","required":false,"description":"Language of titles, descriptions and messages. Alternatively, send Accept-Language.","schema":{"type":"string","enum":["en","pt","es"]}}],"responses":{"200":{"description":"Success.","headers":{"X-Terms-Update-Required":{"description":"Present when the account has not yet accepted the current Terms of Use. Requests keep working; accept the new version on the website.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanReport"}}}},"401":{"description":"Missing or invalid API key. Codes: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account email is not confirmed, or the option requires a higher plan. Codes: email_not_verified, plan_required, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, expired, or owned by another account. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/scans/{scan_id}/clean.{fmt}":{"get":{"operationId":"downloadCleanFile","tags":["Files"],"summary":"Download a clean version","description":"Same format as the original when possible (docx, pdf, png, jpg), plus txt. The key format returns the JSON map used to restore names in a model response (paid plans).","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fmt","in":"path","required":true,"schema":{"type":"string","examples":["docx","pdf","png","jpg","txt","key"]}}],"responses":{"200":{"description":"File content.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing or invalid API key. Codes: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account email is not confirmed, or the option requires a higher plan. Codes: email_not_verified, plan_required, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, expired, or owned by another account. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/sanitize":{"post":{"operationId":"sanitizeDocument","tags":["RAG"],"summary":"Sanitize a document for RAG","description":"Returns only the safe content of the document, split into chunks ready to index. Each page uses one page from the monthly quota; when the quota is used up, one prepaid credit covers 20 pages. Rate limit: 20 requests per minute.","parameters":[{"name":"lang","in":"query","required":false,"description":"Language of titles, descriptions and messages. Alternatively, send Accept-Language.","schema":{"type":"string","enum":["en","pt","es"]}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"PDF (up to 300 pages), DOCX, XLSX, PPTX, ODF, HTML, TXT, MD or images (images require OCR). ZIP files are not accepted. Maximum file size by plan: Free 5 MB, Essential 10 MB, Pro 10 MB, Business 25 MB."},"ocr":{"type":"string","enum":["auto","full","off"],"default":"auto","description":"auto: OCR on scanned pages. full: OCR on every page and cross-check against the text layer (Pro and Business). off: no OCR."},"policy":{"type":"string","enum":["redact","drop","flag"],"default":"redact","description":"redact: remove the malicious sentence. drop: move the whole chunk to quarantine (excluded from chunks.jsonl). flag: keep the text and mark the chunk."},"chunk_size":{"type":"integer","default":1200,"minimum":200,"maximum":8000,"description":"Characters per chunk. Values outside the range are clamped."},"chunk_overlap":{"type":"integer","default":150,"minimum":0,"description":"Characters of overlap between chunks, at most half of chunk_size."},"personal_data":{"type":"string","enum":["true","false"],"default":"true","description":"Replace personal data with placeholders. Names and addresses on paid plans."}}}}}},"responses":{"200":{"description":"Success.","headers":{"X-Terms-Update-Required":{"description":"Present when the account has not yet accepted the current Terms of Use. Requests keep working; accept the new version on the website.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SanitizeResult"}}}},"400":{"description":"Invalid request: invalid option, empty or corrupted file. Codes: invalid_request, invalid_json, invalid_option, invalid_document, empty_file, empty_text.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key. Codes: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Monthly quota for this operation is used up and there are not enough prepaid credits. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account email is not confirmed, or the option requires a higher plan. Codes: email_not_verified, plan_required, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File or text larger than the limit of the plan. Codes: file_too_large, text_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A required field is missing or has the wrong type. Codes: validation_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Processing failed. Any charge for the request is refunded. Codes: processing_failed, internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/sanitize/{job_id}":{"get":{"operationId":"getSanitizeResult","tags":["RAG"],"summary":"Retrieve a sanitize result","description":"Available until expires_at (24 hours to 7 days, depending on the plan).","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lang","in":"query","required":false,"description":"Language of titles, descriptions and messages. Alternatively, send Accept-Language.","schema":{"type":"string","enum":["en","pt","es"]}}],"responses":{"200":{"description":"Success.","headers":{"X-Terms-Update-Required":{"description":"Present when the account has not yet accepted the current Terms of Use. Requests keep working; accept the new version on the website.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SanitizeResult"}}}},"401":{"description":"Missing or invalid API key. Codes: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account email is not confirmed, or the option requires a higher plan. Codes: email_not_verified, plan_required, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, expired, or owned by another account. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/sanitize/{job_id}/chunks.jsonl":{"get":{"operationId":"downloadChunks","tags":["RAG"],"summary":"Download chunks as JSON Lines","description":"One JSON object per line: {\"id\", \"text\", \"metadata\": {\"source\", \"sha256\", \"page_start\", \"page_end\", \"risk\", \"risk_level\", \"status\", \"sanitizer\"}}. Compatible with LangChain and LlamaIndex loaders.","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"JSON Lines.","content":{"application/x-ndjson":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid API key. Codes: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account email is not confirmed, or the option requires a higher plan. Codes: email_not_verified, plan_required, forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, expired, or owned by another account. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key created in the dashboard, under API (sfk_...). Up to two keys can be active at the same time, for rotation without downtime."}},"schemas":{"Error":{"type":"object","required":["detail","code"],"properties":{"detail":{"type":"string","description":"Human-readable message in the language of the request. It may change; do not parse it."},"code":{"type":"string","enum":["invalid_request","invalid_json","invalid_option","invalid_document","empty_file","empty_text","missing_api_key","invalid_api_key","quota_exceeded","email_not_verified","plan_required","forbidden","not_found","method_not_allowed","file_too_large","text_too_large","validation_error","rate_limited","processing_failed","internal_error","unavailable"],"description":"Stable error code. Use it in your application logic."},"fields":{"type":"array","items":{"type":"string"},"description":"Only for validation_error: the fields that are missing or invalid."}}},"Verdict":{"type":"string","enum":["safe","suspicious","dangerous"]},"Severity":{"type":"string","enum":["info","low","medium","high","critical"]},"Depth":{"type":"string","enum":["fast","standard","max"],"description":"fast: rules and statistical classifier. standard (default): adds a language-model classifier. max: adds Llama Prompt Guard 2 (paid plans; on other plans the request runs as standard)."},"Finding":{"type":"object","properties":{"rule_id":{"type":"string","examples":["PI-001"]},"category":{"type":"string","examples":["prompt_injection","hidden_content","data_exfiltration","agent_abuse","unicode","file_structure","secret_leak"]},"severity":{"$ref":"#/components/schemas/Severity"},"title":{"type":"string"},"description":{"type":"string"},"evidence":{"type":"string","description":"Excerpt that triggered the finding. Secrets are masked."},"location":{"type":"string","description":"Where the excerpt was found (file reports only)."},"occurrences":{"type":"integer"}}},"Billing":{"type":"object","properties":{"source":{"type":"string","enum":["quota","credits"],"description":"quota: monthly plan allowance. credits: prepaid credits."},"kind":{"type":"string","enum":["scans","pages","checks"]},"amount":{"type":"integer"}}},"Account":{"type":"object","properties":{"email":{"type":"string"},"plan":{"type":"string","enum":["free","essential","pro","business"]},"plan_name":{"type":"string"},"unlimited":{"type":"boolean","description":"true on internal accounts without a monthly quota."},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"scans_used":{"type":"integer"},"scans_limit":{"type":"integer"},"pages_used":{"type":"integer"},"pages_limit":{"type":"integer"},"checks_used":{"type":"integer"},"checks_limit":{"type":"integer"},"credits":{"type":"integer","description":"Prepaid credits available."},"subscription_status":{"type":["string","null"]},"cancel_at_period_end":{"type":"boolean"}}},"Sensitivity":{"type":"string","enum":["normal","high"],"default":"normal","description":"normal (default): only strong classifier signals change the verdict. high: medium signals also make the content suspicious, which finds more attacks embedded in documents and raises more false alarms. All plans. When omitted, the preference saved in the account applies."},"CheckRequest":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":32000},"format":{"type":"string","enum":["text","markdown","html"],"default":"text","description":"With html, comments and hidden elements are also inspected."},"depth":{"$ref":"#/components/schemas/Depth"},"sensitivity":{"$ref":"#/components/schemas/Sensitivity"},"clean":{"type":"boolean","default":false,"description":"Return clean_text: dangerous passages removed and personal data replaced by placeholders such as [EMAIL 1]."}}},"CheckResult":{"type":"object","properties":{"verdict":{"$ref":"#/components/schemas/Verdict"},"score":{"type":"integer","minimum":0,"maximum":100},"flagged":{"type":"boolean","description":"true when verdict is not safe: block or review."},"depth":{"$ref":"#/components/schemas/Depth"},"sensitivity":{"$ref":"#/components/schemas/Sensitivity"},"layers":{"type":"array","items":{"type":"string"},"description":"Detection layers that ran, for example rules, tfidf, e5, prompt_guard."},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"notes":{"type":"array","items":{"type":"string"}},"personal_data":{"type":"object","properties":{"total":{"type":"integer"},"occurrences":{"type":"integer"},"counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"Occurrences by type, for example cpf, cnpj, email, phone, ssn, person.","examples":[{"email":1,"ssn":1}]}}},"clean_text":{"type":"string","description":"Only when clean is true."},"duration_ms":{"type":"integer"},"lang":{"type":"string"},"billing":{"$ref":"#/components/schemas/Billing"}}},"CleanFile":{"type":"object","properties":{"format":{"type":"string","examples":["docx","pdf","png","jpg","txt","key"]},"filename":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"url":{"type":"string","format":"uri"}}},"ScanReport":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"filename":{"type":"string"},"sha256":{"type":"string"},"size":{"type":"integer"},"detected_type":{"type":"string","examples":["pdf","office","html","text","png","zip"]},"verdict":{"$ref":"#/components/schemas/Verdict"},"score":{"type":"integer","minimum":0,"maximum":100},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"},"description":"Ordered from most to least severe."},"depth":{"$ref":"#/components/schemas/Depth"},"sensitivity":{"$ref":"#/components/schemas/Sensitivity"},"layers":{"type":"array","items":{"type":"string"}},"notes":{"type":"array","items":{"type":"string"}},"personal_data":{"type":"object","description":"Summary of what the clean version replaced.","properties":{"total":{"type":"integer"},"occurrences":{"type":"integer"},"counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"Occurrences by type, for example cpf, cnpj, email, phone, ssn, person.","examples":[{"email":1,"ssn":1}]},"hidden_removed":{"type":"integer"},"threats_removed":{"type":"integer"},"secrets_removed":{"type":"integer"},"ocr_pages":{"type":"integer"},"annotations_removed":{"type":"boolean"},"metadata_removed":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}},"options":{"type":"object","description":"Personal data types replaced."},"formats":{"type":"array","items":{"type":"string"}},"key":{"type":"boolean","description":"true when clean.key is available."},"tags_lang":{"type":"string","description":"Language of the placeholders."}}},"engine_version":{"type":"string"},"extracted_chars":{"type":"integer","description":"Characters of text extracted from the file."},"duration_ms":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"lang":{"type":"string"},"clean_files":{"type":"array","items":{"$ref":"#/components/schemas/CleanFile"}},"billing":{"$ref":"#/components/schemas/Billing","description":"Only on POST /api/v1/scan."}}},"Chunk":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"page_start":{"type":"integer"},"page_end":{"type":"integer"},"status":{"type":"string","enum":["ok","redacted","quarantined","flagged"]},"risk_before":{"type":"number"},"risk_after":{"type":"number"},"risk_level":{"type":"string","description":"Label in the language of the request."},"findings":{"type":"array","items":{"type":"string"}},"signals":{"type":"array","items":{"type":"string"}}}},"SanitizeResult":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"filename":{"type":"string"},"sha256":{"type":"string"},"detected_type":{"type":"string"},"engine_version":{"type":"string"},"options":{"type":"object"},"stats":{"type":"object","description":"Pages, OCR usage, characters before and after, chunks, and counts of removed content by category."},"risk_before":{"type":"object","properties":{"score":{"type":"integer"},"verdict":{"$ref":"#/components/schemas/Verdict"}}},"risk_after":{"type":"object","properties":{"score":{"type":"integer"},"verdict":{"$ref":"#/components/schemas/Verdict"},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"},"description":"What remains in the clean content."}}},"removed":{"type":"array","description":"Each removed passage with category, reason, excerpt and page.","items":{"type":"object","properties":{"category":{"type":"string"},"reason":{"type":"string"},"excerpt":{"type":"string"},"page":{"type":["integer","null"]}}}},"chunks":{"type":"array","items":{"$ref":"#/components/schemas/Chunk"}},"clean_markdown":{"type":"string"},"ocr_available":{"type":"boolean"},"pages":{"type":"array","description":"Per-page extraction details (method, OCR, hidden runs).","items":{"type":"object"}},"notes":{"type":"array","items":{"type":"string"}},"original_findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"},"description":"Findings in the original document, before sanitization."},"pages_billed":{"type":"integer"},"credits_charged":{"type":"integer","description":"Prepaid credits used (0 when the monthly quota covered the request)."},"billing":{"$ref":"#/components/schemas/Billing"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"lang":{"type":"string"}}}}}}