{"openapi":"3.1.0","info":{"title":"Nugget Document Intelligence API","description":"\nNugget is a document intelligence API for OCR, extraction, classification, semantic location, and reasoning workflows.\n\n- Authenticate requests with the `x-api-key` header.\n- Upload once with `POST /v1/uploads`, then reuse the tenant-scoped `file_id`.\n- Call `POST /v1/ocr`; a `200` is inline and a `202` includes a polling URL.\n- Use typed JSON requests with `file_id`; multipart direct uploads are also supported.\n- Use `execution: \"async\"` for a durable job; `\"auto\"` permits inline completion.\n- Call `POST /v1/extractions` with the supported JSON Schema profile and poll the returned job URL.\n- Extraction returns plain `data` with a separate JSON-Pointer-keyed `provenance` map.\n- Supported inputs include PDF, images, CSV, and XLSX.\n- See the [quickstart](/quickstart) for complete curl examples.\n- See [public release notes](/changelog) for contract changes and deprecations.\n- Use [/redoc](/redoc) for a reference-oriented view.\n- Read [jobs and retries](/guides/jobs), [schemas and provenance](/guides/schema),\n  [retention](/guides/retention), and the [agent guide](/guides/agents).\n- Download guides as Markdown through [/llms.txt](/llms.txt). Product v3 retains `/v1` paths.\n","contact":{"name":"Nugget"},"license":{"name":"Proprietary","url":"https://api.nugget25m.com/terms"},"version":"3.3.0"},"servers":[{"url":"https://api.nugget25m.com","description":"Nugget API"}],"paths":{"/v1/extractions":{"post":{"tags":["Extraction"],"summary":"Create Extraction","operationId":"createExtraction","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateResponse"}}},"headers":{"Location":{"description":"Authenticated relative polling URL.","schema":{"type":"string"}},"Retry-After":{"description":"Suggested minimum delay in seconds before polling.","schema":{"type":"integer","minimum":1}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency conflict/in-progress reservation or sealed upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The keyed job has been deleted or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}],"requestBody":{"required":true,"description":"JSON is the canonical upload-ID interface. Multipart also supports direct file bytes; encode object/array fields as JSON strings. Legacy request JSON form fields remain accepted for classify/locate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionDocumentBody"},"examples":{"uploadedDocument":{"summary":"Replace UPLOAD_ID and MODEL_ID with values from uploads and model discovery.","value":{"file_id":"UPLOAD_ID","model":"MODEL_ID","execution":"async","schema":{"type":"object","properties":{"customer":{"type":"string"}}}}}}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExtractionDocumentBodyMultipart"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Tenant- and operation-scoped queued creation key. Use execution=async for OCR/classify/locate. Retry identical arguments to recover the original accepted URL; mismatches return 409. Default record retention is 24 hours; see /guides/jobs.","schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[!-~]+$"}}],"x-codeSamples":[{"lang":"Shell","label":"curl (replace example IDs)","source":"curl --fail-with-body \"$NUGGET_BASE_URL/v1/extractions\" \\\n  -H \"x-api-key: $NUGGET_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  --data-binary '{\n  \"file_id\": \"UPLOAD_ID\",\n  \"model\": \"MODEL_ID\",\n  \"execution\": \"async\",\n  \"schema\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"customer\": {\n        \"type\": \"string\"\n      }\n    }\n  }\n}'"}]}},"/v1/extractions_text":{"post":{"tags":["Extraction"],"summary":"Extract structured fields from raw text","description":"Extract structured fields from a raw text string using a JSON schema-like definition. This endpoint is synchronous and does not include OCR geometry or callback support.","operationId":"extractText","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractTextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractTextResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}]}},"/v1/uploads":{"post":{"tags":["Uploads"],"summary":"Upload Document","operationId":"uploadDocument","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_uploadDocument"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}]}},"/v1/uploads/{file_id}":{"delete":{"tags":["Uploads"],"summary":"Delete an upload and everything derived from it","description":"Seals the upload so new requests using this file_id get 404, then deletes the source file and everything Nugget derived from its bytes for this organization: file-scoped and shared OCR text, raw Document AI output, Document AI scratch, and extract, locate, classify, split and summarize cache entries. Cache entries written for the same bytes later are dropped as soon as they are written. While a job or request is still using the file, returns 409 upload_busy with Retry-After; retry to finish. Repeating a completed deletion returns 204. Job records and results are not deleted; use the job DELETE endpoints. See the data retention guide for what remains.","operationId":"deleteUpload","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"description":"Unknown file_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"upload_busy: retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}}},"/v1/extractions/{job_id}":{"get":{"tags":["Extraction"],"summary":"Get Extraction Status","operationId":"getExtraction","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}},"delete":{"tags":["Extraction"],"summary":"Delete Extraction","operationId":"deleteExtraction","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}}},"/v1/classify":{"post":{"tags":["Classification"],"summary":"Classify Document","operationId":"classifyDocument","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyResponse"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateResponse"}}},"headers":{"Location":{"description":"Authenticated relative polling URL.","schema":{"type":"string"}},"Retry-After":{"description":"Suggested minimum delay in seconds before polling.","schema":{"type":"integer","minimum":1}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency conflict/in-progress reservation or sealed upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The keyed job has been deleted or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}],"requestBody":{"required":true,"description":"JSON is the canonical upload-ID interface. Multipart also supports direct file bytes; encode object/array fields as JSON strings. Legacy request JSON form fields remain accepted for classify/locate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassificationDocumentBody"},"examples":{"uploadedDocument":{"summary":"Replace UPLOAD_ID and MODEL_ID with values from uploads and model discovery.","value":{"file_id":"UPLOAD_ID","model":"MODEL_ID","categories":[{"name":"invoice","description":"Request for payment for goods or services"},{"name":"unknown","description":"None of the supplied categories applies"}]}}}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ClassificationDocumentBodyMultipart"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Tenant- and operation-scoped queued creation key. Use execution=async for OCR/classify/locate. Retry identical arguments to recover the original accepted URL; mismatches return 409. Default record retention is 24 hours; see /guides/jobs.","schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[!-~]+$"}}],"x-codeSamples":[{"lang":"Shell","label":"curl (replace example IDs)","source":"curl --fail-with-body \"$NUGGET_BASE_URL/v1/classify\" \\\n  -H \"x-api-key: $NUGGET_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  --data-binary '{\n  \"file_id\": \"UPLOAD_ID\",\n  \"model\": \"MODEL_ID\",\n  \"categories\": [\n    {\n      \"name\": \"invoice\",\n      \"description\": \"Request for payment for goods or services\"\n    },\n    {\n      \"name\": \"unknown\",\n      \"description\": \"None of the supplied categories applies\"\n    }\n  ]\n}'"}]}},"/v1/classification_jobs/{job_id}":{"get":{"tags":["Classification"],"summary":"Classification Status","operationId":"getClassificationJob","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassificationJobStatusResponse"}}}},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, revoked, or invalid organization API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}},"delete":{"tags":["Classification"],"summary":"Classification Delete","operationId":"deleteClassificationJob","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, revoked, or invalid organization API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}}},"/v1/classify_text":{"post":{"tags":["Classification"],"summary":"Classify raw text","description":"Classify a raw text string into one of the provided categories. This endpoint is synchronous and does not use file upload input or OCR provenance.","operationId":"classifyText","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyTextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}]}},"/v1/split":{"post":{"tags":["Classification"],"summary":"Split a composite PDF","description":"Split and classify a composite PDF into logical documents using DocAI. Returned pages are 1-based indices (DocAI uses 0-based internally). usecase is required to select the splitter processor.","operationId":"splitDocument","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_split_document_v1_split_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}]}},"/v1/ocr":{"post":{"tags":["OCR"],"summary":"OCR a document","description":"OCR a document. execution=auto returns 200 inline or a durable queued 202; execution=async always returns a job. A callback also selects async. Metadata alone does not select async.\n\nRequest examples for the `options` form field:\n\n- Basic OCR: `{\"include_tokens\": false}`\n- Page-filtered OCR: `{\"pages\": [1, 3], \"include_segments\": true}`\n- Raw DocAI artifact: `{\"include_raw_docai\": true}`\n\nAsync webhook form fields example: `callback_url=https://example.com/nugget/ocr`, `callback_signing_secret=at-least-32-bytes-long-secret-value`, `client_metadata={\"workflow_id\":\"wf_123\"}`.","operationId":"createOcr","responses":{"200":{"description":"OCR completed inline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrResponse"},"example":{"text":"Customer: Acme","pages":[{"page_number":1,"text":"Customer: Acme","width":612.0,"height":792.0,"unit":"POINT"}],"page_count":1,"timings_ms":{"total":742},"cache":{"ocr":"miss"}}}}},"202":{"description":"OCR queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrJobCreateResponse"},"example":{"job_id":"ocr_123","status":"queued","status_url":"/v1/ocr_jobs/ocr_123","created_at":"2026-06-11T18:00:00Z","updated_at":"2026-06-11T18:00:00Z"}}},"headers":{"Location":{"description":"Authenticated relative polling URL.","schema":{"type":"string"}},"Retry-After":{"description":"Suggested minimum delay in seconds before polling.","schema":{"type":"integer","minimum":1}}}},"400":{"description":"Invalid options JSON, unsupported file type, or missing file/file_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency conflict/in-progress reservation or sealed upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The keyed job has been deleted or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}],"requestBody":{"required":true,"description":"JSON is the canonical upload-ID interface. Multipart also supports direct file bytes; encode object/array fields as JSON strings. Legacy request JSON form fields remain accepted for classify/locate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrDocumentBody"},"examples":{"uploadedDocument":{"summary":"Replace UPLOAD_ID and MODEL_ID with values from uploads and model discovery.","value":{"file_id":"UPLOAD_ID","execution":"auto","options":{"include_tokens":false}}}}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/OcrDocumentBodyMultipart"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Tenant- and operation-scoped queued creation key. Use execution=async for OCR/classify/locate. Retry identical arguments to recover the original accepted URL; mismatches return 409. Default record retention is 24 hours; see /guides/jobs.","schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[!-~]+$"}}],"x-codeSamples":[{"lang":"Shell","label":"curl (replace example IDs)","source":"curl --fail-with-body \"$NUGGET_BASE_URL/v1/ocr\" \\\n  -H \"x-api-key: $NUGGET_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  --data-binary '{\n  \"file_id\": \"UPLOAD_ID\",\n  \"execution\": \"auto\",\n  \"options\": {\n    \"include_tokens\": false\n  }\n}'"}]}},"/v1/ocr_jobs/{job_id}":{"get":{"tags":["OCR"],"summary":"Get Ocr Job Status","operationId":"getOcrJob","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrJobStatusResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"description":"OCR job not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}},"delete":{"tags":["OCR"],"summary":"Delete Ocr Job","operationId":"deleteOcrJob","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}}},"/v1/ocr/artifacts/{doc_hash}/raw_docai/{artifact_id}":{"get":{"tags":["OCR"],"summary":"Get Raw Docai Artifact","operationId":"getRawOcrArtifact","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"doc_hash","in":"path","required":true,"schema":{"type":"string","title":"Doc Hash"}},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"description":"Raw DocAI artifact not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}}},"/v1/locate":{"post":{"tags":["Location"],"summary":"Locate Document Regions Route","operationId":"locateDocument","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateResponse"}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateJobCreateResponse"}}},"headers":{"Location":{"description":"Authenticated relative polling URL.","schema":{"type":"string"}},"Retry-After":{"description":"Suggested minimum delay in seconds before polling.","schema":{"type":"integer","minimum":1}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency conflict/in-progress reservation or sealed upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The keyed job has been deleted or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}],"requestBody":{"required":true,"description":"JSON is the canonical upload-ID interface. Multipart also supports direct file bytes; encode object/array fields as JSON strings. Legacy request JSON form fields remain accepted for classify/locate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateDocumentBody"},"examples":{"uploadedDocument":{"summary":"Replace UPLOAD_ID and MODEL_ID with values from uploads and model discovery.","value":{"file_id":"UPLOAD_ID","model":"MODEL_ID","targets":[{"name":"payment_terms","description":"Payment deadlines and accepted payment methods"}]}}}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/LocateDocumentBodyMultipart"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Tenant- and operation-scoped queued creation key. Use execution=async for OCR/classify/locate. Retry identical arguments to recover the original accepted URL; mismatches return 409. Default record retention is 24 hours; see /guides/jobs.","schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[!-~]+$"}}],"x-codeSamples":[{"lang":"Shell","label":"curl (replace example IDs)","source":"curl --fail-with-body \"$NUGGET_BASE_URL/v1/locate\" \\\n  -H \"x-api-key: $NUGGET_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  --data-binary '{\n  \"file_id\": \"UPLOAD_ID\",\n  \"model\": \"MODEL_ID\",\n  \"targets\": [\n    {\n      \"name\": \"payment_terms\",\n      \"description\": \"Payment deadlines and accepted payment methods\"\n    }\n  ]\n}'"}]}},"/v1/locate_jobs":{"post":{"tags":["Location"],"summary":"Create Locate Job","operationId":"createLocateJob","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateJobCreateResponse"}}},"headers":{"Location":{"description":"Authenticated relative polling URL.","schema":{"type":"string"}},"Retry-After":{"description":"Suggested minimum delay in seconds before polling.","schema":{"type":"integer","minimum":1}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency conflict/in-progress reservation or sealed upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The keyed job has been deleted or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}],"requestBody":{"required":true,"description":"JSON is the canonical upload-ID interface. Multipart also supports direct file bytes; encode object/array fields as JSON strings. Legacy request JSON form fields remain accepted for classify/locate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateDocumentBody"},"examples":{"uploadedDocument":{"summary":"Replace UPLOAD_ID and MODEL_ID with values from uploads and model discovery.","value":{"file_id":"UPLOAD_ID","model":"MODEL_ID","execution":"async","targets":[{"name":"payment_terms","description":"Payment deadlines and accepted payment methods"}]}}}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/LocateDocumentBodyMultipart"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Tenant- and operation-scoped queued creation key. Use execution=async for OCR/classify/locate. Retry identical arguments to recover the original accepted URL; mismatches return 409. Default record retention is 24 hours; see /guides/jobs.","schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[!-~]+$"}}],"x-codeSamples":[{"lang":"Shell","label":"curl (replace example IDs)","source":"curl --fail-with-body \"$NUGGET_BASE_URL/v1/locate_jobs\" \\\n  -H \"x-api-key: $NUGGET_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  --data-binary '{\n  \"file_id\": \"UPLOAD_ID\",\n  \"model\": \"MODEL_ID\",\n  \"execution\": \"async\",\n  \"targets\": [\n    {\n      \"name\": \"payment_terms\",\n      \"description\": \"Payment deadlines and accepted payment methods\"\n    }\n  ]\n}'"}]}},"/v1/locate_jobs/{job_id}":{"get":{"tags":["Location"],"summary":"Get Locate Job Status","operationId":"getLocateJob","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocateJobStatusResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}},"delete":{"tags":["Location"],"summary":"Delete Locate Job","operationId":"deleteLocateJob","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}}},"/v1/resolve":{"post":{"tags":["Reasoning"],"summary":"Resolve Conflicts Route","operationId":"resolveConflicts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}]}},"/v1/mappings":{"post":{"tags":["Reasoning"],"summary":"Select Best Mapping Route","operationId":"selectMapping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}]}},"/v1/infer":{"post":{"tags":["Reasoning"],"summary":"Infer Structured Route","operationId":"inferStructuredData","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}]}},"/v1/review":{"post":{"tags":["Reasoning"],"summary":"Review a structured JSON result","description":"Reviews an existing JSON candidate against its JSON Schema using tenant-supplied inline sources. Nugget validates the candidate before model work, derives a deterministic annotated patch, and returns changed, unchanged, or inconclusive. An optional Idempotency-Key coalesces concurrent retries and preserves the original review_id for 24 hours.","operationId":"reviewStructuredResult","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Optional tenant-scoped retry key. Reusing it with a different normalized request returns 409; successful results replay for 24 hours.","title":"Idempotency-Key"},"description":"Optional tenant-scoped retry key. Reusing it with a different normalized request returns 409; successful results replay for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewResponse"}}}},"400":{"description":"Invalid request or candidate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Upstream model rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"502":{"description":"Invalid or failed model output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Review service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"504":{"description":"Review deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/summarize":{"post":{"tags":["Reasoning"],"summary":"Write a grounded prose summary of typed sources","description":"Summarizes inline JSON/text sources and uploaded files into prose whose every named fact is cited back to a supplied source. Nugget validates citations against the request sources (file pages cite as /pages/<n>), enforces output.max_chars and output.format, and repairs once before returning 422. An optional Idempotency-Key coalesces concurrent retries for 24 hours.","operationId":"summarizeSources","security":[{"NuggetApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"Optional tenant-scoped retry key. Reusing it with a different normalized request returns 409; successful results replay for 24 hours.","title":"Idempotency-Key"},"description":"Optional tenant-scoped retry key. Reusing it with a different normalized request returns 409; successful results replay for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizeResponse"}}}},"400":{"description":"Invalid request or over-size input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown file_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency-Key conflict or sealed upload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"ungrounded_citation or constraint_violation after repair","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Upstream model rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"502":{"description":"Malformed or failed model output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Summarize service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"504":{"description":"Summarize deadline exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/version":{"get":{"tags":["System"],"summary":"Version","description":"Identify this serving build; unknown values indicate an unversioned build.\n\nThe image digest in deployment metadata remains the artifact identity.","operationId":"getBuildVersion","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Getbuildversion"}}}},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, revoked, or invalid organization API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}}}},"/v1/health":{"get":{"tags":["System"],"summary":"Health","operationId":"getHealth","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health V1 Health Get"}}}}}}},"/v1/models":{"get":{"tags":["System"],"summary":"List selectable models","description":"Return the models advertised by this deployment's enabled providers, from live provider catalogs, after the optional allowed_models lockdown. Callers must pass one of these ids in the request 'model' field.","operationId":"listModels","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsResponse"}}}},"400":{"description":"Invalid request. See error.details for argument locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, revoked, or invalid organization API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate or quota limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}},"503":{"description":"Temporary capacity, catalog, or quota-service unavailability.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"When present, wait at least this many seconds (or until the HTTP date) before retrying. Creation retries require special care; see /guides/jobs.","schema":{"type":"string"}}}}},"security":[{"NuggetApiKey":[]}]}},"/v1/ready":{"get":{"tags":["System"],"summary":"Ready","operationId":"getReadiness","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Ready V1 Ready Get"}}}}}}}},"webhooks":{"jobCallback":{"post":{"tags":["Webhooks"],"summary":"Job Callback","description":"Webhook Nugget POSTs to your `callback_url` when an async job (extraction, OCR, or\nlocate) reaches a terminal state.\n\nDelivery is at-least-once via Cloud Tasks (a three-execution delivery budget;\npermanent receiver rejection stops earlier). Return a fast 2xx to acknowledge and\ndeduplicate on `event_id`. Verify `X-Nugget-Signature` before\ntrusting the body. The URL must be public HTTPS; redirects are not followed and\nprivate/reserved IPs are rejected.","operationId":"receiveJobCallback","parameters":[{"description":"Stable event identity across attempts; matches the signed event_id in the body.","required":true,"schema":{"type":"string","title":"X-Nugget-Event-Id","description":"Stable event identity across attempts; matches the signed event_id in the body."},"name":"X-Nugget-Event-Id","in":"header"},{"description":"Event type: '<extraction|ocr|locate>.<completed|failed>'.","required":true,"schema":{"type":"string","enum":["extraction.completed","extraction.failed","ocr.completed","ocr.failed","locate.completed","locate.failed"],"title":"X-Nugget-Event","description":"Event type: '<extraction|ocr|locate>.<completed|failed>'."},"name":"X-Nugget-Event","in":"header"},{"description":"The job id this callback is for.","required":true,"schema":{"type":"string","title":"X-Nugget-Job-Id","description":"The job id this callback is for."},"name":"X-Nugget-Job-Id","in":"header"},{"description":"Unique per delivery attempt; changes on retry. Deduplicate on event_id, not this.","required":true,"schema":{"type":"string","title":"X-Nugget-Delivery-Id","description":"Unique per delivery attempt; changes on retry. Deduplicate on event_id, not this."},"name":"X-Nugget-Delivery-Id","in":"header"},{"description":"'sha256=<lowercase-hex>': HMAC-SHA256 of the raw request body keyed by the job's callback_signing_secret. Verify against the raw bytes received.","required":true,"schema":{"type":"string","title":"X-Nugget-Signature","description":"'sha256=<lowercase-hex>': HMAC-SHA256 of the raw request body keyed by the job's callback_signing_secret. Verify against the raw bytes received."},"name":"X-Nugget-Signature","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ApiErrorBody":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{},{"type":"null"}],"title":"Details"},"retryable":{"type":"boolean","title":"Retryable"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["code","message","details","retryable","request_id"],"title":"ApiErrorBody"},"BBoxConvention":{"properties":{"unit":{"type":"string","const":"normalized","title":"Unit","default":"normalized"},"origin":{"type":"string","const":"top-left","title":"Origin","default":"top-left"},"y_axis":{"type":"string","const":"down","title":"Y Axis","default":"down"}},"type":"object","title":"BBoxConvention"},"Body_split_document_v1_split_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"usecase":{"type":"string","title":"Usecase"},"options":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Options"}},"type":"object","required":["usecase"],"title":"Body_split_document_v1_split_post"},"Body_uploadDocument":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"pdf_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Password"}},"type":"object","required":["file"],"title":"Body_uploadDocument"},"BoundingBox":{"properties":{"x_min":{"type":"number","title":"X Min"},"y_min":{"type":"number","title":"Y Min"},"x_max":{"type":"number","title":"X Max"},"y_max":{"type":"number","title":"Y Max"}},"type":"object","required":["x_min","y_min","x_max","y_max"],"title":"BoundingBox"},"CallbackPayload":{"properties":{"event_id":{"type":"string","title":"Event Id","description":"Stable terminal event identity; unchanged across delivery attempts. Use for deduplication after verifying the signature."},"event":{"type":"string","enum":["extraction.completed","extraction.failed","ocr.completed","ocr.failed","locate.completed","locate.failed"],"title":"Event","description":"Signed terminal event type; matches X-Nugget-Event."},"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["queued","processing","succeeded","failed"],"title":"Status","description":"Terminal status: 'succeeded' or 'failed'."},"stage":{"anyOf":[{"type":"string","enum":["queued","prepare","ocr","extract_queued","extract","locate","succeeded","failed"]},{"type":"null"}],"title":"Stage"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model used (extraction/locate); omitted for OCR."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"result":{"anyOf":[{"$ref":"#/components/schemas/PublicExtractionResult"},{"$ref":"#/components/schemas/LocateResponse"},{"type":"null"}],"title":"Result","description":"Endpoint-specific result, matching the corresponding GET /v1/.../{job_id} response body. Null for OCR callbacks (fetch via status_url) and failed jobs."},"error":{"anyOf":[{"$ref":"#/components/schemas/JobFailure"},{"type":"null"}]},"cache":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cache"},"callback":{"anyOf":[{"$ref":"#/components/schemas/CallbackState"},{"type":"null"}],"description":"Callback delivery state (status, attempt count, timestamps)."},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"},"status_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Url","description":"Present for OCR/locate jobs: GET it (with x-api-key) to fetch the full result."},"client_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Metadata","description":"Opaque client-provided metadata echoed from job creation."}},"type":"object","required":["event_id","event","job_id","status","created_at","updated_at"],"title":"CallbackPayload","description":"JSON body Nugget POSTs to a job's ``callback_url`` when it reaches a terminal state.\n\nSerialized as compact UTF-8 JSON (no inserted whitespace). The HMAC in the\n``X-Nugget-Signature`` header is computed over these exact raw bytes, so verify\nagainst the raw request body you receive — not a re-serialized copy."},"CallbackState":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"status":{"anyOf":[{"type":"string","enum":["enqueued","delivering","retrying","delivered","callback_failed"]},{"type":"null"}],"title":"Status","description":"Delivery lifecycle state."},"attempt_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Count","description":"1-based delivery attempt number."},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code","description":"HTTP status code returned by the receiver on the latest attempt."},"delivery_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Id","description":"Matches the X-Nugget-Delivery-Id header of the latest attempt."},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"ISO-8601 send time of the current attempt (signed; usable for a replay window)."},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At","description":"ISO-8601; set once status is 'delivered'."},"failed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failed At","description":"ISO-8601; set once status is 'callback_failed'."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Failure reason when retrying/failed: 'delivery_failed', 'delivery_rejected', 'delivery_blocked_unsafe_host', or 'callback_secret_unavailable'."}},"type":"object","title":"CallbackState","description":"Nugget's delivery bookkeeping for a job's callback, echoed in the ``callback``\nfield of both the webhook body and the polling status response.\n\nBefore the delivery task starts, polling reports ``enqueued``. In the webhook body\nitself, ``status`` is ``delivering`` (it is being sent now); the terminal states\n(``delivered`` / ``retrying`` / ``callback_failed``) become visible by polling\n``GET /v1/.../{job_id}``. ``updated_at`` is the send time of the current attempt\nand is covered by the body signature, so it is safe to use for a replay-window check."},"ClassificationJobStatusResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["queued","processing","succeeded","failed"],"title":"Status"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"result":{"anyOf":[{"$ref":"#/components/schemas/ClassifyResponse"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/JobFailure"},{"type":"null"}]}},"type":"object","required":["job_id","status","created_at","updated_at"],"title":"ClassificationJobStatusResponse"},"ClassifyCategory":{"additionalProperties":false,"properties":{"name":{"maxLength":200,"title":"Name","type":"string"},"description":{"maxLength":2000,"title":"Description","type":"string"}},"required":["name","description"],"title":"ClassifyCategory","type":"object"},"ClassifyResponse":{"properties":{"result":{"$ref":"#/components/schemas/ClassifyResult"},"model":{"type":"string","title":"Model"},"timings_ms":{"additionalProperties":{"type":"integer"},"type":"object","title":"Timings Ms"},"cache":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Cache"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["result","model","timings_ms"],"title":"ClassifyResponse"},"ClassifyResult":{"properties":{"doc_type":{"type":"string","title":"Doc Type"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"}},"type":"object","required":["doc_type","confidence"],"title":"ClassifyResult"},"ClassifyTextRequest":{"properties":{"text":{"type":"string","maxLength":1000000,"minLength":1,"title":"Text"},"categories":{"items":{"$ref":"#/components/schemas/ClassifyCategory"},"type":"array","maxItems":50,"title":"Categories"},"instructions":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Instructions"},"model":{"type":"string","title":"Model","description":"Exact ID from GET /v1/models."}},"additionalProperties":false,"type":"object","required":["text","categories","model"],"title":"ClassifyTextRequest"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ApiErrorBody"}},"type":"object","required":["error"],"title":"ErrorResponse"},"Evidence":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page","description":"1-based page number"},"quote":{"type":"string","title":"Quote"},"bbox":{"anyOf":[{"$ref":"#/components/schemas/BoundingBox"},{"type":"null"}]},"match_method":{"anyOf":[{"type":"string","enum":["exact","normalized","fuzzy","value"]},{"type":"null"}],"title":"Match Method","description":"How the quote was located in the OCR text: exact substring, Unicode/whitespace-normalized substring (match_score below 1 when list markers or end punctuation were trimmed), fuzzy alignment, or value-only fallback."},"match_score":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Match Score","description":"Normalized textual similarity between the claimed quote and located text; ambiguity is reported separately."},"ambiguous":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ambiguous","description":"True when the location is uncertain: the text is printed more than once and no rule settled which copy, it is too short to locate without its label or row, it sits inside a longer word, or neighbouring rows placed it. A cited-page occurrence is preferred."},"value_box":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Value Box","description":"With options.value_evidence_boxes: true when bbox was narrowed to the printed value. Absent when bbox still covers the whole quote."}},"type":"object","required":["page","quote"],"title":"Evidence"},"ExtractTextRequest":{"properties":{"text":{"type":"string","maxLength":1000000,"minLength":1,"title":"Text"},"schema":{"additionalProperties":true,"type":"object","title":"Schema"},"options":{"anyOf":[{"$ref":"#/components/schemas/TextExtractionOptions"},{"type":"null"}]},"model":{"type":"string","title":"Model","description":"Exact ID from GET /v1/models."}},"additionalProperties":false,"type":"object","required":["text","schema","model"],"title":"ExtractTextRequest"},"ExtractTextResponse":{"properties":{"result":{"$ref":"#/components/schemas/PublicExtractionResult"},"model":{"type":"string","title":"Model"},"timings_ms":{"additionalProperties":{"type":"integer"},"type":"object","title":"Timings Ms"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["result","model","timings_ms"],"title":"ExtractTextResponse"},"FieldProvenance":{"properties":{"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence","description":"Model confidence, not a calibrated probability."},"array_confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Array Confidence"},"evidence":{"items":{"$ref":"#/components/schemas/Evidence"},"type":"array","title":"Evidence"},"raw_value":{"anyOf":[{},{"type":"null"}],"title":"Raw Value","description":"Original value before normalization, when available."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Field-level missing/grounding error; null means no recorded error."}},"type":"object","title":"FieldProvenance","description":"Evidence for a value addressed by an RFC 6901 JSON Pointer into data."},"FileSummarizeSource":{"properties":{"id":{"type":"string","maxLength":128,"minLength":1,"title":"Id","description":"Request-scoped, case-sensitive source ID used by citations."},"type":{"type":"string","const":"file","title":"Type","description":"Source variant: a file from POST /v1/uploads."},"file_id":{"type":"string","maxLength":128,"minLength":1,"title":"File Id","description":"Tenant-scoped id from POST /v1/uploads."},"ephemeral":{"type":"boolean","title":"Ephemeral","description":"Seal the upload for this final consumer and delete it and its derivatives once every active consumer finishes (same contract as /v1/extractions).","default":false}},"additionalProperties":false,"type":"object","required":["id","type","file_id"],"title":"FileSummarizeSource"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InferConstraints":{"properties":{"enums":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Enums"},"max_items":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Max Items"}},"additionalProperties":false,"type":"object","title":"InferConstraints"},"InferEvidence":{"properties":{"fields_used":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fields Used"},"excerpts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Excerpts"}},"type":"object","title":"InferEvidence"},"InferMeta":{"properties":{"model":{"type":"string","title":"Model"},"cached":{"type":"boolean","title":"Cached"},"request_id":{"type":"string","title":"Request Id"}},"type":"object","required":["model","cached","request_id"],"title":"InferMeta"},"InferOptions":{"properties":{"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"cache":{"type":"boolean","title":"Cache","default":true},"include_reason_codes":{"type":"boolean","title":"Include Reason Codes","default":true},"include_evidence":{"type":"boolean","title":"Include Evidence","default":false}},"additionalProperties":false,"type":"object","title":"InferOptions"},"InferRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Exact ID from GET /v1/models."},"instructions":{"type":"string","maxLength":10000,"minLength":1,"title":"Instructions"},"schema":{"additionalProperties":true,"type":"object","title":"Schema"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"constraints":{"anyOf":[{"$ref":"#/components/schemas/InferConstraints"},{"type":"null"}]},"options":{"anyOf":[{"$ref":"#/components/schemas/InferOptions"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["model","instructions","schema","input"],"title":"InferRequest"},"InferResponse":{"properties":{"result":{"$ref":"#/components/schemas/InferResult"},"meta":{"$ref":"#/components/schemas/InferMeta"}},"type":"object","required":["result","meta"],"title":"InferResponse"},"InferResult":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"reason_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Reason Codes"},"evidence":{"anyOf":[{"$ref":"#/components/schemas/InferEvidence"},{"type":"null"}]}},"type":"object","required":["data","confidence"],"title":"InferResult"},"InlineReviewSource":{"properties":{"id":{"type":"string","maxLength":128,"minLength":1,"title":"Id","description":"Request-scoped, case-sensitive source ID used by citations."},"type":{"type":"string","const":"inline","title":"Type","description":"Source variant: inline JSON or text content."},"kind":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Kind","description":"Optional caller-defined source category."},"content":{"$ref":"#/components/schemas/JsonValue","description":"Model-visible and citable JSON source content."}},"additionalProperties":false,"type":"object","required":["id","type","content"],"title":"InlineReviewSource"},"JobCreateResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["queued","processing","succeeded","failed"],"title":"Status"},"status_url":{"type":"string","title":"Status Url","description":"Relative authenticated polling URL. Resolve against this deployment's base URL."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["job_id","status","status_url","created_at","updated_at"],"title":"JobCreateResponse"},"JobFailure":{"properties":{"code":{"type":"string","title":"Code","description":"Stable failure code. invalid_document and invalid_input concern the submitted input; other codes concern the account or the service.","default":"job_failed"},"message":{"type":"string","title":"Message"},"retryable":{"type":"boolean","title":"Retryable","description":"Whether a new operation for the same input may succeed. Polling never restarts a terminal job.","default":false}},"type":"object","required":["message"],"title":"JobFailure"},"JobStatusResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["queued","processing","succeeded","failed"],"title":"Status","description":"Job status: queued, processing, succeeded, or failed."},"stage":{"anyOf":[{"type":"string","enum":["queued","prepare","ocr","extract_queued","extract","locate","succeeded","failed"]},{"type":"null"}],"title":"Stage"},"model":{"type":"string","title":"Model"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"result":{"anyOf":[{"$ref":"#/components/schemas/PublicExtractionResult"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/JobFailure"},{"type":"null"}]},"cache":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cache"},"callback":{"anyOf":[{"$ref":"#/components/schemas/CallbackState"},{"type":"null"}],"description":"Callback delivery state when a callback URL was provided."},"client_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Metadata","description":"Opaque client-provided metadata echoed from job creation."},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["job_id","status","model","created_at","updated_at"],"title":"JobStatusResponse"},"JsonValue":{},"LocateEvidence":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page"},"quote":{"type":"string","title":"Quote"}},"type":"object","required":["page","quote"],"title":"LocateEvidence"},"LocateJobCreateResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["queued","processing","succeeded","failed"],"title":"Status","description":"Job status: queued, processing, succeeded, or failed."},"status_url":{"type":"string","title":"Status Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["job_id","status","status_url","created_at","updated_at"],"title":"LocateJobCreateResponse"},"LocateJobStatusResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["queued","processing","succeeded","failed"],"title":"Status"},"stage":{"anyOf":[{"type":"string","enum":["queued","prepare","ocr","extract_queued","extract","locate","succeeded","failed"]},{"type":"null"}],"title":"Stage"},"model":{"type":"string","title":"Model"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"result":{"anyOf":[{"$ref":"#/components/schemas/LocateResponse"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/JobFailure"},{"type":"null"}]},"cache":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cache"},"callback":{"anyOf":[{"$ref":"#/components/schemas/CallbackState"},{"type":"null"}],"description":"Callback delivery state when a callback URL was provided."},"client_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Metadata","description":"Opaque client-provided metadata echoed from job creation."},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["job_id","status","model","created_at","updated_at"],"title":"LocateJobStatusResponse"},"LocateRegion":{"properties":{"target":{"type":"string","title":"Target"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"section_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Id"},"page_start":{"type":"integer","minimum":1.0,"title":"Page Start"},"page_end":{"type":"integer","minimum":1.0,"title":"Page End"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"evidence":{"items":{"$ref":"#/components/schemas/LocateEvidence"},"type":"array","title":"Evidence"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["target","page_start","page_end","confidence"],"title":"LocateRegion"},"LocateResponse":{"properties":{"regions":{"items":{"$ref":"#/components/schemas/LocateRegion"},"type":"array","title":"Regions"},"page_count":{"type":"integer","minimum":1.0,"title":"Page Count"},"model":{"type":"string","title":"Model"},"timings_ms":{"additionalProperties":{"type":"integer"},"type":"object","title":"Timings Ms"},"cache":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Cache"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["regions","page_count","model","timings_ms"],"title":"LocateResponse"},"MappingCandidate":{"properties":{"id":{"type":"string","minLength":1,"title":"Id"},"label":{"type":"string","maxLength":512,"minLength":1,"title":"Label"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"additionalProperties":false,"type":"object","required":["id","label"],"title":"MappingCandidate"},"MappingInput":{"properties":{"text":{"type":"string","maxLength":512,"minLength":1,"title":"Text"},"normalized":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Normalized"}},"additionalProperties":false,"type":"object","required":["text"],"title":"MappingInput"},"MappingRequest":{"properties":{"input":{"$ref":"#/components/schemas/MappingInput"},"candidates":{"items":{"$ref":"#/components/schemas/MappingCandidate"},"type":"array","maxItems":50,"minItems":1,"title":"Candidates","description":"Candidate IDs must be unique."},"instructions":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Instructions"},"model":{"type":"string","title":"Model","description":"Exact ID from GET /v1/models."}},"additionalProperties":false,"type":"object","required":["input","candidates","model"],"title":"MappingRequest"},"MappingResponse":{"properties":{"decision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"reason":{"type":"string","minLength":1,"title":"Reason"}},"type":"object","required":["confidence","reason"],"title":"MappingResponse"},"ModelInfo":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier to pass in the request 'model' field."},"provider":{"type":"string","enum":["google","anthropic","anthropic-api","openai"],"title":"Provider","description":"Serving provider: google (Gemini on Vertex), anthropic (Claude on Vertex), anthropic-api (Claude on the Anthropic API), or openai (OpenAI API)."}},"type":"object","required":["id","provider"],"title":"ModelInfo","description":"A model an external caller may select via the request ``model`` field."},"ModelsResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelInfo"},"type":"array","title":"Models"}},"type":"object","required":["models"],"title":"ModelsResponse","description":"Discovery payload so a client site can render a model selector."},"OcrJobCreateResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["queued","processing","succeeded","failed"],"title":"Status","description":"Job status: queued, processing, succeeded, or failed."},"status_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["job_id","status","created_at","updated_at"],"title":"OcrJobCreateResponse"},"OcrJobStatusResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["queued","processing","succeeded","failed"],"title":"Status"},"stage":{"anyOf":[{"type":"string","enum":["queued","prepare","ocr","extract_queued","extract","locate","succeeded","failed"]},{"type":"null"}],"title":"Stage"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"result":{"anyOf":[{"$ref":"#/components/schemas/OcrResponse"},{"type":"null"}],"description":"Full OCR result, present when status is succeeded."},"error":{"anyOf":[{"$ref":"#/components/schemas/JobFailure"},{"type":"null"}]},"cache":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cache"},"callback":{"anyOf":[{"$ref":"#/components/schemas/CallbackState"},{"type":"null"}],"description":"Callback delivery state when a callback URL was provided."},"client_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Client Metadata","description":"Opaque client-provided metadata echoed from job creation."},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["job_id","status","created_at","updated_at"],"title":"OcrJobStatusResponse"},"OcrPage":{"properties":{"page_number":{"type":"integer","minimum":1.0,"title":"Page Number"},"text":{"type":"string","title":"Text"},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"segments":{"anyOf":[{"items":{"$ref":"#/components/schemas/OcrSegment"},"type":"array"},{"type":"null"}],"title":"Segments"},"tokens":{"anyOf":[{"items":{"$ref":"#/components/schemas/OcrToken"},"type":"array"},{"type":"null"}],"title":"Tokens"}},"type":"object","required":["page_number","text"],"title":"OcrPage"},"OcrRawDocaiArtifact":{"properties":{"available":{"type":"boolean","title":"Available"},"format":{"type":"string","title":"Format","default":"documentai-jsonl"},"artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifact Id"},"artifact_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifact Url","description":"Relative URL to download raw DocAI JSONL output."},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"type":"object","required":["available"],"title":"OcrRawDocaiArtifact"},"OcrResponse":{"properties":{"text":{"type":"string","title":"Text"},"pages":{"items":{"$ref":"#/components/schemas/OcrPage"},"type":"array","title":"Pages"},"page_count":{"type":"integer","minimum":0.0,"title":"Page Count"},"timings_ms":{"additionalProperties":{"type":"integer"},"type":"object","title":"Timings Ms"},"cache":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Cache"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"},"raw_docai":{"anyOf":[{"$ref":"#/components/schemas/OcrRawDocaiArtifact"},{"type":"null"}]}},"type":"object","required":["text","pages","page_count","timings_ms"],"title":"OcrResponse"},"OcrSegment":{"properties":{"page_start":{"type":"integer","title":"Page Start"},"page_end":{"type":"integer","title":"Page End"},"doc_start":{"type":"integer","title":"Doc Start"},"doc_end":{"type":"integer","title":"Doc End"}},"type":"object","required":["page_start","page_end","doc_start","doc_end"],"title":"OcrSegment"},"OcrToken":{"properties":{"doc_start":{"type":"integer","title":"Doc Start"},"doc_end":{"type":"integer","title":"Doc End"},"bbox":{"$ref":"#/components/schemas/BoundingBox"}},"type":"object","required":["doc_start","doc_end","bbox"],"title":"OcrToken"},"PageGeometry":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page","description":"1-based page number"},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},"type":"object","required":["page"],"title":"PageGeometry"},"PublicExtractionResult":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data","description":"Plain extracted values. Missing values may be null; inspect provenance errors. This is not a guarantee of full schema validation."},"provenance":{"additionalProperties":{"$ref":"#/components/schemas/FieldProvenance"},"type":"object","title":"Provenance","description":"RFC 6901 JSON Pointer to evidence and confidence, e.g. /items/0/price. Escape ~ as ~0 and / as ~1."},"bbox_convention":{"$ref":"#/components/schemas/BBoxConvention"},"pages":{"anyOf":[{"items":{"$ref":"#/components/schemas/PageGeometry"},"type":"array"},{"type":"null"}],"title":"Pages"},"provenance_granularity":{"type":"string","enum":["scalar","row","cell"],"title":"Provenance Granularity","default":"scalar"},"provenance_truncated":{"type":"boolean","title":"Provenance Truncated","default":false}},"type":"object","required":["data","provenance"],"title":"PublicExtractionResult"},"ResolveCandidate":{"properties":{"id":{"type":"string","maxLength":200,"title":"Id"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"source":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Source"}},"additionalProperties":false,"type":"object","required":["id","value"],"title":"ResolveCandidate"},"ResolveFieldRequest":{"properties":{"target":{"type":"string","maxLength":200,"title":"Target"},"mode":{"type":"string","enum":["choose_one","merge_text","merge_structured"],"title":"Mode"},"source_priority":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Source Priority"},"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema"},"candidates":{"items":{"$ref":"#/components/schemas/ResolveCandidate"},"type":"array","maxItems":100,"title":"Candidates"}},"additionalProperties":false,"type":"object","required":["target","mode","candidates"],"title":"ResolveFieldRequest"},"ResolveOptions":{"properties":{"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"cache":{"type":"boolean","title":"Cache","default":true},"source_priority_mode":{"type":"string","enum":["llm_hint","override_conflicts"],"title":"Source Priority Mode","default":"llm_hint"}},"additionalProperties":false,"type":"object","title":"ResolveOptions"},"ResolveRequest":{"properties":{"instructions":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Instructions"},"model":{"type":"string","title":"Model","description":"Exact ID from GET /v1/models."},"options":{"anyOf":[{"$ref":"#/components/schemas/ResolveOptions"},{"type":"null"}]},"fields":{"items":{"$ref":"#/components/schemas/ResolveFieldRequest"},"type":"array","maxItems":100,"title":"Fields"}},"additionalProperties":false,"type":"object","required":["model","fields"],"title":"ResolveRequest"},"ResolveResolution":{"properties":{"target":{"type":"string","title":"Target"},"mode":{"type":"string","title":"Mode"},"decision":{"type":"string","enum":["chosen_one","merged","ambiguous","missing"],"title":"Decision"},"reason":{"type":"string","minLength":1,"title":"Reason"},"chosen_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chosen Id"},"merged_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merged Value"},"merged_object":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Merged Object"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"}},"type":"object","required":["target","mode","decision","reason","confidence"],"title":"ResolveResolution"},"ResolveResponse":{"properties":{"result":{"$ref":"#/components/schemas/ResolveResult"},"model":{"type":"string","title":"Model"},"timings_ms":{"additionalProperties":{"type":"integer"},"type":"object","title":"Timings Ms"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["result","model","timings_ms"],"title":"ResolveResponse"},"ResolveResult":{"properties":{"resolutions":{"items":{"$ref":"#/components/schemas/ResolveResolution"},"type":"array","title":"Resolutions"}},"type":"object","required":["resolutions"],"title":"ResolveResult"},"ReviewAssessment":{"properties":{"explanation":{"type":"string","maxLength":10000,"minLength":1,"title":"Explanation","description":"Overall explanation for the review disposition."},"citations":{"items":{"$ref":"#/components/schemas/ReviewCitation"},"type":"array","maxItems":100,"title":"Citations","description":"Sources supporting the overall assessment."}},"additionalProperties":false,"type":"object","required":["explanation","citations"],"title":"ReviewAssessment"},"ReviewCitation":{"properties":{"source_id":{"type":"string","maxLength":128,"minLength":1,"title":"Source Id","description":"Exact ID of a source supplied in this Review request."},"pointer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pointer","description":"Optional canonical RFC 6901 pointer into the source content. Omit it to cite the complete source; an empty string cites the source root."}},"additionalProperties":false,"type":"object","required":["source_id"],"title":"ReviewCitation"},"ReviewConstraints":{"properties":{"mutable_paths":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":100},{"type":"null"}],"title":"Mutable Paths","description":"Canonical RFC 6901 subtrees that may change. Omit for unrestricted changes; an empty array permits no changes."},"max_patch_operations":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Max Patch Operations","description":"Maximum deterministic patch operations before the review is inconclusive.","default":50}},"additionalProperties":false,"type":"object","title":"ReviewConstraints"},"ReviewIssue":{"properties":{"severity":{"type":"string","enum":["info","warning","error"],"title":"Severity","description":"Issue materiality; warning or error makes the review inconclusive."},"message":{"type":"string","maxLength":5000,"minLength":1,"title":"Message"},"paths":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Paths"},"citations":{"items":{"$ref":"#/components/schemas/ReviewCitation"},"type":"array","maxItems":100,"title":"Citations"}},"additionalProperties":false,"type":"object","required":["severity","message","paths","citations"],"title":"ReviewIssue"},"ReviewMeta":{"properties":{"model":{"type":"string","title":"Model"},"cached":{"type":"boolean","title":"Cached"},"idempotent_replay":{"type":"boolean","title":"Idempotent Replay"},"request_id":{"type":"string","title":"Request Id"},"review_id":{"type":"string","title":"Review Id"},"review_version":{"type":"string","title":"Review Version","description":"Review prompt, normalization, and repair version."},"diff_profile":{"type":"string","title":"Diff Profile","description":"Deterministic patch algorithm used for this result."},"schema_profile":{"type":"string","title":"Schema Profile","description":"JSON Schema profile used for validation."},"timings_ms":{"$ref":"#/components/schemas/ReviewTimings"}},"additionalProperties":false,"type":"object","required":["model","cached","idempotent_replay","request_id","review_id","review_version","diff_profile","schema_profile","timings_ms"],"title":"ReviewMeta"},"ReviewOptions":{"properties":{"cache":{"type":"boolean","title":"Cache","description":"Read and write the tenant-scoped semantic Review cache.","default":true}},"additionalProperties":false,"type":"object","title":"ReviewOptions"},"ReviewPatchAdd":{"properties":{"path":{"type":"string","title":"Path","description":"Canonical RFC 6901 path changed by this operation."},"reason":{"type":"string","maxLength":5000,"minLength":1,"title":"Reason"},"citations":{"items":{"$ref":"#/components/schemas/ReviewCitation"},"type":"array","maxItems":100,"minItems":1,"title":"Citations"},"op":{"type":"string","const":"add","title":"Op"},"value":{"$ref":"#/components/schemas/JsonValue"}},"additionalProperties":false,"type":"object","required":["path","reason","citations","op","value"],"title":"ReviewPatchAdd"},"ReviewPatchOperation":{"oneOf":[{"$ref":"#/components/schemas/ReviewPatchAdd"},{"$ref":"#/components/schemas/ReviewPatchRemove"},{"$ref":"#/components/schemas/ReviewPatchReplace"}],"discriminator":{"propertyName":"op","mapping":{"add":"#/components/schemas/ReviewPatchAdd","remove":"#/components/schemas/ReviewPatchRemove","replace":"#/components/schemas/ReviewPatchReplace"}}},"ReviewPatchRemove":{"properties":{"path":{"type":"string","title":"Path","description":"Canonical RFC 6901 path changed by this operation."},"reason":{"type":"string","maxLength":5000,"minLength":1,"title":"Reason"},"citations":{"items":{"$ref":"#/components/schemas/ReviewCitation"},"type":"array","maxItems":100,"minItems":1,"title":"Citations"},"op":{"type":"string","const":"remove","title":"Op"},"previous_value":{"$ref":"#/components/schemas/JsonValue"}},"additionalProperties":false,"type":"object","required":["path","reason","citations","op","previous_value"],"title":"ReviewPatchRemove"},"ReviewPatchReplace":{"properties":{"path":{"type":"string","title":"Path","description":"Canonical RFC 6901 path changed by this operation."},"reason":{"type":"string","maxLength":5000,"minLength":1,"title":"Reason"},"citations":{"items":{"$ref":"#/components/schemas/ReviewCitation"},"type":"array","maxItems":100,"minItems":1,"title":"Citations"},"op":{"type":"string","const":"replace","title":"Op"},"value":{"$ref":"#/components/schemas/JsonValue"},"previous_value":{"$ref":"#/components/schemas/JsonValue"}},"additionalProperties":false,"type":"object","required":["path","reason","citations","op","value","previous_value"],"title":"ReviewPatchReplace"},"ReviewRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Exact ID from GET /v1/models."},"instructions":{"type":"string","maxLength":10000,"minLength":1,"title":"Instructions","description":"Caller review rubric. Data embedded in other fields remains untrusted."},"schema":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","title":"Schema","description":"nugget-json-schema-v1 schema for both submitted and reviewed candidates."},"candidate":{"$ref":"#/components/schemas/JsonValue","description":"Existing schema-valid JSON value under review."},"context":{"$ref":"#/components/schemas/JsonValue","description":"Optional model-visible, non-citable JSON context."},"sources":{"items":{"$ref":"#/components/schemas/ReviewSource"},"type":"array","maxItems":100,"title":"Sources","description":"Ordered caller-issued sources available for citation."},"constraints":{"anyOf":[{"$ref":"#/components/schemas/ReviewConstraints"},{"type":"null"}],"description":"Optional mutation and patch-size constraints."},"options":{"anyOf":[{"$ref":"#/components/schemas/ReviewOptions"},{"type":"null"}],"description":"Review execution options."},"client_metadata":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Client Metadata","description":"Opaque JSON echoed in the response and never sent to the model."}},"additionalProperties":false,"type":"object","required":["model","instructions","schema","candidate","sources"],"title":"ReviewRequest"},"ReviewResponse":{"properties":{"result":{"$ref":"#/components/schemas/ReviewResult"},"meta":{"$ref":"#/components/schemas/ReviewMeta"},"client_metadata":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Client Metadata"}},"additionalProperties":false,"type":"object","required":["result","meta"],"title":"ReviewResponse"},"ReviewResult":{"properties":{"outcome":{"type":"string","enum":["unchanged","changed","inconclusive"],"title":"Outcome","description":"Server-derived factual review disposition."},"reviewed_candidate":{"$ref":"#/components/schemas/JsonValue","description":"Full schema-valid reviewed value; equals the submitted candidate unless changed."},"assessment":{"$ref":"#/components/schemas/ReviewAssessment"},"patch":{"items":{"$ref":"#/components/schemas/ReviewPatchOperation"},"type":"array","maxItems":100,"title":"Patch"},"issues":{"items":{"$ref":"#/components/schemas/ReviewIssue"},"type":"array","maxItems":100,"title":"Issues"}},"additionalProperties":false,"type":"object","required":["outcome","reviewed_candidate","assessment","patch","issues"],"title":"ReviewResult"},"ReviewSource":{"oneOf":[{"$ref":"#/components/schemas/InlineReviewSource"}],"discriminator":{"propertyName":"type","mapping":{"inline":"#/components/schemas/InlineReviewSource"}}},"ReviewTimings":{"properties":{"pre_model_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pre Model Ms"},"semaphore_wait_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Semaphore Wait Ms"},"thread_wait_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thread Wait Ms"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"model":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Model"}},"additionalProperties":false,"type":"object","required":["total"],"title":"ReviewTimings"},"SplitItem":{"properties":{"doc_type":{"type":"string","title":"Doc Type","description":"Document type label"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"pages":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Pages","description":"1-based page numbers included in the split"}},"type":"object","required":["doc_type","confidence","pages"],"title":"SplitItem"},"SplitResponse":{"properties":{"usecase":{"type":"string","title":"Usecase","description":"Usecase used to select the splitter processor"},"processor":{"type":"string","title":"Processor","description":"DocAI processor resource used"},"entities":{"items":{"$ref":"#/components/schemas/SplitItem"},"type":"array","title":"Entities"},"timings_ms":{"additionalProperties":{"type":"integer"},"type":"object","title":"Timings Ms"},"cache":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Cache"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["usecase","processor","entities","timings_ms"],"title":"SplitResponse"},"SummarizeMeta":{"properties":{"model":{"type":"string","title":"Model"},"cached":{"type":"boolean","title":"Cached"},"idempotent_replay":{"type":"boolean","title":"Idempotent Replay"},"request_id":{"type":"string","title":"Request Id"},"summarize_version":{"type":"string","title":"Summarize Version","description":"Summarize prompt, grounding, and repair version."},"timings_ms":{"$ref":"#/components/schemas/ReviewTimings"}},"additionalProperties":false,"type":"object","required":["model","cached","idempotent_replay","request_id","summarize_version","timings_ms"],"title":"SummarizeMeta"},"SummarizeOptions":{"properties":{"temperature":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"Sampling temperature forwarded to the model. Default 0 (deterministic). Bounded to the range every supported provider accepts; reasoning models may ignore it."},"cache":{"type":"boolean","title":"Cache","description":"Read and write the tenant-scoped semantic Summarize cache.","default":true},"pages":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Pages","description":"1-based pages to read from every file source. Exclusive with page_ranges."},"page_ranges":{"anyOf":[{"items":{"$ref":"#/components/schemas/SummarizePageRange"},"type":"array","maxItems":100},{"type":"null"}],"title":"Page Ranges","description":"Inclusive 1-based page ranges to read from every file source."}},"additionalProperties":false,"type":"object","title":"SummarizeOptions"},"SummarizeOutput":{"properties":{"max_chars":{"anyOf":[{"type":"integer","maximum":20000.0,"minimum":1.0},{"type":"null"}],"title":"Max Chars","description":"Hard cap on result.summary; enforced server-side."},"format":{"type":"string","enum":["plain","markdown"],"title":"Format","description":"plain forbids headers, lists, emphasis, and code; prose only.","default":"plain"},"nothing_notable_sentence":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Nothing Notable Sentence","description":"Caller-defined sentence the instructions tell the model to emit when there is nothing to report. A summary equal to it (ignoring surrounding whitespace) sets result.nothing_notable and returns no citations. Must itself satisfy max_chars and format."}},"additionalProperties":false,"type":"object","title":"SummarizeOutput"},"SummarizePageRange":{"properties":{"start":{"type":"integer","minimum":1.0,"title":"Start","description":"First page, 1-based, inclusive."},"end":{"type":"integer","minimum":1.0,"title":"End","description":"Last page, 1-based, inclusive."}},"additionalProperties":false,"type":"object","required":["start","end"],"title":"SummarizePageRange"},"SummarizeRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Exact ID from GET /v1/models."},"instructions":{"type":"string","maxLength":10000,"minLength":1,"title":"Instructions","description":"Caller-owned prompt: reader, scope, hard rules, examples. Everything in sources remains untrusted data."},"sources":{"items":{"$ref":"#/components/schemas/SummarizeSource"},"type":"array","maxItems":100,"minItems":1,"title":"Sources","description":"Ordered sources to summarize; the only things the summary may cite."},"output":{"anyOf":[{"$ref":"#/components/schemas/SummarizeOutput"},{"type":"null"}],"description":"Optional prose shaping (length, format, sentinel)."},"options":{"anyOf":[{"$ref":"#/components/schemas/SummarizeOptions"},{"type":"null"}],"description":"Execution options: temperature, cache, page selection."},"client_metadata":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Client Metadata","description":"Opaque JSON echoed in the response and never sent to the model."}},"additionalProperties":false,"type":"object","required":["model","instructions","sources"],"title":"SummarizeRequest"},"SummarizeResponse":{"properties":{"result":{"$ref":"#/components/schemas/SummarizeResult"},"meta":{"$ref":"#/components/schemas/SummarizeMeta"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"},"client_metadata":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Client Metadata"}},"additionalProperties":false,"type":"object","required":["result","meta"],"title":"SummarizeResponse"},"SummarizeResult":{"properties":{"summary":{"type":"string","maxLength":20000,"minLength":1,"title":"Summary"},"citations":{"items":{"$ref":"#/components/schemas/ReviewCitation"},"type":"array","maxItems":100,"title":"Citations","description":"Every source the summary relies on; validated against the request sources."},"nothing_notable":{"type":"boolean","title":"Nothing Notable","description":"True when the summary equals output.nothing_notable_sentence."}},"additionalProperties":false,"type":"object","required":["summary","citations","nothing_notable"],"title":"SummarizeResult"},"SummarizeSource":{"oneOf":[{"$ref":"#/components/schemas/InlineReviewSource"},{"$ref":"#/components/schemas/FileSummarizeSource"}],"discriminator":{"propertyName":"type","mapping":{"file":"#/components/schemas/FileSummarizeSource","inline":"#/components/schemas/InlineReviewSource"}}},"TextExtractionOptions":{"properties":{"instructions":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Instructions"},"field_normalizations":{"anyOf":[{"additionalProperties":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"},"type":"object"},{"type":"null"}],"title":"Field Normalizations"},"field_normalization_text":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Field Normalization Text"}},"additionalProperties":false,"type":"object","title":"TextExtractionOptions"},"UploadResponse":{"properties":{"file_id":{"type":"string","title":"File Id"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["file_id","content_type","size_bytes"],"title":"UploadResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"CallbackConfig":{"additionalProperties":false,"properties":{"url":{"description":"Public HTTPS receiver URL. Redirects and private addresses are rejected.","title":"Url","type":"string"},"signing_secret":{"description":"HMAC-SHA256 secret, at least 32 UTF-8 bytes. Verify signatures over raw request bytes.","minLength":1,"title":"Signing Secret","type":"string","writeOnly":true}},"required":["url","signing_secret"],"title":"CallbackConfig","type":"object"},"ExtractionOptions":{"additionalProperties":false,"properties":{"instructions":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Instructions"},"cache":{"default":true,"title":"Cache","type":"boolean"},"include_page_geometry":{"default":true,"title":"Include Page Geometry","type":"boolean"},"use_file_input":{"default":true,"title":"Use File Input","type":"boolean"},"expand_arrays":{"anyOf":[{"const":false,"type":"boolean"},{"enum":["items","leaves"],"type":"string"}],"default":false,"title":"Expand Arrays"},"expand_array_pointers":{"anyOf":[{"items":{"type":"string"},"maxItems":100,"type":"array"},{"type":"null"}],"default":null,"title":"Expand Array Pointers"},"max_array_items":{"default":1000,"maximum":5000,"minimum":0,"title":"Max Array Items","type":"integer"},"max_total_fields":{"default":10000,"maximum":50000,"minimum":0,"title":"Max Total Fields","type":"integer"},"pages":{"anyOf":[{"items":{"minimum":1,"type":"integer"},"maxItems":1000,"type":"array"},{"type":"null"}],"default":null,"description":"1-based selected pages; mutually exclusive with page_ranges.","title":"Pages"},"page_ranges":{"anyOf":[{"items":{"$ref":"#/components/schemas/PageRange"},"maxItems":100,"type":"array"},{"type":"null"}],"default":null,"description":"Inclusive ranges; at most 1000 distinct selected pages.","title":"Page Ranges"},"chunk_pages":{"anyOf":[{"maximum":40,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Pages per model call for this request; defaults to the deployment's CHUNK_PAGES.","title":"Chunk Pages"},"evidence_repair":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Evidence Repair"},"value_evidence_boxes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Shrink each scalar field's evidence box to its printed value.","title":"Value Evidence Boxes"},"field_normalizations":{"anyOf":[{"additionalProperties":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Field Normalizations"},"field_normalization_text":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"default":null,"title":"Field Normalization Text"}},"title":"ExtractionOptions","type":"object"},"PageRange":{"additionalProperties":false,"properties":{"start":{"description":"Inclusive 1-based first page.","minimum":1,"title":"Start","type":"integer"},"end":{"description":"Inclusive last page, at least start and within the document.","minimum":1,"title":"End","type":"integer"}},"required":["start","end"],"title":"PageRange","type":"object"},"ExtractionDocumentBody":{"additionalProperties":false,"properties":{"file_id":{"type":"string","minLength":1,"description":"Upload ID returned by POST /v1/uploads. Must belong to this organization."},"execution":{"default":"auto","description":"auto permits an inline 200 or queued 202; async always creates a durable job. Poll the returned status_url; do not resubmit an accepted request.","enum":["auto","async"],"title":"Execution","type":"string"},"callback":{"anyOf":[{"$ref":"#/components/schemas/CallbackConfig"},{"type":"null"}],"default":null,"description":"Optional terminal notification. Configuring a callback selects async execution."},"client_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Opaque JSON object, at most 4096 serialized bytes. Echoed on queued jobs; does not select async execution.","title":"Client Metadata"},"schema":{"additionalProperties":true,"description":"Nugget's supported JSON Schema profile; see /guides/schema. $ref and boolean schemas are not supported.","title":"Schema","type":"object"},"model":{"description":"Exact available ID from GET /v1/models.","minLength":1,"title":"Model","type":"string"},"options":{"anyOf":[{"$ref":"#/components/schemas/ExtractionOptions"},{"type":"null"}],"default":null},"ephemeral":{"default":false,"description":"Seal this upload for its final extraction. Requires file_id. See the retention guide for deletion scope.","title":"Ephemeral","type":"boolean"}},"required":["schema","model","file_id"],"title":"ExtractionDocumentBody","type":"object"},"ExtractionDocumentBodyMultipart":{"type":"object","properties":{"file_id":{"type":"string","minLength":1,"description":"Upload ID returned by POST /v1/uploads. Must belong to this organization."},"execution":{"default":"auto","description":"auto permits an inline 200 or queued 202; async always creates a durable job. Poll the returned status_url; do not resubmit an accepted request.","enum":["auto","async"],"title":"Execution","type":"string"},"callback":{"type":"string","description":"JSON-encoded callback. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"anyOf":[{"$ref":"#/components/schemas/CallbackConfig"},{"type":"null"}],"default":null,"description":"Optional terminal notification. Configuring a callback selects async execution."}},"client_metadata":{"type":"string","description":"JSON-encoded client_metadata. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Opaque JSON object, at most 4096 serialized bytes. Echoed on queued jobs; does not select async execution.","title":"Client Metadata"}},"schema":{"type":"string","description":"JSON-encoded schema. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"additionalProperties":true,"description":"Nugget's supported JSON Schema profile; see /guides/schema. $ref and boolean schemas are not supported.","title":"Schema","type":"object"}},"model":{"description":"Exact available ID from GET /v1/models.","minLength":1,"title":"Model","type":"string"},"options":{"type":"string","description":"JSON-encoded options. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"anyOf":[{"$ref":"#/components/schemas/ExtractionOptions"},{"type":"null"}],"default":null}},"ephemeral":{"default":false,"description":"Seal this upload for its final extraction. Requires file_id. See the retention guide for deletion scope.","title":"Ephemeral","type":"boolean"},"file":{"type":"string","format":"binary","description":"Direct file bytes, mutually exclusive with file_id."},"pdf_password":{"type":"string","writeOnly":true,"description":"Only for direct encrypted PDF uploads. Passwords are not persisted; prepared document bytes may be stored for processing."}},"required":["schema","model"],"description":"Provide exactly one of file or file_id. This cross-field constraint is enforced by the server.","title":"ExtractionDocumentBodyMultipart"},"OcrOptions":{"additionalProperties":false,"properties":{"include_tokens":{"default":false,"description":"Include token spans and normalized bounding boxes. Token payloads can be large.","title":"Include Tokens","type":"boolean"},"include_segments":{"default":false,"description":"Include page/document text offset mappings.","title":"Include Segments","type":"boolean"},"include_raw_docai":{"default":false,"description":"Store provider raw output and return a raw DocAI artifact URL.","title":"Include Raw Docai","type":"boolean"},"pages":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"description":"1-based selected pages to return; OCR/cache may still process the full document.","title":"Pages"}},"title":"OcrOptions","type":"object"},"OcrDocumentBody":{"additionalProperties":false,"properties":{"file_id":{"type":"string","minLength":1,"description":"Upload ID returned by POST /v1/uploads. Must belong to this organization."},"execution":{"default":"auto","description":"auto permits an inline 200 or queued 202; async always creates a durable job. Poll the returned status_url; do not resubmit an accepted request.","enum":["auto","async"],"title":"Execution","type":"string"},"callback":{"anyOf":[{"$ref":"#/components/schemas/CallbackConfig"},{"type":"null"}],"default":null,"description":"Optional terminal notification. Configuring a callback selects async execution."},"client_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Opaque JSON object, at most 4096 serialized bytes. Echoed on queued jobs; does not select async execution.","title":"Client Metadata"},"options":{"$ref":"#/components/schemas/OcrOptions"}},"title":"OcrDocumentBody","type":"object","required":["file_id"]},"OcrDocumentBodyMultipart":{"type":"object","properties":{"file_id":{"type":"string","minLength":1,"description":"Upload ID returned by POST /v1/uploads. Must belong to this organization."},"execution":{"default":"auto","description":"auto permits an inline 200 or queued 202; async always creates a durable job. Poll the returned status_url; do not resubmit an accepted request.","enum":["auto","async"],"title":"Execution","type":"string"},"callback":{"type":"string","description":"JSON-encoded callback. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"anyOf":[{"$ref":"#/components/schemas/CallbackConfig"},{"type":"null"}],"default":null,"description":"Optional terminal notification. Configuring a callback selects async execution."}},"client_metadata":{"type":"string","description":"JSON-encoded client_metadata. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Opaque JSON object, at most 4096 serialized bytes. Echoed on queued jobs; does not select async execution.","title":"Client Metadata"}},"options":{"type":"string","description":"JSON-encoded options. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"$ref":"#/components/schemas/OcrOptions"}},"file":{"type":"string","format":"binary","description":"Direct file bytes, mutually exclusive with file_id."},"pdf_password":{"type":"string","writeOnly":true,"description":"Only for direct encrypted PDF uploads. Passwords are not persisted; prepared document bytes may be stored for processing."}},"required":[],"description":"Provide exactly one of file or file_id. This cross-field constraint is enforced by the server.","title":"OcrDocumentBodyMultipart"},"ClassificationDocumentBody":{"additionalProperties":false,"properties":{"categories":{"items":{"$ref":"#/components/schemas/ClassifyCategory"},"maxItems":50,"title":"Categories","type":"array"},"instructions":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Instructions"},"model":{"description":"Exact ID from GET /v1/models.","title":"Model","type":"string"},"use_file_input":{"default":true,"title":"Use File Input","type":"boolean"},"max_pages":{"anyOf":[{"maximum":8,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Max Pages"},"file_id":{"type":"string","minLength":1,"description":"Upload ID returned by POST /v1/uploads. Must belong to this organization."},"execution":{"default":"auto","description":"auto permits an inline 200 or queued 202; async always creates a durable job. Poll the returned status_url; do not resubmit an accepted request.","enum":["auto","async"],"title":"Execution","type":"string"},"ephemeral":{"default":false,"description":"Seal this upload for its final classification; when the call finishes, delete the source and everything classify made from it. Requires file_id. See the retention guide for deletion scope.","title":"Ephemeral","type":"boolean"}},"required":["categories","model","file_id"],"title":"ClassificationDocumentBody","type":"object"},"ClassificationDocumentBodyMultipart":{"type":"object","properties":{"categories":{"type":"string","description":"JSON-encoded categories. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"items":{"$ref":"#/components/schemas/ClassifyCategory"},"maxItems":50,"title":"Categories","type":"array"}},"instructions":{"anyOf":[{"maxLength":10000,"type":"string"},{"type":"null"}],"default":null,"title":"Instructions"},"model":{"description":"Exact ID from GET /v1/models.","title":"Model","type":"string"},"use_file_input":{"default":true,"title":"Use File Input","type":"boolean"},"max_pages":{"anyOf":[{"maximum":8,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Max Pages"},"file_id":{"type":"string","minLength":1,"description":"Upload ID returned by POST /v1/uploads. Must belong to this organization."},"execution":{"default":"auto","description":"auto permits an inline 200 or queued 202; async always creates a durable job. Poll the returned status_url; do not resubmit an accepted request.","enum":["auto","async"],"title":"Execution","type":"string"},"ephemeral":{"default":false,"description":"Seal this upload for its final classification; when the call finishes, delete the source and everything classify made from it. Requires file_id. See the retention guide for deletion scope.","title":"Ephemeral","type":"boolean"},"file":{"type":"string","format":"binary","description":"Direct file bytes, mutually exclusive with file_id."},"pdf_password":{"type":"string","writeOnly":true,"description":"Only for direct encrypted PDF uploads. Passwords are not persisted; prepared document bytes may be stored for processing."}},"required":["categories","model"],"description":"Provide exactly one of file or file_id. This cross-field constraint is enforced by the server.","title":"ClassificationDocumentBodyMultipart"},"LocateOptions":{"additionalProperties":false,"properties":{"max_regions_per_target":{"default":20,"maximum":100,"minimum":1,"title":"Max Regions Per Target","type":"integer"},"pad_pages":{"default":0,"maximum":10,"minimum":0,"title":"Pad Pages","type":"integer"},"cache":{"default":true,"description":"Read and write the tenant-scoped semantic Locate cache.","title":"Cache","type":"boolean"}},"title":"LocateOptions","type":"object"},"LocateTarget":{"additionalProperties":false,"properties":{"name":{"maxLength":80,"minLength":1,"title":"Name","type":"string"},"description":{"maxLength":1000,"minLength":1,"title":"Description","type":"string"},"examples":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Examples"},"exclude":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Exclude"}},"required":["name","description"],"title":"LocateTarget","type":"object"},"LocateDocumentBody":{"additionalProperties":false,"properties":{"targets":{"items":{"$ref":"#/components/schemas/LocateTarget"},"maxItems":20,"minItems":1,"title":"Targets","type":"array"},"instructions":{"anyOf":[{"maxLength":5000,"type":"string"},{"type":"null"}],"default":null,"title":"Instructions"},"model":{"description":"Exact ID from GET /v1/models.","title":"Model","type":"string"},"options":{"anyOf":[{"$ref":"#/components/schemas/LocateOptions"},{"type":"null"}],"default":null},"file_id":{"type":"string","minLength":1,"description":"Upload ID returned by POST /v1/uploads. Must belong to this organization."},"execution":{"default":"auto","description":"auto permits an inline 200 or queued 202; async always creates a durable job. Poll the returned status_url; do not resubmit an accepted request.","enum":["auto","async"],"title":"Execution","type":"string"},"callback":{"anyOf":[{"$ref":"#/components/schemas/CallbackConfig"},{"type":"null"}],"default":null,"description":"Optional terminal notification. Configuring a callback selects async execution."},"client_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Opaque JSON object, at most 4096 serialized bytes. Echoed on queued jobs; does not select async execution.","title":"Client Metadata"},"ephemeral":{"default":false,"description":"Scope job artifacts to the upload; does not finalize or delete the source.","title":"Ephemeral","type":"boolean"}},"required":["targets","model","file_id"],"title":"LocateDocumentBody","type":"object"},"LocateDocumentBodyMultipart":{"type":"object","properties":{"targets":{"type":"string","description":"JSON-encoded targets. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"items":{"$ref":"#/components/schemas/LocateTarget"},"maxItems":20,"minItems":1,"title":"Targets","type":"array"}},"instructions":{"anyOf":[{"maxLength":5000,"type":"string"},{"type":"null"}],"default":null,"title":"Instructions"},"model":{"description":"Exact ID from GET /v1/models.","title":"Model","type":"string"},"options":{"type":"string","description":"JSON-encoded options. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"anyOf":[{"$ref":"#/components/schemas/LocateOptions"},{"type":"null"}],"default":null}},"file_id":{"type":"string","minLength":1,"description":"Upload ID returned by POST /v1/uploads. Must belong to this organization."},"execution":{"default":"auto","description":"auto permits an inline 200 or queued 202; async always creates a durable job. Poll the returned status_url; do not resubmit an accepted request.","enum":["auto","async"],"title":"Execution","type":"string"},"callback":{"type":"string","description":"JSON-encoded callback. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"anyOf":[{"$ref":"#/components/schemas/CallbackConfig"},{"type":"null"}],"default":null,"description":"Optional terminal notification. Configuring a callback selects async execution."}},"client_metadata":{"type":"string","description":"JSON-encoded client_metadata. Prefer application/json to avoid double encoding.","contentMediaType":"application/json","contentSchema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Opaque JSON object, at most 4096 serialized bytes. Echoed on queued jobs; does not select async execution.","title":"Client Metadata"}},"ephemeral":{"default":false,"description":"Scope job artifacts to the upload; does not finalize or delete the source.","title":"Ephemeral","type":"boolean"},"file":{"type":"string","format":"binary","description":"Direct file bytes, mutually exclusive with file_id."},"pdf_password":{"type":"string","writeOnly":true,"description":"Only for direct encrypted PDF uploads. Passwords are not persisted; prepared document bytes may be stored for processing."}},"required":["targets","model"],"description":"Provide exactly one of file or file_id. This cross-field constraint is enforced by the server.","title":"LocateDocumentBodyMultipart"}},"securitySchemes":{"NuggetApiKey":{"type":"apiKey","description":"Organization-scoped API key. Resources are isolated to the authenticated organization.","in":"header","name":"x-api-key"}}},"tags":[{"name":"Uploads","description":"Upload and reuse tenant-scoped documents."},{"name":"OCR","description":"Create OCR work and poll OCR jobs."},{"name":"Extraction","description":"Extract schema-shaped data from documents or text."},{"name":"Classification","description":"Classify documents, text, and composite bundles."},{"name":"Location","description":"Locate semantic regions in documents."},{"name":"Reasoning","description":"Resolve, map, infer, and review structured JSON data."},{"name":"System","description":"Health, readiness, and live model catalog."},{"name":"Webhooks","description":"Outbound signed terminal-job notifications. See the [receiver guide](/guides/webhooks)."}],"x-tagGroups":[{"name":"Documents","tags":["Uploads","Extraction","OCR","Classification","Location"]},{"name":"Structured reasoning","tags":["Reasoning"]},{"name":"Service","tags":["System","Webhooks"]}]}