{"openapi":"3.1.0","info":{"title":"anyformat API","description":"Document extraction and workflow automation API.\n\nAnyFormat lets you define extraction workflows that pull structured data from any document — PDFs, images, scanned files, or plain text. Upload a file, run it through a workflow, and get back structured fields with confidence scores and source evidence.\n\n## Quick start\n\nSee the [Quick start guide](https://docs.anyformat.ai/api-reference-v3/introduction) for a walkthrough.\n\n## Authentication\n\nAll endpoints (except `/health/`) require a Bearer token in the `Authorization` header:\n\n```\nAuthorization: Bearer <your-api-key>\n```\n\nGet your API key from [app.anyformat.ai/api-key](https://app.anyformat.ai/api-key).\n\n## Versioning\n\nEndpoints are versioned by path prefix (`/v3/`). Every response under\na versioned prefix includes `X-API-Version`.\n","version":"3.0.0"},"servers":[{"url":"https://api.anyformat.ai","description":"API server"}],"paths":{"/health/":{"get":{"tags":["health"],"summary":"Health Check","description":"Returns 200 OK if the service is running. No authentication required.\n\nUse this endpoint to verify API connectivity before making authenticated calls.","operationId":"health_check_health__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckResponse"}}}}}}},"/key-check/":{"get":{"tags":["health"],"summary":"Key Check","description":"Validate the caller's API key.\n\nSuccess (200): the key is active and the response names its\norganization and granted scopes. Failure (401): the standard error envelope with\n``error_code`` set to ``MISSING_API_KEY`` (no key sent) or\n``INVALID_API_KEY`` (key sent but not recognised).\n\nReuses the same ``/whoami/`` round-trip that every\nauthenticated request already runs, so a call here warms the same\ncache — cheap to invoke as a probe before the first real request.","operationId":"key_check_key_check__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCheckResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v3/workflows/":{"post":{"tags":["workflows"],"summary":"Create workflow","description":"Create a workflow from a strongly-typed graph (atomic).\n\nProvide an explicit list of typed `nodes` (parse / classify / splitter /\nextract / validate) and `edges` between them. Returns the stored graph, so the\nserver-assigned `persistent_id`s a later `PATCH` must echo arrive with the\ncreate rather than needing a second call.","operationId":"v3_create_workflow","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`TOPOLOGY_INVALID` — The workflow topology is not valid.\n`LOOKUP_FIELD_WITHOUT_FILE` — A lookup field has no lookup file.\n`INVALID_LOOKUP_FILE_ENCODING` — The lookup file uses an encoding the server cannot read.\n`UNSUPPORTED_LOOKUP_FILE` — The lookup file type is not supported.\n`INVALID_WORKFLOW_CONFIG` — The workflow holds a node configuration that is not valid.\n`OPERATOR_NOT_AVAILABLE` — This workflow uses an operator that is no longer available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"TOPOLOGY_INVALID":{"value":{"error":"The workflow topology is not valid.","detail":"The workflow topology is not valid.","error_code":"TOPOLOGY_INVALID","retryable":false,"request_id":"req_abc123"}},"LOOKUP_FIELD_WITHOUT_FILE":{"value":{"error":"A lookup field has no lookup file.","detail":"A lookup field has no lookup file.","error_code":"LOOKUP_FIELD_WITHOUT_FILE","retryable":false,"request_id":"req_abc123"}},"INVALID_LOOKUP_FILE_ENCODING":{"value":{"error":"The lookup file uses an encoding the server cannot read.","detail":"The lookup file uses an encoding the server cannot read.","error_code":"INVALID_LOOKUP_FILE_ENCODING","retryable":false,"request_id":"req_abc123"}},"UNSUPPORTED_LOOKUP_FILE":{"value":{"error":"The lookup file type is not supported.","detail":"The lookup file type is not supported.","error_code":"UNSUPPORTED_LOOKUP_FILE","retryable":false,"request_id":"req_abc123"}},"INVALID_WORKFLOW_CONFIG":{"value":{"error":"The workflow holds a node configuration that is not valid.","detail":"The workflow holds a node configuration that is not valid.","error_code":"INVALID_WORKFLOW_CONFIG","retryable":false,"request_id":"req_abc123"}},"OPERATOR_NOT_AVAILABLE":{"value":{"error":"This workflow uses an operator that is no longer available.","detail":"This workflow uses an operator that is no longer available.","error_code":"OPERATOR_NOT_AVAILABLE","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"`PARSE_MODE_FORBIDDEN` — This organization cannot use that parse mode.\n`EXTRACT_MODE_FORBIDDEN` — This organization cannot use that extract mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"PARSE_MODE_FORBIDDEN":{"value":{"error":"This organization cannot use that parse mode.","detail":"This organization cannot use that parse mode.","error_code":"PARSE_MODE_FORBIDDEN","retryable":false,"request_id":"req_abc123"}},"EXTRACT_MODE_FORBIDDEN":{"value":{"error":"This organization cannot use that extract mode.","detail":"This organization cannot use that extract mode.","error_code":"EXTRACT_MODE_FORBIDDEN","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`WORKFLOW_NAME_CONFLICT` — A workflow with that name already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"WORKFLOW_NAME_CONFLICT":{"value":{"error":"A workflow with that name already exists.","detail":"A workflow with that name already exists.","error_code":"WORKFLOW_NAME_CONFLICT","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"502":{"description":"`GRAPH_READBACK_FAILED` — The workflow was saved and its graph could not be read back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GRAPH_READBACK_FAILED":{"value":{"error":"The workflow was saved and its graph could not be read back.","detail":"The workflow was saved and its graph could not be read back.","error_code":"GRAPH_READBACK_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"422":{"description":"`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}},"get":{"tags":["workflows"],"summary":"List workflows","description":"List your organization's workflows, newest first.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort\norder is fixed (`-created_at, -id`); there are no totals or page numbers.","operationId":"v3_list_workflows","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"422":{"description":"`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/":{"get":{"tags":["workflows"],"summary":"Get workflow","description":"Retrieve a workflow with its complete typed graph inline.\n\n`{name, description, nodes, edges}` is the exact shape\n`POST /v3/workflows/` accepts — mutate it and feed it back to\n`PATCH /v3/workflows/{workflow_id}/` to edit.\n\nPass `version` to read one version for comparison or audit; any other\nquery parameter is rejected, so a misspelled `version` cannot silently\nread the latest. Versions are read-only: runs always use the latest\nversion, and a PATCH always builds on the latest version.","operationId":"v3_get_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Reads that version's graph instead of the latest.","title":"Version"},"description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Reads that version's graph instead of the latest."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}},"patch":{"tags":["workflows"],"summary":"Update workflow","description":"Replace a workflow's typed graph (atomic).\n\nThe body is the `{name, description, nodes, edges}` sub-shape of\n`GET /v3/workflows/{workflow_id}/` — GET, mutate, PATCH. Echo each\nexisting field's `persistent_id` unchanged (including across\nrenames) to keep the field's identity, so analytics, ground truth\nand quality metrics stay attached; omit `persistent_id` only for\ngenuinely new fields (a pidless field is always treated as new —\nname coincidence with a prior field does NOT confer identity). An\nechoed `persistent_id` that doesn't match any field in the current\nversion is a 400. Responds with the updated workflow in the exact\n`GET /v3/workflows/{workflow_id}/` shape, so the result can be\nedited and PATCHed again. The returned graph is this request's own\nwrite result — including the `persistent_id`s assigned to new\nfields — never the state left by a concurrent update.","operationId":"v3_update_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`TOPOLOGY_INVALID` — The workflow topology is not valid.\n`LOOKUP_FIELD_WITHOUT_FILE` — A lookup field has no lookup file.\n`INVALID_LOOKUP_FILE_ENCODING` — The lookup file uses an encoding the server cannot read.\n`UNSUPPORTED_LOOKUP_FILE` — The lookup file type is not supported.\n`INVALID_WORKFLOW_CONFIG` — The workflow holds a node configuration that is not valid.\n`OPERATOR_NOT_AVAILABLE` — This workflow uses an operator that is no longer available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"TOPOLOGY_INVALID":{"value":{"error":"The workflow topology is not valid.","detail":"The workflow topology is not valid.","error_code":"TOPOLOGY_INVALID","retryable":false,"request_id":"req_abc123"}},"LOOKUP_FIELD_WITHOUT_FILE":{"value":{"error":"A lookup field has no lookup file.","detail":"A lookup field has no lookup file.","error_code":"LOOKUP_FIELD_WITHOUT_FILE","retryable":false,"request_id":"req_abc123"}},"INVALID_LOOKUP_FILE_ENCODING":{"value":{"error":"The lookup file uses an encoding the server cannot read.","detail":"The lookup file uses an encoding the server cannot read.","error_code":"INVALID_LOOKUP_FILE_ENCODING","retryable":false,"request_id":"req_abc123"}},"UNSUPPORTED_LOOKUP_FILE":{"value":{"error":"The lookup file type is not supported.","detail":"The lookup file type is not supported.","error_code":"UNSUPPORTED_LOOKUP_FILE","retryable":false,"request_id":"req_abc123"}},"INVALID_WORKFLOW_CONFIG":{"value":{"error":"The workflow holds a node configuration that is not valid.","detail":"The workflow holds a node configuration that is not valid.","error_code":"INVALID_WORKFLOW_CONFIG","retryable":false,"request_id":"req_abc123"}},"OPERATOR_NOT_AVAILABLE":{"value":{"error":"This workflow uses an operator that is no longer available.","detail":"This workflow uses an operator that is no longer available.","error_code":"OPERATOR_NOT_AVAILABLE","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"`PARSE_MODE_FORBIDDEN` — This organization cannot use that parse mode.\n`EXTRACT_MODE_FORBIDDEN` — This organization cannot use that extract mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"PARSE_MODE_FORBIDDEN":{"value":{"error":"This organization cannot use that parse mode.","detail":"This organization cannot use that parse mode.","error_code":"PARSE_MODE_FORBIDDEN","retryable":false,"request_id":"req_abc123"}},"EXTRACT_MODE_FORBIDDEN":{"value":{"error":"This organization cannot use that extract mode.","detail":"This organization cannot use that extract mode.","error_code":"EXTRACT_MODE_FORBIDDEN","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.\n`WORKFLOW_NAME_CONFLICT` — A workflow with that name already exists.\n`deprecated_operator_ack_required` — This workflow uses a deprecated operator, so the save needs an acknowledgement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123"}},"WORKFLOW_NAME_CONFLICT":{"value":{"error":"A workflow with that name already exists.","detail":"A workflow with that name already exists.","error_code":"WORKFLOW_NAME_CONFLICT","retryable":false,"request_id":"req_abc123"}},"deprecated_operator_ack_required":{"value":{"error":"This workflow uses a deprecated operator, so the save needs an acknowledgement.","detail":"This workflow uses a deprecated operator, so the save needs an acknowledgement.","error_code":"deprecated_operator_ack_required","retryable":false,"request_id":"req_abc123"}}}}}},"503":{"description":"`WORKFLOW_CONCURRENT_EDIT` — Another request is editing this workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"WORKFLOW_CONCURRENT_EDIT":{"value":{"error":"Another request is editing this workflow.","detail":"Another request is editing this workflow.","error_code":"WORKFLOW_CONCURRENT_EDIT","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}},"delete":{"tags":["workflows"],"summary":"Delete workflow","description":"Delete a workflow and all associated document packets and runs.\n\nThe API key's owner must be an admin of the workflow's organization.\nThis action is irreversible.","operationId":"v3_delete_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/upload/":{"post":{"tags":["workflows"],"summary":"Upload document packet to workflow","description":"Upload one or more files as a single document packet (atomic).\n\nAll files are grouped into ONE packet — the unit later runs address.\nCreation is all-or-nothing: any rejected file (unsupported type,\ndisguised bytes) fails the whole request and nothing is stored.\n\nFilenames are unique within a workflow. By default (`on_conflict=error`) a\nfile whose name collides with an existing file fails the request with\n``409`` before anything is uploaded; pass `on_conflict=rename` to auto-rename\nthe collision instead (`contract.pdf` -> `contract (1).pdf`); each returned\nfile's ``name`` is then the name it landed under, with ``original_name``\nholding the uploaded name when a rename happened.\n\nUpload without running; trigger extraction via\n`POST /v3/document-packets/{document_packet_id}/run/`.","operationId":"v3_upload_to_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original upload slots so no duplicate packet is created.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original upload slots so no duplicate packet is created."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_upload_to_workflow"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketCreatedV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`FILENAME_CONFLICT` — A file with that name already exists.\n`AGENTIC_MULTIFILE_UNSUPPORTED` — Agentic extraction cannot process a multi-file document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILENAME_CONFLICT":{"value":{"error":"A file with that name already exists.","detail":"A file with that name already exists.","error_code":"FILENAME_CONFLICT","retryable":false,"request_id":"req_abc123"}},"AGENTIC_MULTIFILE_UNSUPPORTED":{"value":{"error":"Agentic extraction cannot process a multi-file document.","detail":"Agentic extraction cannot process a multi-file document.","error_code":"AGENTIC_MULTIFILE_UNSUPPORTED","retryable":false,"request_id":"req_abc123"}}}}}},"422":{"description":"`DATASET_DOCUMENT_REJECTED` — A file in the dataset document was rejected.\n`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"DATASET_DOCUMENT_REJECTED":{"value":{"error":"A file in the dataset document was rejected.","detail":"A file in the dataset document was rejected.","error_code":"DATASET_DOCUMENT_REJECTED","retryable":false,"request_id":"req_abc123"}},"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/upload/run/":{"post":{"tags":["workflows"],"summary":"Upload and run workflow","description":"Upload one document packet and run it in a single call.\n\nComposes `POST /v3/workflows/{workflow_id}/upload/` and\n`POST /v3/document-packets/{document_packet_id}/run/`: the files are\ngrouped into ONE packet (all-or-nothing) and an extraction is enqueued\non the workflow's latest version. Poll `GET /v3/runs/{run_id}/` until\n`status` is terminal.\n\nFilenames are unique within a workflow. By default (`on_conflict=error`) a\ncolliding filename fails the request with ``409`` before anything is\nuploaded or run; pass `on_conflict=rename` to auto-rename instead.","operationId":"v3_upload_and_run_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet AND run — no duplicate upload, no second extraction.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet AND run — no duplicate upload, no second extraction."},{"name":"X-Anyformat-Priority","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anyformat-Priority"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_upload_and_run_workflow"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTriggeredV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.\n`OPERATOR_DEPRECATED` — This workflow version uses a deprecated operator and cannot run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123"}},"OPERATOR_DEPRECATED":{"value":{"error":"This workflow version uses a deprecated operator and cannot run.","detail":"This workflow version uses a deprecated operator and cannot run.","error_code":"OPERATOR_DEPRECATED","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`FILENAME_CONFLICT` — A file with that name already exists.\n`AGENTIC_MULTIFILE_UNSUPPORTED` — Agentic extraction cannot process a multi-file document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILENAME_CONFLICT":{"value":{"error":"A file with that name already exists.","detail":"A file with that name already exists.","error_code":"FILENAME_CONFLICT","retryable":false,"request_id":"req_abc123"}},"AGENTIC_MULTIFILE_UNSUPPORTED":{"value":{"error":"Agentic extraction cannot process a multi-file document.","detail":"Agentic extraction cannot process a multi-file document.","error_code":"AGENTIC_MULTIFILE_UNSUPPORTED","retryable":false,"request_id":"req_abc123"}}}}}},"422":{"description":"`DATASET_DOCUMENT_REJECTED` — A file in the dataset document was rejected.\n`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"DATASET_DOCUMENT_REJECTED":{"value":{"error":"A file in the dataset document was rejected.","detail":"A file in the dataset document was rejected.","error_code":"DATASET_DOCUMENT_REJECTED","retryable":false,"request_id":"req_abc123"}},"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123"}}}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/upload/from-url/":{"post":{"tags":["workflows"],"summary":"Create document packet from URLs","description":"Import every URL into a single document packet, atomically.\n\nThe backend fetches each HTTPS URL server-side (10s timeout, 20 MB cap\nper file) and registers the packet in one transaction only after every\nfetch succeeded — any failure imports nothing (no partial packet, no\norphan files).\n\nFiles arrive as fetchable `urls`, as `staged_files` ids from\n`POST /v3/blobs/slots/`, or a mix (1..10 in total); staged files land\nafter the `urls` entries.\n\nEach URL-fetched file is named by its response's `Content-Disposition`\nfilename when present, else by the last segment of the URL's path. A\npresigned URL can sign the header in (S3: `ResponseContentDisposition`),\nwhich is how a caller names a file whose URL path is opaque. A staged file\nis named by its `filename`.\n\nFilenames are unique within a workflow. By default (`on_conflict=error`)\na colliding filename fails the request with ``409`` — surfaced once\nthe atomic import settles, not before it starts; pass `on_conflict=rename`\nto auto-rename instead (``report.pdf`` -> ``report (1).pdf``). Each returned\n`name` is the name the file actually landed under; ``original_name`` holds\nthe name it was fetched under when a rename happened.","operationId":"v3_upload_from_url","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketFromUrlsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketCreatedV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`INVALID_VALUE` — A value in the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"INVALID_VALUE":{"value":{"error":"A value in the request is not valid.","detail":"A value in the request is not valid.","error_code":"INVALID_VALUE","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`AGENTIC_MULTIFILE_UNSUPPORTED` — Agentic extraction cannot process a multi-file document.\n`FILENAME_CONFLICT` — A file with that name already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AGENTIC_MULTIFILE_UNSUPPORTED":{"value":{"error":"Agentic extraction cannot process a multi-file document.","detail":"Agentic extraction cannot process a multi-file document.","error_code":"AGENTIC_MULTIFILE_UNSUPPORTED","retryable":false,"request_id":"req_abc123"}},"FILENAME_CONFLICT":{"value":{"error":"A file with that name already exists.","detail":"A file with that name already exists.","error_code":"FILENAME_CONFLICT","retryable":false,"request_id":"req_abc123"}}}}}},"504":{"description":"`GATEWAY_TIMEOUT` — The upstream service did not answer in time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123"}}}}}},"422":{"description":"`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/document-packets/":{"get":{"tags":["workflows"],"summary":"List workflow document packets","description":"List a workflow's document packets, newest first.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort\norder is fixed (`-created_at, -id`); there are no totals or page\nnumbers. Items are slim — fetch\n`GET /v3/document-packets/{document_packet_id}/` for the per-file\nbreakdown and `latest_run_id`.","operationId":"v3_list_workflow_document_packets","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"422":{"description":"`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/versions/":{"get":{"tags":["workflows"],"summary":"List workflow versions","description":"List a workflow's versions, newest first.\n\nVersions are read-only: they exist for comparison and audit, and runs\nalways use the latest version (item 0 of the first page). Read a\nversion's graph with `GET /v3/workflows/{workflow_id}/?version=`.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort\norder is fixed (`-created_at, -id`); there are no totals or page numbers.","operationId":"v3_list_workflow_versions","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"422":{"description":"`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/runs/":{"get":{"tags":["workflows"],"summary":"List workflow runs","description":"List a workflow's runs, newest first.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort\norder is fixed (`-created_at, -id`); there are no totals or page\nnumbers. Items are slim — fetch `GET /v3/runs/{run_id}/` for the\nresults.\n\nOptional half-open interval on the packet's `created_at`:\n`document_packet_created_after` (inclusive) /\n`document_packet_created_before` (exclusive). Typical daily-batch\nworkflow: upload day N, fetch day N+1 with\n`after=<N>T00:00:00 & before=<N+1>T00:00:00`.","operationId":"v3_list_workflow_runs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."},{"name":"document_packet_created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Include only runs whose document packet was created at or after this ISO 8601 datetime (inclusive lower bound). Combine with `document_packet_created_before` to fetch one day's uploads.","title":"Document Packet Created After"},"description":"Include only runs whose document packet was created at or after this ISO 8601 datetime (inclusive lower bound). Combine with `document_packet_created_before` to fetch one day's uploads."},{"name":"document_packet_created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Include only runs whose document packet was created before this ISO 8601 datetime (exclusive upper bound). Adjacent day-buckets tile without overlap: `after=2026-07-17T00:00:00 & before=2026-07-18T00:00:00` is exactly July 17.","title":"Document Packet Created Before"},"description":"Include only runs whose document packet was created before this ISO 8601 datetime (exclusive upper bound). Adjacent day-buckets tile without overlap: `after=2026-07-17T00:00:00 & before=2026-07-18T00:00:00` is exactly July 17."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"422":{"description":"`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/document-packets/{document_packet_id}/":{"get":{"tags":["document-packets"],"summary":"Get document packet","description":"Retrieve one document packet flat: status, timestamps, the files it\ngroups, and `latest_run_id` (`null` until the packet has been run).\n\nUnknown ids — including packets belonging to another organization —\nreturn 404.","operationId":"v3_get_document_packet","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"document_packet_id","in":"path","required":true,"schema":{"type":"string","title":"Document Packet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}},"delete":{"tags":["document-packets"],"summary":"Delete document packet","description":"Delete a document packet and all its files.\n\nThe packet and every file in it are removed together, along with any\nextraction results. This action is irreversible.","operationId":"v3_delete_document_packet","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"document_packet_id","in":"path","required":true,"schema":{"type":"string","title":"Document Packet Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/document-packets/{document_packet_id}/run/":{"post":{"tags":["document-packets"],"summary":"Run document packet","description":"Run (or re-run) a document packet on the latest version of its\nworkflow.\n\nEvery call creates a NEW run — re-running after editing the workflow\nis the intended flow; earlier runs stay readable at\n`GET /v3/runs/{run_id}/`. The only exception is an `Idempotency-Key`\nreplay, which returns the original run.\n\nUnknown ids — including packets belonging to another organization —\nreturn 404. An organization without extraction credit gets 402.","operationId":"v3_run_document_packet","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"document_packet_id","in":"path","required":true,"schema":{"type":"string","title":"Document Packet Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key returns the original run instead of triggering (and billing) a second extraction.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key returns the original run instead of triggering (and billing) a second extraction."},{"name":"X-Anyformat-Priority","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anyformat-Priority"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTriggeredV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`OPERATOR_DEPRECATED` — This workflow version uses a deprecated operator and cannot run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"OPERATOR_DEPRECATED":{"value":{"error":"This workflow version uses a deprecated operator and cannot run.","detail":"This workflow version uses a deprecated operator and cannot run.","error_code":"OPERATOR_DEPRECATED","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`AGENTIC_MULTIFILE_UNSUPPORTED` — Agentic extraction cannot process a multi-file document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AGENTIC_MULTIFILE_UNSUPPORTED":{"value":{"error":"Agentic extraction cannot process a multi-file document.","detail":"Agentic extraction cannot process a multi-file document.","error_code":"AGENTIC_MULTIFILE_UNSUPPORTED","retryable":false,"request_id":"req_abc123"}}}}}},"422":{"description":"`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.\n`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123"}},"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/dataset/upload/":{"post":{"tags":["datasets"],"summary":"Upload a document (+ ground truth) to a workflow dataset","description":"Upload one document (1..N files) plus optional ground truth as ONE\ndocument packet in the dataset (atomic).\n\nAll-or-nothing: any rejected file (unsupported type, disguised bytes) or a\nground-truth failure fails the whole request and nothing is stored.\n\nFilenames are unique within a workflow. By default (`on_conflict=error`) a\nfile whose name collides with an existing file fails the request with `409`\nbefore anything is uploaded; pass `on_conflict=rename` to auto-rename the\ncollision instead (`invoice.pdf` -> `invoice (1).pdf`), each returned file's\n``name`` being the name it landed under and ``original_name`` holding the\nuploaded name when a rename happened.\n\nBulk ingestion loops this endpoint, one call per document; each call is\nbounded and independently retryable.","operationId":"v3_upload_to_dataset","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original document packet — no duplicate document is registered.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original document packet — no duplicate document is registered."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_upload_to_dataset"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUploadResponseV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`FILENAME_CONFLICT` — A file with that name already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILENAME_CONFLICT":{"value":{"error":"A file with that name already exists.","detail":"A file with that name already exists.","error_code":"FILENAME_CONFLICT","retryable":false,"request_id":"req_abc123"}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123"}}}}}},"422":{"description":"Ground truth failed validation (`GT_INVALID`): `detail.errors` lists each offending key. Other 422 reasons reuse the standard envelope and a string `detail`: an unresolved extract node (`EXTRACT_NODE_UNRESOLVED`), a rejected file (`DATASET_DOCUMENT_REJECTED`), a ground-truth save failure (`DATASET_GROUND_TRUTH_SAVE_FAILED`), or an invalid request (`DATASET_INVALID_REQUEST`).","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GroundTruthInvalidError"},{"$ref":"#/components/schemas/ErrorEnvelope"}]}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/edit-references/":{"post":{"tags":["edit references"],"summary":"Upload reference documents to a workflow","description":"Upload the standing data an Edit node fills forms from.\n\nReturns one document per file, each with the `id` to put in an Edit node's\n`reference_document_ids`.\n\nA text reference is usable immediately (`status: ready`). A PDF is parsed\nonce, here — never on a run — so it comes back `pending` and reaches\n`ready` shortly after; poll `GET /v3/workflows/{workflow_id}/edit-references/`\nuntil it settles. Starting a run whose Edit node names a reference that is\nnot yet `ready` is refused rather than filled from a partial reference.\n\nUpload once, reuse forever: every later run reads the already-parsed text,\nso the parse is neither repeated nor re-billed.","operationId":"v3_upload_edit_references","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_upload_edit_references"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditReferenceListResponseV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123"}}}}}},"413":{"description":"`FILE_TOO_LARGE` — The file is larger than the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILE_TOO_LARGE":{"value":{"error":"The file is larger than the maximum allowed size.","detail":"The file is larger than the maximum allowed size.","error_code":"FILE_TOO_LARGE","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123"}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}},"get":{"tags":["edit references"],"summary":"List a workflow's reference documents","description":"List the reference documents on a workflow, with their parse status.\n\nPoll this after uploading a PDF reference until its `status` leaves\n`pending`.","operationId":"v3_list_edit_references","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditReferenceListResponseV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/edit-references/{document_id}/":{"delete":{"tags":["edit references"],"summary":"Delete a reference document","description":"Delete a reference document and its stored objects.\n\nAn Edit node still naming the deleted id will refuse to run rather than\nfill from a reference that no longer exists — remove the id from the node\nin the same change.","operationId":"v3_delete_edit_reference","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/ask":{"post":{"tags":["knowledge"],"summary":"Ask a question about a workflow's documents","description":"Answer a question from the content of this workflow's documents.\n\nThe answer is grounded: every claim comes back with the exact quote it\nrests on, resolved to a page and a region in the source PDF, so you can\nshow a customer where a number came from instead of asking them to trust\nit. `path` reports the route the agent took to get there.\n\nThe workflow needs a knowledge node — that is what indexes its documents.\nWithout one this returns 409.\n\nBilled per question against the organization's credits, on the text the\nagent actually reads. A question the organization cannot pay for is\nrefused before it runs, not after.\n\nPass a `thread_id` you mint yourself (starting with `kb-`) to ask a\nfollow-up in context; omit it and each question stands alone.","operationId":"v3_ask_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequestV3"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResponseV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"402":{"description":"`PAYMENT_REQUIRED` — the organization has no credits. Refused before the question runs, so nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `KNOWLEDGE_NOT_READY` — the first index is still building, worth retrying. `KNOWLEDGE_THREAD_MISMATCH` — this `thread_id` belongs to a different workflow. `KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT` — the published snapshot is in a format this deployment no longer reads, permanent until an operator republishes it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"504":{"description":"The ask exceeded the agent's own time ceiling. Retry with a narrower question.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/entries":{"get":{"tags":["knowledge"],"summary":"List a workflow's knowledge corpus","description":"List a workflow's knowledge corpus tree: source documents plus the\ngenerated navigation pages, sorted by path. Needs a knowledge node\n(409 otherwise); see `folder`/`cursor` and knowledge/list.mdx for the\nrest.","operationId":"v3_list_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"folder","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only list entries directly in this folder or a folder beneath it; omit for the whole tree.","title":"Folder"},"description":"Only list entries directly in this folder or a folder beneath it; omit for the whole tree."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeEntryPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"404":{"description":"Unknown workflow, or `folder` names no folder in this corpus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `KNOWLEDGE_NOT_READY` — the first index is still building, worth retrying. `KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT` — the published snapshot is in a format this deployment no longer reads, permanent until an operator republishes it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"504":{"description":"The listing exceeded the agent's own time ceiling. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/search":{"get":{"tags":["knowledge"],"summary":"Search a workflow's knowledge corpus","description":"Rank a workflow's knowledge corpus by relevance (BM25) to `query`.\nNeeds a knowledge node (409 otherwise); see `query`/`folder`/`limit`\nand knowledge/search.mdx for the rest.","operationId":"v3_search_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Search query. 1 to 512 characters.","title":"Query"},"description":"Search query. 1 to 512 characters."},{"name":"folder","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrows to one top-level source folder (the first path segment, not a nested path). 404s when no such folder exists in this corpus.","title":"Folder"},"description":"Narrows to one top-level source folder (the first path segment, not a nested path). 404s when no such folder exists in this corpus."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max hits to return, 1 to 50.","default":10,"title":"Limit"},"description":"Max hits to return, 1 to 50."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSearchHitV3"},"title":"Response V3 Search Knowledge"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"404":{"description":"Unknown workflow, or `folder` names no folder in this corpus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `KNOWLEDGE_NOT_READY` — the first index is still building, worth retrying. `KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT` — the published snapshot is in a format this deployment no longer reads, permanent until an operator republishes it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"504":{"description":"The search exceeded the agent's own time ceiling. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/entry":{"get":{"tags":["knowledge"],"summary":"Read one document from a workflow's knowledge corpus","description":"Read one document's or navigation page's text from a workflow's\nknowledge corpus.\n\nThe workflow needs a knowledge node — that is what indexes its\ndocuments. Without one this returns 409. An unknown `path` is a 404 —\nlist entries with `list_knowledge` or find one with `search_knowledge`\nfirst.\n\n`content` is capped; `truncated` is `true` when it was cut off.","operationId":"v3_read_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Path of the document or navigation page to read, from list_knowledge or search_knowledge. 1 to 1024 characters.","title":"Path"},"description":"Path of the document or navigation page to read, from list_knowledge or search_knowledge. 1 to 1024 characters."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeReadResultV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `KNOWLEDGE_NOT_READY` — the first index is still building, worth retrying. `KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT` — the published snapshot is in a format this deployment no longer reads, permanent until an operator republishes it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"504":{"description":"The read exceeded the agent's own time ceiling. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/snapshot":{"get":{"tags":["knowledge"],"summary":"Get a presigned URL for a workflow's whole knowledge corpus","description":"Get a presigned URL for the whole knowledge corpus tar.\n\nPossession of the URL is read permission for the workflow's corpus\nuntil it expires — prefer `list_knowledge`/`read_knowledge` for\nanything that stays inside this API; this is for handing the whole\narchive to something outside it.","operationId":"v3_download_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSnapshotV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — the caller does not have access to this workflow's knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `KNOWLEDGE_NOT_READY` — no snapshot has ever been published, worth retrying once indexing finishes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/runs/{run_id}/":{"get":{"tags":["runs"],"summary":"Get run","description":"Retrieve one run flat: lifecycle status plus results inline.\n\nAlways 200 while the run exists — no precondition errors while the\nextraction is in flight. `results` is `null` until `status` reaches\n`processed`, then carries the extraction results envelope. A run that ended in `error` or\n`cancelled` stays readable with `results: null`.\n\nUnknown ids — including runs belonging to another organization —\nreturn 404.","operationId":"v3_get_run","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"422":{"description":"`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/splits/{split_id}/pdf/":{"get":{"tags":["splits"],"summary":"Download a split as a PDF","description":"Download one split's pages as a PDF.\n\nThe document is built from the run's source files when you ask for it and\nis never stored, so the response reflects the split's current geometry. Take\nthe id from `splits[].id` on a run's results, or from\n`splits[].partitions[].id` when the splitter partitions the category.\n\nThe response carries an opaque `ETag` — send it back verbatim in\n`If-None-Match` and a still-current split answers `304` without\ntransferring the document again. Do not build the tag yourself.","operationId":"v3_download_split_pdf","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"split_id","in":"path","required":true,"schema":{"type":"string","title":"Split Id"}},{"name":"if-none-match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-None-Match"}}],"responses":{"200":{"description":"The split's pages as a PDF.","content":{"application/pdf":{}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"304":{"description":"Not modified — the `ETag` you sent is still current."},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"409":{"description":"`SPLIT_HAS_NO_PAGES` — The split holds no pages.\n`SPLIT_SOURCE_NOT_PDF` — The split's source document is not a PDF.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SPLIT_HAS_NO_PAGES":{"value":{"error":"The split holds no pages.","detail":"The split holds no pages.","error_code":"SPLIT_HAS_NO_PAGES","retryable":false,"request_id":"req_abc123"}},"SPLIT_SOURCE_NOT_PDF":{"value":{"error":"The split's source document is not a PDF.","detail":"The split's source document is not a PDF.","error_code":"SPLIT_SOURCE_NOT_PDF","retryable":false,"request_id":"req_abc123"}}}}}},"422":{"description":"`INTERNAL_INCONSISTENCY` — The server found an internal inconsistency.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_INCONSISTENCY":{"value":{"error":"The server found an internal inconsistency.","detail":"The server found an internal inconsistency.","error_code":"INTERNAL_INCONSISTENCY","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/parse/":{"post":{"tags":["parse"],"summary":"Parse a document","description":"Parse one document with the platform's fast lite parse (atomic).\n\nOne file per call. The upload runs against your organization's system\nparse workflow, provisioned automatically on first use. Poll\n`GET /v3/runs/{run_id}/` until `status` is `processed`; the markdown is\nat `results.parse.markdown`.\n\nHonors `Idempotency-Key`: a retried request with the same key replays\nthe original packet and run.","operationId":"v3_parse","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet AND run — no duplicate upload, no second extraction.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet AND run — no duplicate upload, no second extraction."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_parse"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTriggeredV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123"}}}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123"}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/parse/from-url/":{"post":{"tags":["parse"],"summary":"Parse a document from a URL","description":"Parse one document fetched from a URL with the platform's fast lite\nparse (atomic).\n\nOne document per call: an HTTPS `url`, or the `object_id` (plus\n`filename`) of a file staged via `POST /v3/blobs/slots/`. The upload runs\nagainst your organization's system parse workflow, provisioned\nautomatically on first use. Poll `GET /v3/runs/{run_id}/` until `status`\nis `processed`; the markdown is at `results.parse.markdown`.\n\nA URL-fetched file is named by the response's `Content-Disposition`\nfilename when present, else by the last segment of the URL's path.\n\nNot idempotent: every call fetches the document, creates a packet and starts\na new run. For a retry-safe flow use `POST /v3/workflows/{id}/upload/from-url/`\nand then `POST /v3/document-packets/{id}/run/` with an `Idempotency-Key`.","operationId":"v3_parse_from_url","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseFromUrlRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTriggeredV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`INVALID_VALUE` — A value in the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"INVALID_VALUE":{"value":{"error":"A value in the request is not valid.","detail":"A value in the request is not valid.","error_code":"INVALID_VALUE","retryable":false,"request_id":"req_abc123"}}}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123"}}}}}},"504":{"description":"`GATEWAY_TIMEOUT` — The upstream service did not answer in time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v3/blobs/slots/":{"post":{"tags":["blobs"],"summary":"Stage a file you hold, and get the URL it will be readable at","description":"Get somewhere to put a file you hold, plus the URL it will read back at.\n\nEvery other ingestion path takes a URL this API can fetch, which a file on\nyour own machine is not. Staging closes that gap in one call: the bytes go\nstraight from you to storage without passing through this API, and the\n`read_url` is minted here because the destination is known before a byte\nmoves.\n\nPer slot, POST `upload.fields` verbatim followed by the file part as\nmultipart/form-data to `upload.url`. Then refer to the file by its\n`object_id` — `POST /v3/parse/from-url/` takes `{object_id, filename}` and\n`POST /v3/workflows/{id}/upload/from-url/` takes `staged_files` — or hand\n`read_url` to something outside this API; the filename is signed into that\nURL, so the file is named correctly on the other side.\n\nEach policy pins the destination, the content type and the exact\n`declared_size`, so a slot accepts one intended file and nothing else. A\nbatch is all-or-nothing: a file above your plan's size limit fails the whole\ncall with a 413 `FILE_TOO_LARGE` and mints no slots, before a byte moves.\n\nStaged bytes are scratch: they belong to no workflow, and storage deletes\nthem within a day. Anything that must outlive that belongs in a workflow.","operationId":"v3_create_blob_slots","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlobSlotsRequestV3"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlobSlotsResponseV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"413":{"description":"`FILE_TOO_LARGE` — The file is larger than the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILE_TOO_LARGE":{"value":{"error":"The file is larger than the maximum allowed size.","detail":"The file is larger than the maximum allowed size.","error_code":"FILE_TOO_LARGE","retryable":false,"request_id":"req_abc123"}}}}}},"422":{"description":"`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v3/workflows/{workflow_id}/evals/":{"post":{"tags":["evals"],"summary":"Launch an eval","description":"Launch an eval over a workflow's whole dataset (async, fire-and-forget).\n\nEnqueues one fresh extraction per dataset document on the target version and\npins the realized cohort into a new eval, then returns `202` immediately with\n`eval_id` and `run_number` to poll. Grading finalizes on a worker path — read\nthe eval by `eval_id` for the headline once it leaves `in_progress`.\n\nWithout an `Idempotency-Key` every launch creates a NEW eval — re-launching\nruns a fresh cohort. Supplying the header replays: a retry with the same key\nreturns the original eval instead of launching a second run. Omit `version_id`\nto evaluate the workflow's current version; pass one to override. (With an\nomitted version, a replayed key sent after a new version was published targets\na different version than the first call, so the backend answers `422` for the\nkey reuse — pass an explicit `version_id` for a stable replay.)\n\nA run that enqueues zero documents (empty dataset, or every document failed\nto enqueue) creates no eval and returns `422 EMPTY_EVAL`.","operationId":"v3_launch_eval","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original eval instead of launching (and billing) a second full-dataset run.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original eval instead of launching (and billing) a second full-dataset run."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EvalLaunchRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalLaunchedV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"422":{"description":"`EMPTY_EVAL` — The eval has no rows to run.\n`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"EMPTY_EVAL":{"value":{"error":"The eval has no rows to run.","detail":"The eval has no rows to run.","error_code":"EMPTY_EVAL","retryable":false,"request_id":"req_abc123"}},"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation.\n`OPERATOR_DEPRECATED` — This workflow version uses a deprecated operator and cannot run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}},"OPERATOR_DEPRECATED":{"value":{"error":"This workflow version uses a deprecated operator and cannot run.","detail":"This workflow version uses a deprecated operator and cannot run.","error_code":"OPERATOR_DEPRECATED","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}},"get":{"tags":["evals"],"summary":"List evals","description":"List a workflow's evals, newest first.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort order is\nfixed (`-created_at, -id`); there are no totals or page numbers. Each item is\nthe same headline `GET /v3/workflows/{workflow_id}/evals/{eval_id}/` returns.\n\nAn unknown or cross-org workflow returns 404.","operationId":"v3_list_evals","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"422":{"description":"`VALIDATION_ERROR` — The request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}},"/v3/workflows/{workflow_id}/evals/{eval_id}/":{"get":{"tags":["evals"],"summary":"Get eval","description":"Retrieve one eval's frozen headline — poll this until `status` leaves\n`in_progress`.\n\n`accuracy`, `matched`, `mismatched` and `ungraded` are `null` while the eval\nis `in_progress`; `accuracy` also stays `null` on a `processed` eval with a 0\ngraded denominator. `id` here equals the launch's `eval_id`.\n\nAn unknown eval, or one on another workflow or organization, returns 404\n(existence never leaks).","operationId":"v3_get_eval","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"eval_id","in":"path","required":true,"schema":{"type":"string","title":"Eval Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":"The request failed validation.","error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123"}}}}}},"401":{"description":"Authentication failed — missing, invalid, or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"AUTH_FAILED":{"value":{"error":"Authentication failed.","detail":"Authentication failed.","error_code":"AUTH_FAILED","retryable":false,"request_id":"req_abc123"}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `INSUFFICIENT_API_KEY_SCOPE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123"}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"Resource not found.","detail":"Resource not found.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123"}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Rate limit exceeded — retry after backoff.","detail":"Rate limit exceeded — retry after backoff.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123"}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123"}}}}}}}}}},"components":{"schemas":{"AllOfCheck":{"properties":{"type":{"type":"string","const":"all_of","title":"Type"},"checks":{"items":{"oneOf":[{"$ref":"#/components/schemas/RangeCheck"},{"$ref":"#/components/schemas/DateCheck"},{"$ref":"#/components/schemas/ArithmeticCheck"},{"$ref":"#/components/schemas/ComparisonCheck"},{"$ref":"#/components/schemas/OneOfCheck"},{"$ref":"#/components/schemas/RegexCheck"},{"$ref":"#/components/schemas/RequiredCheck"},{"$ref":"#/components/schemas/ConfidenceCheck"},{"$ref":"#/components/schemas/ExpressionCheck"},{"$ref":"#/components/schemas/ValidationCheck"},{"$ref":"#/components/schemas/AllOfCheck"},{"$ref":"#/components/schemas/AnyOfCheck"}],"discriminator":{"propertyName":"type","mapping":{"all_of":"#/components/schemas/AllOfCheck","any_of":"#/components/schemas/AnyOfCheck","arithmetic":"#/components/schemas/ArithmeticCheck","comparison":"#/components/schemas/ComparisonCheck","confidence":"#/components/schemas/ConfidenceCheck","date":"#/components/schemas/DateCheck","expression":"#/components/schemas/ExpressionCheck","one_of":"#/components/schemas/OneOfCheck","range":"#/components/schemas/RangeCheck","regex":"#/components/schemas/RegexCheck","required":"#/components/schemas/RequiredCheck","validation":"#/components/schemas/ValidationCheck"}}},"type":"array","maxItems":32,"minItems":1,"title":"Checks"}},"additionalProperties":false,"type":"object","required":["type","checks"],"title":"AllOfCheck","description":"AND combinator — passes iff every sub-check passes.\n\nTri-state: FAIL if any child fails; else INCONCLUSIVE if any child is\ninconclusive; else PASS. Children are the same closed ``Check`` union\n(mutual recursion via forward ref) so combinators nest by construction —\nthe CheckBuilder UI restricts nesting to a single level for MVP.\n\n``max_length=32`` bounds runaway fan-out per combinator. Practical rules\nstay well below the cap; a legitimate use case wanting more should motivate\nthe raise rather than land silently. Nesting-depth is bounded by pydantic's\nown recursion during parse."},"AnyOfCheck":{"properties":{"type":{"type":"string","const":"any_of","title":"Type"},"checks":{"items":{"oneOf":[{"$ref":"#/components/schemas/RangeCheck"},{"$ref":"#/components/schemas/DateCheck"},{"$ref":"#/components/schemas/ArithmeticCheck"},{"$ref":"#/components/schemas/ComparisonCheck"},{"$ref":"#/components/schemas/OneOfCheck"},{"$ref":"#/components/schemas/RegexCheck"},{"$ref":"#/components/schemas/RequiredCheck"},{"$ref":"#/components/schemas/ConfidenceCheck"},{"$ref":"#/components/schemas/ExpressionCheck"},{"$ref":"#/components/schemas/ValidationCheck"},{"$ref":"#/components/schemas/AllOfCheck"},{"$ref":"#/components/schemas/AnyOfCheck"}],"discriminator":{"propertyName":"type","mapping":{"all_of":"#/components/schemas/AllOfCheck","any_of":"#/components/schemas/AnyOfCheck","arithmetic":"#/components/schemas/ArithmeticCheck","comparison":"#/components/schemas/ComparisonCheck","confidence":"#/components/schemas/ConfidenceCheck","date":"#/components/schemas/DateCheck","expression":"#/components/schemas/ExpressionCheck","one_of":"#/components/schemas/OneOfCheck","range":"#/components/schemas/RangeCheck","regex":"#/components/schemas/RegexCheck","required":"#/components/schemas/RequiredCheck","validation":"#/components/schemas/ValidationCheck"}}},"type":"array","maxItems":32,"minItems":1,"title":"Checks"}},"additionalProperties":false,"type":"object","required":["type","checks"],"title":"AnyOfCheck","description":"OR combinator — passes iff any sub-check passes.\n\nTri-state: PASS if any child passes; else INCONCLUSIVE if any child is\ninconclusive; else FAIL.\n\n``max_length=32`` — see :class:`AllOfCheck` for the rationale."},"ArithmeticCheck":{"properties":{"type":{"type":"string","const":"arithmetic","title":"Type"},"operands":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Operands","description":"The fields combined by `operator`. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"operator":{"type":"string","enum":["sum","subtract","product"],"title":"Operator","default":"sum"},"equals":{"type":"string","minLength":1,"title":"Equals","description":"The field whose value the result must equal. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"tolerance":{"type":"number","minimum":0.0,"title":"Tolerance","description":"Absolute slack allowed around `equals`.","default":0.0}},"additionalProperties":false,"type":"object","required":["type","operands","equals"],"title":"ArithmeticCheck"},"AskCitationV3":{"properties":{"path":{"type":"string","title":"Path","description":"Document path inside the workflow's corpus."},"quote":{"type":"string","title":"Quote","description":"The exact span the answer rests on."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"The source file, for downloads and links."},"block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Id","description":"Anchor within the document."},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"1-based page in the source PDF."},"bbox":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Bbox","description":"Region on that page, as `{x0, y0, x1, y1}` in relative coordinates."}},"type":"object","required":["path","quote","file_id","block_id","page","bbox"],"title":"AskCitationV3","description":"Where an answer came from, resolved to a place in the source PDF."},"AskRequestV3":{"properties":{"question":{"type":"string","minLength":1,"title":"Question","description":"A question about the content of this workflow's documents.","examples":["Which contracts renew before March and what notice do they need?"]},"thread_id":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^kb-[A-Za-z0-9._-]+$"},{"type":"null"}],"title":"Thread Id","description":"Optional conversation id, minted by you, to ask a follow-up in context. Must start with `kb-`. Reuse it to continue; omit it for a fresh question.","examples":["kb-renewals-q3"]}},"type":"object","required":["question"],"title":"AskRequestV3"},"AskResponseV3":{"properties":{"answer":{"type":"string","title":"Answer"},"citations":{"items":{"$ref":"#/components/schemas/AskCitationV3"},"type":"array","title":"Citations"},"path":{"items":{"$ref":"#/components/schemas/AskStepV3"},"type":"array","title":"Path","description":"The route the agent took to the answer — auditable, not decorative."},"steps_used":{"type":"integer","title":"Steps Used"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id","description":"Present when the question was asked in a thread."}},"type":"object","required":["answer","citations","path","steps_used"],"title":"AskResponseV3"},"AskStepV3":{"properties":{"tool":{"type":"string","title":"Tool"},"args":{"additionalProperties":true,"type":"object","title":"Args"}},"type":"object","required":["tool","args"],"title":"AskStepV3","description":"One navigation step the agent took, in order."},"BlobSlotFileV3":{"properties":{"filename":{"type":"string","minLength":1,"title":"Filename","description":"Name for the file. Signed into `read_url`, so whatever reads that URL names the file this without being told again."},"declared_size":{"type":"integer","exclusiveMinimum":0.0,"title":"Declared Size","description":"Exact byte length of the file. Baked into the upload policy, so an upload whose real size differs is refused by storage."},"content_type":{"type":"string","minLength":1,"title":"Content Type","description":"MIME type, pinned by the policy. `application/pdf`, `image/png`, …"}},"type":"object","required":["filename","declared_size","content_type"],"title":"BlobSlotFileV3","description":"One file the caller intends to upload."},"BlobSlotV3":{"properties":{"object_id":{"type":"string","title":"Object Id","description":"Identity of the staged file."},"upload":{"$ref":"#/components/schemas/PresignedPostV3"},"read_url":{"type":"string","title":"Read Url","description":"URL the file is readable at once uploaded — hand it to any endpoint that takes one, `POST /v3/parse/from-url/` included. Minted here because the destination is known before the bytes move, so a caller needs no second call."},"read_url_expires_in_seconds":{"type":"integer","title":"Read Url Expires In Seconds","description":"Lifetime of `read_url` from now."}},"type":"object","required":["object_id","upload","read_url","read_url_expires_in_seconds"],"title":"BlobSlotV3","description":"Somewhere to put one file, and the URL it will be readable at."},"BlobSlotsRequestV3":{"properties":{"files":{"items":{"$ref":"#/components/schemas/BlobSlotFileV3"},"type":"array","maxItems":10,"minItems":1,"title":"Files"}},"type":"object","required":["files"],"title":"BlobSlotsRequestV3","description":"Body for ``POST /v3/blobs/slots/``.","examples":[{"files":[{"content_type":"application/pdf","declared_size":182344,"filename":"april.pdf"}]}]},"BlobSlotsResponseV3":{"properties":{"slots":{"items":{"$ref":"#/components/schemas/BlobSlotV3"},"type":"array","title":"Slots"}},"type":"object","required":["slots"],"title":"BlobSlotsResponseV3","description":"Somewhere to put each file.\n\nA batch is all-or-nothing: one unacceptable file fails the whole call\nbefore a byte moves, so only the call is lost."},"Block":{"properties":{"id":{"type":"string","title":"Id","description":"Stable block identifier in the form `p<page>_b<index>`."},"type":{"type":"string","title":"Type","description":"Semantic type: `text`, `title`, `section-header`, `table`, `picture`, `other`."},"page":{"type":"integer","title":"Page","description":"1-indexed page number this block belongs to."},"bbox":{"additionalProperties":{"type":"number"},"type":"object","title":"Bbox","description":"Normalised bounding box in [0, 1] page coordinates with keys `x0`/`y0`/`x1`/`y1`."},"layout_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Layout Confidence","description":"0-1 layout detection confidence for this block. `null` when no layout detector ran — the `lite` tier gets its layout from the OCR response, which reports no confidence in the type it assigned."},"parse_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Parse Confidence","description":"0-100 parse confidence calibrated from LLM logprobs. `null` when logprobs were unavailable (e.g. text-bytes strategy)."},"regions":{"items":{"$ref":"#/components/schemas/Detection"},"type":"array","title":"Regions","description":"The layout detections this block is made of, each with the words printed inside it. A block the detector reported as one box has one region, that box. Empty only for a block parsed before detections were reported, or one that has no box at all."},"content":{"type":"string","title":"Content","description":"Raw section body — markdown for text/title blocks, HTML for tables, `<figure-content>` for pictures."},"hyperlinks":{"items":{"$ref":"#/components/schemas/Hyperlink"},"type":"array","title":"Hyperlinks","description":"Hyperlinks found in the content via `[text](uri)` markdown syntax."},"rows":{"anyOf":[{"items":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Rows","description":"2D array of table cells for `type=table` blocks — each cell is `{cell_id, text}`. `null` for non-table blocks."},"image_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Base64","description":"Inline base64-encoded cropped image for `type=picture` blocks. Currently `null` for all blocks — image hydration is performed client-side by the SDK consumer."}},"type":"object","required":["id","type","page","bbox","content"],"title":"Block","description":"One semantic block of a parsed document — a structured alternative to\nwalking `<a id></a>` anchors in `markdown`.\n\nAll blocks expose the common fields (`id`, `type`, `page`, `bbox`,\n`confidence`, `content`). Type-specific structured data lives in the\noptional fields (`rows` for tables, `image_base64` for pictures).\nConsumers can switch on `type` to access the per-type fields, or treat\n`content` as the universal fallback."},"Body_v3_parse":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The document to parse."}},"type":"object","required":["file"],"title":"Body_v3_parse"},"Body_v3_upload_and_run_workflow":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"1..100 files forming one document packet."},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"Optional JSON-encoded object of free-form metadata attached to the packet. The extract operator may source datapoints from a top-level key whose name matches a schema field, and from free text in natural language under `__anyformat_free_text__`."},"on_conflict":{"type":"string","enum":["error","rename"],"title":"On Conflict","description":"How to handle an uploaded filename that already exists in the workflow (filenames are unique within a workflow). `error` (the default) rejects the whole request with `409` and lists the conflicting names, so a rename is never silent — the caller must opt in. `rename` accepts the collision and lets the server auto-rename the file by inserting a ` (n)` counter before the extension (`invoice.pdf` → `invoice (1).pdf`).","default":"error"}},"type":"object","required":["files"],"title":"Body_v3_upload_and_run_workflow"},"Body_v3_upload_edit_references":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"1..10 reference documents. Accepted: `.csv`, `.txt`, `.md`, `.rst` and `.pdf`. Content is checked by its bytes, not its extension."}},"type":"object","required":["files"],"title":"Body_v3_upload_edit_references"},"Body_v3_upload_to_dataset":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"1..100 files forming ONE document (one document packet in the dataset)."},"ground_truth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ground Truth","description":"Optional JSON-encoded object: the expected document for this document packet. Keys are the workflow schema's field identifiers — advertise `persistent_id` (the API also accepts `sanitized_name`). A scalar field maps to `string | null`; a table/object field maps to an array of row objects. Ground truth attaches to the workflow's current version."},"on_conflict":{"type":"string","enum":["error","rename"],"title":"On Conflict","description":"How to handle an uploaded filename that already exists in the workflow (filenames are unique within a workflow). `error` (the default) rejects the whole request with `409` and lists the conflicting names, so a rename is never silent — the caller must opt in. `rename` accepts the collision and lets the server auto-rename the file by inserting a ` (n)` counter before the extension (`invoice.pdf` → `invoice (1).pdf`).","default":"error"}},"type":"object","required":["files"],"title":"Body_v3_upload_to_dataset"},"Body_v3_upload_to_workflow":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"1..100 files forming one document packet."},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"Optional JSON-encoded object of free-form metadata attached to the packet. The extract operator may source datapoints from a top-level key whose name matches a schema field, and from free text in natural language under `__anyformat_free_text__`."},"on_conflict":{"type":"string","enum":["error","rename"],"title":"On Conflict","description":"How to handle an uploaded filename that already exists in the workflow (filenames are unique within a workflow). `error` (the default) rejects the whole request with `409` and lists the conflicting names, so a rename is never silent — the caller must opt in. `rename` accepts the collision and lets the server auto-rename the file by inserting a ` (n)` counter before the extension (`invoice.pdf` → `invoice (1).pdf`).","default":"error"}},"type":"object","required":["files"],"title":"Body_v3_upload_to_workflow"},"BooleanField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"boolean","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"BooleanField"},"ClassificationResult":{"properties":{"category":{"type":"string","title":"Category","description":"The category the document was classified as."},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","description":"0-100 model confidence in the verdict. `null` when the verdict carries no score, because nothing was measured."},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence","description":"Free-form evidence text (the snippets the classifier cited). `null` when none captured."}},"type":"object","required":["category","confidence"],"title":"ClassificationResult","description":"One classifier verdict for the collection."},"ClassifyCategory":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable category id used as the edge `branch` value when routing."},"name":{"type":"string","minLength":1,"title":"Name","description":"Display name shown to the LLM; classification and routing key off it, so it must be unique across categories."},"description":{"type":"string","minLength":1,"title":"Description","description":"Free-form description shown to the LLM."}},"additionalProperties":false,"type":"object","required":["id","name","description"],"title":"ClassifyCategory"},"ClassifyNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"classify","title":"Type"},"user_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt","description":"Optional extra instructions inserted between the classifier's system prompt and the document text."},"categories":{"items":{"$ref":"#/components/schemas/ClassifyCategory"},"type":"array","minItems":1,"title":"Categories"}},"additionalProperties":false,"type":"object","required":["id","type","categories"],"title":"ClassifyNode"},"ComparisonCheck":{"properties":{"type":{"type":"string","const":"comparison","title":"Type"},"left":{"type":"string","minLength":1,"title":"Left","description":"The left-hand field. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"op":{"type":"string","enum":["==","!=",">",">=","<","<="],"title":"Op"},"right":{"oneOf":[{"$ref":"#/components/schemas/_FieldOperand"},{"$ref":"#/components/schemas/_LiteralOperand"}],"title":"Right","discriminator":{"propertyName":"source","mapping":{"field":"#/components/schemas/_FieldOperand","literal":"#/components/schemas/_LiteralOperand"}}}},"additionalProperties":false,"type":"object","required":["type","left","op","right"],"title":"ComparisonCheck"},"ConfidenceCheck":{"properties":{"type":{"type":"string","const":"confidence","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The field whose extraction confidence to compare. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"op":{"type":"string","enum":["<","<=",">",">=","==","!="],"title":"Op"},"threshold":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Threshold","description":"Confidence percentile 0..100."}},"additionalProperties":false,"type":"object","required":["type","field","op","threshold"],"title":"ConfidenceCheck"},"Consolidation":{"properties":{"status":{"type":"string","const":"unresolved","title":"Status","description":"Always `unresolved`: no value could be chosen."},"candidates":{"items":{"$ref":"#/components/schemas/ConsolidationCandidate"},"type":"array","title":"Candidates","description":"Each part's answer, to compare against the document before entering the value."}},"type":"object","required":["status","candidates"],"title":"Consolidation","description":"Why a field of a long document has no value: its parts gave answers that could not be combined."},"ConsolidationCandidate":{"properties":{"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"The value this part of the document gave."},"value_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Unit","description":"The unit of `value`, when it has one."},"evidence":{"items":{"$ref":"#/components/schemas/Evidence"},"type":"array","title":"Evidence","description":"Source-text snippets this part cited. Empty when it cited none."}},"type":"object","title":"ConsolidationCandidate","description":"One part of a long document's answer for a field whose parts disagreed."},"DatasetUploadFileV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the file (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"name":{"type":"string","title":"Name","description":"Filename the file is stored under.","examples":["invoice.pdf"]},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name","description":"The name you uploaded, present only when the file was auto-renamed (`on_conflict=rename` resolving a collision). `null` when the stored `name` is the name you sent."}},"type":"object","required":["id","name"],"title":"DatasetUploadFileV3","description":"Per-file entry in a dataset-upload response."},"DatasetUploadResponseV3":{"properties":{"document_packet_id":{"type":"string","title":"Document Packet Id","description":"Unique identifier of the created dataset document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"files":{"items":{"$ref":"#/components/schemas/DatasetUploadFileV3"},"type":"array","title":"Files","description":"Files in the packet, in the order they were provided."},"ground_truth_saved":{"type":"boolean","title":"Ground Truth Saved","description":"Whether ground truth was supplied and saved for this document packet."}},"type":"object","required":["document_packet_id","files","ground_truth_saved"],"title":"DatasetUploadResponseV3","description":"Response for `POST /v3/workflows/{workflow_id}/dataset/upload/`.\n\nOne dataset document packet, all-or-nothing. `document_packet_id` is the\nstable handle for the deferred ground-truth-edit follow-up."},"DateCheck":{"properties":{"type":{"type":"string","const":"date","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The date field. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"earliest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Earliest"},"latest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest"}},"additionalProperties":false,"type":"object","required":["type","field"],"title":"DateCheck"},"DateField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"date","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"DateField"},"DatetimeField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"datetime","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"DatetimeField"},"Detection":{"properties":{"bbox":{"additionalProperties":{"type":"number"},"type":"object","title":"Bbox","description":"Normalised bounding box in [0, 1] page coordinates with keys `x0`/`y0`/`x1`/`y1`."},"type":{"type":"string","title":"Type","description":"What the layout detector called this box."},"text":{"type":"string","title":"Text","description":"The words the page prints inside this box."}},"type":"object","required":["bbox","type","text"],"title":"Detection","description":"One layout detection a block is made of: where it is and what is printed inside it.\n\nA block is often the fusion of several detections, and a consumer that has to point at what\nthe page prints needs the parts, not only their union."},"DocumentPacketCreatedFileV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the file (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"name":{"type":"string","title":"Name","description":"Filename the file is stored under. Filenames are unique within a workflow: a name that collides with an existing file is auto-renamed by inserting a ` (n)` counter before the extension (e.g. `invoice.pdf` → `invoice (1).pdf`).","examples":["invoice.pdf"]},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name","description":"The name you uploaded, present only when the file was auto-renamed to avoid a duplicate name in the workflow. `null` when `name` is the name you uploaded.","examples":["invoice.pdf"]}},"type":"object","required":["id","name"],"title":"DocumentPacketCreatedFileV3","description":"Per-file entry in an upload/create response.\n\nAdds ``original_name`` on top of the slim projection: the name the caller\nuploaded, surfaced only when the file was auto-renamed to avoid a duplicate\nname in the workflow. The original name is not persisted alongside the\nstored ``name``, so this only appears on the response to the request that\ncreated the file — later reads expose ``name`` alone."},"DocumentPacketCreatedV3":{"properties":{"document_packet_id":{"type":"string","title":"Document Packet Id","description":"Unique identifier of the newly created document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow the packet was created under (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"files":{"items":{"$ref":"#/components/schemas/DocumentPacketCreatedFileV3"},"type":"array","title":"Files","description":"Files in the packet, in the order they were provided."}},"type":"object","required":["document_packet_id","workflow_id","files"],"title":"DocumentPacketCreatedV3","description":"Response for the packet-creating uploads (multipart and from-url)."},"DocumentPacketDetailV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow this packet belongs to (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human-readable name of the packet."},"status":{"$ref":"#/components/schemas/DocumentPacketStatus","description":"Processing status. Non-terminal: `not_started`, `queued`, `in_progress`. Terminal: `processed` (success), `error`, `cancelled`.","examples":["processed"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the packet was created (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the packet was last updated (ISO 8601)."},"files":{"items":{"$ref":"#/components/schemas/DocumentPacketFileV3"},"type":"array","title":"Files","description":"Files in this packet."},"latest_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Run Id","description":"Id of the packet's most recent run (hyphenated UUID); `null` until the packet has been run."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Free-form JSON supplied at packet creation. No schema is enforced; the extract operator may source datapoints from a top-level key whose name matches a schema field, and from free text under `__anyformat_free_text__`. `null` when no metadata was attached."}},"type":"object","required":["id","workflow_id","status","files"],"title":"DocumentPacketDetailV3","description":"A packet with its per-file breakdown and latest run reference."},"DocumentPacketFileV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the file (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"name":{"type":"string","title":"Name","description":"Filename the file is stored under. Filenames are unique within a workflow: a name that collides with an existing file is auto-renamed by inserting a ` (n)` counter before the extension (e.g. `invoice.pdf` → `invoice (1).pdf`).","examples":["invoice.pdf"]}},"type":"object","required":["id","name"],"title":"DocumentPacketFileV3","description":"Slim per-file projection inside a packet."},"DocumentPacketFromUrlsRequest":{"properties":{"urls":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Urls","description":"HTTPS URLs the backend fetches server-side. Each file is named by the response's `Content-Disposition` filename when present, else by the last segment of the URL's path.","examples":[["https://example.com/invoices/april.pdf"]]},"staged_files":{"items":{"$ref":"#/components/schemas/StagedFileRef"},"type":"array","maxItems":100,"title":"Staged Files","description":"Files staged via `POST /v3/blobs/slots/` and uploaded already, referenced by `object_id` so the long presigned `read_url` never needs to be passed around. They land after the `urls` entries."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Free-form JSON to attach to the packet. No schema is enforced; the extract operator may source datapoints from a top-level key whose name matches a schema field, and from free text in natural language under `__anyformat_free_text__`."},"on_conflict":{"type":"string","enum":["error","rename"],"title":"On Conflict","description":"How to handle an uploaded filename that already exists in the workflow (filenames are unique within a workflow). `error` (the default) rejects the whole request with `409` and lists the conflicting names, so a rename is never silent — the caller must opt in. `rename` accepts the collision and lets the server auto-rename the file by inserting a ` (n)` counter before the extension (`invoice.pdf` → `invoice (1).pdf`).","default":"error"}},"type":"object","title":"DocumentPacketFromUrlsRequest","description":"Body for ``POST /v3/workflows/{workflow_id}/upload/from-url/``.\n\nEvery URL imports into a single packet atomically — any fetch or\nvalidation failure means nothing is persisted. Files arrive as fetchable\nHTTPS ``urls``, as ``staged_files`` ids from ``POST /v3/blobs/slots/``, or\na mix; 1 to 100 files in total.","examples":[{"urls":["https://example.com/invoices/april.pdf","https://example.com/invoices/april-annex.pdf"]},{"staged_files":[{"filename":"april.pdf","object_id":"06a953d9792572568000f838b051ca9b"}]}]},"DocumentPacketListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentPacketSummaryV3"},"type":"array","title":"Items","description":"Packets on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"DocumentPacketListPageV3","description":"One keyset page of document packets.\n\nFixed ``(-created_at, -id)`` order. No totals or page numbers —\niterate by following ``next_cursor`` until it is null."},"DocumentPacketStatus":{"type":"string","enum":["not_started","queued","in_progress","processed","error","cancelled"],"title":"DocumentPacketStatus","description":"Extraction lifecycle of a packet. Non-terminal: ``not_started``\n(no run yet), ``queued``, ``in_progress``. Terminal: ``processed``\n(success), ``error``, ``cancelled``."},"DocumentPacketSummaryV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow this packet belongs to (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human-readable name of the packet."},"status":{"$ref":"#/components/schemas/DocumentPacketStatus","description":"Processing status. Non-terminal: `not_started`, `queued`, `in_progress`. Terminal: `processed` (success), `error`, `cancelled`.","examples":["processed"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the packet was created (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the packet was last updated (ISO 8601)."}},"type":"object","required":["id","workflow_id","status"],"title":"DocumentPacketSummaryV3","description":"Slim packet projection returned by list pages."},"Edge":{"properties":{"source":{"type":"string","minLength":1,"title":"Source"},"target":{"type":"string","minLength":1,"title":"Target"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch","description":"Source-port label for branch routing. Required when leaving a classify or splitter node by category/rule."}},"additionalProperties":false,"type":"object","required":["source","target"],"title":"Edge","description":"A directed edge between two nodes. ``branch`` carries the source-port label\nused for routing out of ``classify`` (category id) or ``splitter`` (rule id) nodes."},"Edit":{"properties":{"file_id":{"type":"string","title":"File Id","description":"The UUID of the file this form was filled from."},"file_name":{"type":"string","title":"File Name","description":"The file's display name."},"fields":{"items":{"$ref":"#/components/schemas/EditFormField"},"type":"array","title":"Fields","description":"Every form field detected in the document, filled or not, in document order."},"unmatched_instructions":{"items":{"type":"string"},"type":"array","title":"Unmatched Instructions","description":"Instruction fragments, quoted verbatim, that matched no field in this document."},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url","description":"Presigned link to the filled PDF, valid for 15 minutes from the moment this response was built. Re-read the results endpoint for a fresh link. `null` when no filled PDF was stored."}},"type":"object","required":["file_id","file_name"],"title":"Edit","description":"One edit node's filled form for one file of the collection: the values\nwritten into the document's fields, plus a short-lived link to the filled\nPDF. One entry per file the edit node processed."},"EditFormField":{"properties":{"form_field_id":{"type":"string","title":"Form Field Id","description":"Stable identifier for this form field within the document, in the form `p<page>_f<index>`."},"label":{"type":"string","title":"Label","description":"The field's own printed caption, verbatim from the document."},"kind":{"type":"string","title":"Kind","description":"`checkbox` for a tick target, `text` for anything else."},"state":{"type":"string","title":"State","description":"`empty` if the field was blank in the source document and therefore fillable, `prefilled` if the document already carried a value. Prefilled fields are never overwritten, so they always read back with `value: null`."},"page":{"type":"integer","title":"Page","description":"1-indexed page number the field sits on."},"bbox":{"additionalProperties":{"type":"number"},"type":"object","title":"Bbox","description":"The field's fillable area as a normalised bounding box in [0, 1] page coordinates, keys `x0`/`y0`/`x1`/`y1`."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"The value written into the field — the literal string `true`/`false` for a `checkbox`. `null` when no instruction addressed this field."},"confidence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confidence","description":"Raw, uncalibrated 0-100 match score for pairing an instruction with this field. It grades how surely the instruction addresses the field, not whether the written value is correct, and it is not a probability. `null` when no instruction addressed this field, because nothing was measured."}},"type":"object","required":["form_field_id","label","kind","state","page","bbox","value","confidence"],"title":"EditFormField","description":"One form field the edit node detected, with the value it wrote in."},"EditReferenceDocumentV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the reference document (hyphenated UUID). This is the value to put in an Edit node's `reference_document_ids`.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"name":{"type":"string","title":"Name","description":"Filename the reference is stored under.","examples":["company-profile.csv"]},"status":{"type":"string","enum":["pending","ready","failed"],"title":"Status","description":"`ready`: usable by a run. `pending`: a PDF still being parsed — text formats are never pending. `failed`: parsing did not complete; `error` says why. A run whose Edit node names a reference that is not `ready` is refused rather than filled from a partial reference."},"truncated":{"type":"boolean","title":"Truncated","description":"Whether the parsed text was cut at the per-reference size cap. The document is still usable; the tail of it simply is not part of what the node fills from."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why parsing failed. `null` unless `status` is `failed`."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","status","truncated","created_at","updated_at"],"title":"EditReferenceDocumentV3"},"EditReferenceListResponseV3":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/EditReferenceDocumentV3"},"type":"array","title":"Documents","description":"Reference documents on this workflow, newest last."}},"type":"object","required":["documents"],"title":"EditReferenceListResponseV3","description":"Response for the upload and list endpoints alike.\n\nThe same shape both ways so a caller can poll the list endpoint with the\nexact model it got back from the upload."},"EnumField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"enum","title":"Data Type"},"enum_options":{"items":{"$ref":"#/components/schemas/EnumOption"},"type":"array","minItems":1,"title":"Enum Options"}},"additionalProperties":false,"type":"object","required":["name","data_type","enum_options"],"title":"EnumField"},"EnumOption":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"description":{"type":"string","minLength":1,"title":"Description","description":"Free-form description shown to the model."}},"additionalProperties":false,"type":"object","required":["name","description"],"title":"EnumOption"},"EvalDetailV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the eval (hyphenated UUID); equals the launch's `eval_id`.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"run_number":{"type":"integer","title":"Run Number","description":"Per-workflow run counter (#1, #2, …) for this eval.","examples":[3]},"version_id":{"type":"string","title":"Version Id","description":"Workflow version the eval scored.","examples":["abcdef1234"]},"status":{"$ref":"#/components/schemas/EvalStatus","description":"Grading status. Non-terminal: `in_progress`. Terminal: `processed`, `error`.","examples":["processed"]},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy","description":"Headline accuracy in [0, 1]; `null` while `in_progress` and on a `processed` eval with a 0 graded denominator.","examples":[0.94]},"matched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Matched","description":"Fields that matched ground truth; `null` while `in_progress`."},"mismatched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mismatched","description":"Fields that mismatched ground truth; `null` while `in_progress`."},"ungraded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ungraded","description":"Fields with no ground truth to grade against; `null` while `in_progress`."},"file_count":{"type":"integer","title":"File Count","description":"Number of dataset documents in the eval's realized cohort.","examples":[42]},"failed_count":{"type":"integer","title":"Failed Count","description":"Number of dataset documents that failed to enqueue for this run.","examples":[0]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the eval was created (ISO 8601)."}},"type":"object","required":["id","run_number","version_id","status","file_count","failed_count"],"title":"EvalDetailV3","description":"One eval's frozen headline — the poll target for a launched run.\n\n``id`` here is the same identifier the launch returned as ``eval_id``. The\nheadline fields (``accuracy``, ``matched``, ``mismatched``, ``ungraded``)\nare ``null`` while ``status`` is ``in_progress``; ``accuracy`` stays ``null``\non a ``processed`` eval whose graded denominator is 0."},"EvalLaunchRequest":{"properties":{"version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Id","description":"Workflow version to evaluate. Omit to run against the workflow's current version; pass a value to override.","examples":["abcdef1234"]}},"type":"object","title":"EvalLaunchRequest","description":"Body for ``POST /v3/workflows/{workflow_id}/evals/`` (JSON, optional).\n\nSend ``{}`` (or no body) to evaluate the workflow's current version."},"EvalLaunchedV3":{"properties":{"eval_id":{"type":"string","title":"Eval Id","description":"Unique identifier of the new eval (hyphenated UUID); the poll handle.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"run_number":{"type":"integer","title":"Run Number","description":"Per-workflow run counter (#1, #2, …) for this eval.","examples":[3]},"enqueued_count":{"type":"integer","title":"Enqueued Count","description":"Number of dataset documents whose extraction was enqueued for this run.","examples":[42]},"failed_count":{"type":"integer","title":"Failed Count","description":"Number of dataset documents that failed to enqueue. Read the eval for the failed document ids.","examples":[0]}},"type":"object","required":["eval_id","run_number","enqueued_count","failed_count"],"title":"EvalLaunchedV3","description":"202 response: the eval was created and its cohort enqueued.\n\nExposes counts, never the internal extraction/file ids. Read the eval by\n``eval_id`` for the per-document breakdown (including which documents\nfailed to enqueue)."},"EvalListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EvalDetailV3"},"type":"array","title":"Items","description":"Evals on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"EvalListPageV3","description":"One keyset page of evals.\n\nFixed ``(-created_at, -id)`` order. No totals or page numbers — iterate by\nfollowing ``next_cursor`` until it is null."},"EvalStatus":{"type":"string","enum":["in_progress","processed","error"],"title":"EvalStatus","description":"Grading lifecycle of an eval. Non-terminal: ``in_progress`` (the headline\nfields are null). Terminal: ``processed`` (graded) and ``error``."},"Evidence":{"properties":{"text":{"type":"string","title":"Text","description":"The exact source-text snippet that supports the extracted value."},"page_number":{"type":"integer","title":"Page Number","description":"1-indexed page number where the snippet was found."}},"type":"object","required":["text","page_number"],"title":"Evidence","description":"A snippet of source text supporting an extracted value, with the page it came from.\n\nWhen ``text`` starts with ``metadata.``, the value was sourced from the\npacket's caller-supplied metadata (not the document): the remainder is\nthe JSON path into that metadata, and ``page_number`` is ``0``. Encoded\nin ``text`` on purpose — same wire shape as document evidence, no schema\nchange for SDK consumers."},"ExpressionCheck":{"properties":{"type":{"type":"string","const":"expression","title":"Type"},"expression":{"type":"string","maxLength":1000,"minLength":1,"title":"Expression"}},"additionalProperties":false,"type":"object","required":["type","expression"],"title":"ExpressionCheck","description":"A CEL expression over the whole extraction, evaluated in a sandbox.\n\nThe expression reads one root variable ``data`` and addresses fields by\nextracted name (``data.total``, ``data.lineas.map(l, l.importe)``), never by\n``persistent_id`` — so ``field_ids`` returns ``[]`` for it, and a field\nrename silently breaks the rule. An expression the evaluator cannot parse,\ncannot answer with a boolean, or prices above its evaluation budget reports\n``inconclusive``.\n\nADR platform/0036 records why the CEL parser stays out of this package, so\n``expression`` is unvalidated here."},"ExtractedField":{"properties":{"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"The extracted value, always as a string — a field declared `integer` returns `\"3\"`, not `3`. Values are stored as text, so `data_type` governs how the field is extracted and validated, not the JSON type you get back; parse it yourself, minding that a document may write a number as `1.026,00`. `null` when extraction produced no value."},"value_override":{"anyOf":[{},{"type":"null"}],"title":"Value Override","description":"A human-supplied override of the extracted `value`, if one was set during verification. `null` when no override exists."},"verification_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Status","description":"Verification state for this datapoint (e.g. `not_verified`, `verified`). `null` when not yet reviewed."},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","description":"Model confidence in the extracted value, on a 0-100 scale. `null` when the backend did not produce a confidence (e.g. manual entry)."},"evidence":{"items":{"$ref":"#/components/schemas/Evidence"},"type":"array","title":"Evidence","description":"Source-text snippets the model used to derive this value."},"value_source":{"anyOf":[{"type":"string","enum":["document","lookup"]},{"type":"null"}],"title":"Value Source","description":"Where a smart-lookup field's value came from. Omitted for other fields."},"lookup_check":{"anyOf":[{"type":"string","enum":["confirmed","conflict"]},{"type":"null"}],"title":"Lookup Check","description":"Whether the lookup `confirmed` the document value or was in `conflict` with it (the document value is kept). Omitted when no lookup compared the two."},"consolidation":{"anyOf":[{"$ref":"#/components/schemas/Consolidation"},{"type":"null"}],"description":"Set when a long document's parts gave answers that could not be combined; `value` is then `null`. Omitted otherwise."}},"type":"object","required":["value"],"title":"ExtractedField","description":"One extracted field's value, confidence, and supporting evidence."},"Extraction":{"properties":{"split_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Split Name","description":"The split category this extraction belongs to. `null` for linear workflows."},"partition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition","description":"The partition value within the split. `null` when the split has no partitions."},"fields":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/ExtractedField"},{"items":{"additionalProperties":{"$ref":"#/components/schemas/ExtractedField"},"type":"object"},"type":"array"}]},"type":"object","title":"Fields","description":"Extracted fields keyed by field name. Same shape as the legacy top-level `extraction`."},"validations":{"items":{"$ref":"#/components/schemas/Validation"},"type":"array","title":"Validations","description":"Verdicts of the workflow's validate nodes."}},"type":"object","required":["fields"],"title":"Extraction","description":"One unit of extracted data. For linear (parse->extract) workflows there\nis exactly one entry with `split_name=null` and `partition=null`. For split\nworkflows there is one entry per (split, partition) pair; join with\n`splits[]` by `split_name` to look up geometry."},"ExtractionSchema":{"properties":{"fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/StringField"},{"$ref":"#/components/schemas/IntegerField"},{"$ref":"#/components/schemas/FloatField"},{"$ref":"#/components/schemas/BooleanField"},{"$ref":"#/components/schemas/DateField"},{"$ref":"#/components/schemas/DatetimeField"},{"$ref":"#/components/schemas/EnumField"},{"$ref":"#/components/schemas/MultiSelectField"},{"$ref":"#/components/schemas/ObjectField"}],"discriminator":{"propertyName":"data_type","mapping":{"boolean":"#/components/schemas/BooleanField","date":"#/components/schemas/DateField","datetime":"#/components/schemas/DatetimeField","enum":"#/components/schemas/EnumField","float":"#/components/schemas/FloatField","integer":"#/components/schemas/IntegerField","multi_select":"#/components/schemas/MultiSelectField","object":"#/components/schemas/ObjectField","string":"#/components/schemas/StringField"}}},"type":"array","minItems":1,"title":"Fields","description":"Field definitions making up this extract's output."}},"additionalProperties":false,"type":"object","required":["fields"],"title":"ExtractionSchema","description":"Schema describing what an extract node produces.\n\nModeled as a typed object (not a bare ``list[AnyField]``) so metadata\ncan be added later (versioning, derived flags, output-shape hints)\nwithout another wire-format break. At least one field is required."},"FilePages":{"properties":{"file_id":{"type":"string","title":"File Id","description":"The file's UUID."},"file_name":{"type":"string","title":"File Name","description":"The file's display name."},"pages":{"items":{"type":"integer"},"type":"array","title":"Pages","description":"1-indexed page numbers from this file."}},"type":"object","required":["file_id","file_name","pages"],"title":"FilePages","description":"A file's contribution of pages to a split or partition. 1-indexed."},"FloatField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"float","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"FloatField"},"GroundTruthErrorDetail":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/GroundTruthErrorItem"},"type":"array","title":"Errors","description":"One entry per offending ground-truth key."}},"type":"object","required":["errors"],"title":"GroundTruthErrorDetail","description":"`detail` body of a `422 GT_INVALID` error."},"GroundTruthErrorItem":{"properties":{"field":{"type":"string","title":"Field","description":"Dotted path to the offending ground-truth key.","examples":["line_items.0.sku"]},"msg":{"type":"string","title":"Msg","description":"Human-readable reason the value was rejected."}},"type":"object","required":["field","msg"],"title":"GroundTruthErrorItem","description":"One ground-truth validation error.\n\nStable public remap of the backend's pydantic `{type, loc, msg}`: `field`\nis the dotted path from `loc`, `msg` is kept, the raw pydantic `type` is\ndropped so the public contract never leaks the validator name."},"GroundTruthInvalidError":{"properties":{"error":{"type":"string","title":"Error","examples":["Ground truth validation failed"]},"detail":{"$ref":"#/components/schemas/GroundTruthErrorDetail"},"error_code":{"type":"string","const":"GT_INVALID","title":"Error Code","default":"GT_INVALID"},"retryable":{"type":"boolean","title":"Retryable","default":false},"request_id":{"type":"string","title":"Request Id","description":"Correlates this response with the server logs."}},"type":"object","required":["error","detail","request_id"],"title":"GroundTruthInvalidError","description":"`422 GT_INVALID` error envelope: the supplied ground truth failed validation.\n\n`detail.errors` lists each offending key. Two other 422 reasons on this\nroute reuse the standard error envelope with a string `detail`: an\nunresolved extract node (`EXTRACT_NODE_UNRESOLVED`), and a raw 422 the\nbackend forwards verbatim from slot minting (e.g. a zero-byte file).\nUnsupported bytes and an invalid request are 400, not 422."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthCheckResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message. Returns `\"ok\"` when the service is healthy.","examples":["ok"]}},"type":"object","required":["message"],"title":"HealthCheckResponse","description":"Health check response confirming the API is operational."},"Hyperlink":{"properties":{"text":{"type":"string","title":"Text","description":"The display text of the link."},"uri":{"type":"string","title":"Uri","description":"The link target (URL, mailto:, etc.)."}},"type":"object","required":["text","uri"],"title":"Hyperlink","description":"A hyperlink found inside a block's content."},"IntegerField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"integer","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"IntegerField"},"KeyCheckResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"Always `true` — a failed check returns the standard error envelope with `error_code` `MISSING_API_KEY` or `INVALID_API_KEY`.","examples":[true]},"organization_id":{"type":"string","title":"Organization Id","description":"UUID of the organization the key belongs to.","examples":["7f4a1c2e-0000-4000-8000-000000000001"]},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name","description":"Display name of the owning organization, when the backend surfaces it.","examples":["Acme Corp"]},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"Scopes granted to the key (`read`, `write`). `null` when the backend does not report them.","examples":[["read","write"]]}},"type":"object","required":["valid","organization_id"],"title":"KeyCheckResponse","description":"Confirms the API key is valid and names its owning organization."},"KnowledgeEntryPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/KnowledgeEntryV3"},"type":"array","title":"Items","description":"Entries on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"KnowledgeEntryPageV3","description":"One page of a workflow's knowledge corpus tree."},"KnowledgeEntryV3":{"properties":{"path":{"type":"string","title":"Path","description":"Document or navigation-page path inside the workflow's corpus."},"kind":{"type":"string","title":"Kind","description":"`document` for a source file, `index` for a generated navigation page."},"folder":{"type":"string","title":"Folder","description":"Parent folder of `path`; empty string at the corpus root."},"title":{"type":"string","title":"Title","description":"Document title, or the navigation page's own heading."},"page_count":{"type":"integer","title":"Page Count","description":"Page count for a document; 0 for a navigation page."}},"type":"object","required":["path","kind","folder","title","page_count"],"title":"KnowledgeEntryV3","description":"One node of a workflow's knowledge corpus tree."},"KnowledgeNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"knowledge","title":"Type"}},"additionalProperties":false,"type":"object","required":["id","type"],"title":"KnowledgeNode","description":"Terminal knowledge sink — its presence opts the workflow into the\nknowledge base (priced separately, so absent by default).\n\nThe backend reacts to parse callbacks by ingesting parsed markdown into\nthe workflow's navigable corpus; core never executes this node — the\nexecution builder keeps it and its edges off the worker message. Emits\nnothing downstream."},"KnowledgeReadResultV3":{"properties":{"path":{"type":"string","title":"Path","description":"Document or navigation-page path inside the workflow's corpus."},"kind":{"type":"string","title":"Kind","description":"`document` for a source file, `index` for a generated navigation page."},"folder":{"type":"string","title":"Folder","description":"Parent folder of `path`; empty string at the corpus root."},"title":{"type":"string","title":"Title","description":"Document title, or the navigation page's own heading."},"page_count":{"type":"integer","title":"Page Count","description":"Page count for a document; 0 for a navigation page."},"content":{"type":"string","title":"Content","description":"The document's text, capped; see `truncated`."},"truncated":{"type":"boolean","title":"Truncated","description":"True when `content` was cut off at the cap."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"The source file, for downloads and links."},"source_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Version Id","description":"The workflow version whose run produced this content."}},"type":"object","required":["path","kind","folder","title","page_count","content","truncated","file_id","source_version_id"],"title":"KnowledgeReadResultV3","description":"The rendered content of one entry in a workflow's knowledge corpus."},"KnowledgeSearchHitV3":{"properties":{"path":{"type":"string","title":"Path","description":"Document path inside the workflow's corpus."},"folder":{"type":"string","title":"Folder","description":"Parent folder of `path`."},"title":{"type":"string","title":"Title","description":"Document title."},"page_count":{"type":"integer","title":"Page Count","description":"Page count of the source document."},"snippet":{"type":"string","title":"Snippet","description":"A window of text around the best-matching term, wrapped in «»."},"rank":{"type":"number","title":"Rank","description":"Relevance score (BM25); higher ranks first."}},"type":"object","required":["path","folder","title","page_count","snippet","rank"],"title":"KnowledgeSearchHitV3","description":"One ranked hit from a workflow's knowledge corpus."},"KnowledgeSnapshotV3":{"properties":{"corpus_version":{"type":"string","title":"Corpus Version","description":"Version identifier of the snapshot this URL points to."},"url":{"type":"string","title":"Url","description":"Presigned GET URL for the corpus tar."},"size_bytes":{"type":"integer","title":"Size Bytes","description":"Size of the tar in bytes."},"document_count":{"type":"integer","title":"Document Count","description":"Number of documents in the corpus."},"built_at":{"type":"string","format":"date-time","title":"Built At","description":"When this snapshot was built."},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds","description":"TTL of `url` from the moment of this response."}},"type":"object","required":["corpus_version","url","size_bytes","document_count","built_at","expires_in_seconds"],"title":"KnowledgeSnapshotV3","description":"A presigned URL to the whole knowledge corpus tar for a workflow."},"LookupFileUpload":{"properties":{"filename":{"type":"string","minLength":1,"title":"Filename"},"content":{"type":"string","minLength":1,"title":"Content","description":"Base64-encoded file bytes."}},"additionalProperties":false,"type":"object","required":["filename","content"],"title":"LookupFileUpload","description":"Inline lookup-file content carried on the typed create call.\n\nThe backend reads ``filename`` + ``content`` (base64-encoded bytes),\nuploads the file, and appends the new lookup file's id to\n``ExtractNode.lookup_file_ids``. Create-input only — not persisted on\nthe node after upload."},"MultiSelectField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"multi_select","title":"Data Type"},"enum_options":{"items":{"$ref":"#/components/schemas/EnumOption"},"type":"array","minItems":1,"title":"Enum Options"}},"additionalProperties":false,"type":"object","required":["name","data_type","enum_options"],"title":"MultiSelectField"},"ObjectField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"object","title":"Data Type"},"nested_fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/StringField"},{"$ref":"#/components/schemas/IntegerField"},{"$ref":"#/components/schemas/FloatField"},{"$ref":"#/components/schemas/BooleanField"},{"$ref":"#/components/schemas/DateField"},{"$ref":"#/components/schemas/DatetimeField"},{"$ref":"#/components/schemas/EnumField"},{"$ref":"#/components/schemas/MultiSelectField"}],"discriminator":{"propertyName":"data_type","mapping":{"boolean":"#/components/schemas/BooleanField","date":"#/components/schemas/DateField","datetime":"#/components/schemas/DatetimeField","enum":"#/components/schemas/EnumField","float":"#/components/schemas/FloatField","integer":"#/components/schemas/IntegerField","multi_select":"#/components/schemas/MultiSelectField","string":"#/components/schemas/StringField"}}},"type":"array","minItems":1,"title":"Nested Fields","description":"Columns of one row. The extracted value is an array of objects with these keys, one entry per row found. Only one level of nesting is supported — an object field's children must be non-object types."}},"additionalProperties":false,"type":"object","required":["name","data_type","nested_fields"],"title":"ObjectField","description":"A repeating group — the way a table or line-item list is modelled.\n\nThere is no separate list type: one ``object`` field describes the shape of\na single row, and the extraction returns an array of those rows."},"OneOfCheck":{"properties":{"type":{"type":"string","const":"one_of","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The field to test. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"allowed":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Allowed"},"case_sensitive":{"type":"boolean","title":"Case Sensitive","default":false}},"additionalProperties":false,"type":"object","required":["type","field","allowed"],"title":"OneOfCheck"},"ParseFromUrlRequest":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"HTTPS URL the backend fetches server-side. The file is named by the response's `Content-Disposition` filename when present, else by the last segment of the URL's path. Pass exactly one of `url` or `object_id`.","examples":["https://example.com/invoices/april.pdf"]},"object_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Id","description":"`object_id` of a file staged via `POST /v3/blobs/slots/`, uploaded already. Resolved server-side to the staged bytes, so the long presigned `read_url` never needs to be passed around. Requires `filename`. Pass exactly one of `url` or `object_id`.","examples":["06a953d9792572568000f838b051ca9b"]},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Filename","description":"Name for the staged file — required with `object_id` (a staged blob carries no name of its own) and not accepted with `url`.","examples":["april.pdf"]}},"type":"object","title":"ParseFromUrlRequest","description":"Body for ``POST /v3/parse/from-url/``.\n\nThe document arrives one of two ways: a fetchable HTTPS ``url``, or the\n``object_id`` of a file staged via ``POST /v3/blobs/slots/`` — the id is a\nfew characters where the staged file's presigned ``read_url`` is kilobytes,\nso an id-carrying caller (an MCP agent spending a context window) never has\nto round-trip the long URL.","examples":[{"url":"https://example.com/invoices/april.pdf"},{"filename":"april.pdf","object_id":"06a953d9792572568000f838b051ca9b"}]},"ParseResult":{"properties":{"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown","description":"Document content rendered as structured markdown. Each block is preceded by an empty `<a id=\"p{page}_b{idx}\"></a>` anchor (invisible in any markdown renderer; the id joins to `blocks[].id` and can be used as an in-page link target). Image hydration for picture/figure blocks happens client-side. `null` if parsing failed."},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"`markdown` with `<img>` tags removed and runs of blank lines collapsed. Block anchors are deliberately kept, so on a document whose pictures are markdown images rather than `<img>` tags this is `markdown` verbatim — read one or the other, not both. `null` if `markdown` is null."},"layout_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Layout Confidence","description":"Document-level YOLO layout confidence on a 0-1 scale, char-weighted mean across all blocks. `null` if no annotated sections."},"parse_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Parse Confidence","description":"Document-level parse confidence on a 0-100 scale, char-weighted mean of per-block LLM logprob scores. `null` when no blocks have logprob-based confidence."},"blocks":{"items":{"$ref":"#/components/schemas/Block"},"type":"array","title":"Blocks","description":"Structured per-block representation of the parsed document. One entry per `<a id></a>` anchor in document order, with type-specific structured data (`rows` for tables, `image_base64` for pictures) surfaced as first-class fields so consumers don't have to HTML-parse."}},"type":"object","required":["markdown"],"title":"ParseResult","description":"Parsed markdown for a file."},"PresignedPostV3":{"properties":{"url":{"type":"string","title":"Url","description":"Endpoint to POST the multipart form to."},"fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Fields","description":"Form fields to send verbatim, before the file part. Do not edit them."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"After this the slot is dead; ask for another."}},"type":"object","required":["url","fields","expires_at"],"title":"PresignedPostV3","description":"Where to send the bytes: POST `fields` plus the file as multipart to `url`."},"PublicEditNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"edit","title":"Type"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"Free-text values to map onto the fillable fields detected on the upstream parse's PDF, e.g. 'Name: ACME SL; Date: 2026-01-01; I accept the terms: yes'. Takes precedence over a reference document where both address the same field."},"reference_document_ids":{"items":{"type":"string"},"type":"array","title":"Reference Document Ids","description":"Ids of reference documents this node fills from, uploaded to the workflow beforehand. Every id must belong to this workflow and be fully resolved, or the run is refused rather than filled from a partial reference."},"font":{"type":"string","enum":["sans","serif","mono"],"title":"Font","description":"Typeface the filled values are written in.","default":"sans"},"output_mode":{"type":"string","enum":["flattened","editable"],"title":"Output Mode","description":"'flattened' paints the values on and the PDF is final. 'editable' leaves each value in a live form field a reviewer can correct in any PDF viewer.","default":"flattened"}},"additionalProperties":false,"type":"object","required":["id","type"],"title":"PublicEditNode","description":"Terminal form-filler. ``reference_uris`` is resolved server-side at run\ntime from ``reference_document_ids`` — omitted here, and any client-supplied\nvalue is discarded rather than trusted."},"PublicExtractNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"extract","title":"Type"},"mode":{"type":"string","enum":["standard","agentic","lite"],"title":"Mode","description":"Extraction tier. 'standard' (default): single-pass extraction — the best balance for simple documents and layouts. 'agentic': multi-step extraction that maps every table to the schema and reasons across sections — for dense or cross-page tables; extra cost per page. 'lite' (shown as 'Fast' in the app): standard extraction, faster and cheaper; quality may vary on complex layouts.","default":"standard"},"extraction_schema":{"$ref":"#/components/schemas/ExtractionSchema","description":"Schema for the fields this node extracts. Required."},"lookup_file_ids":{"items":{"type":"string"},"type":"array","title":"Lookup File Ids","description":"Ids of the workflow's smart-lookup reference files this node looks values up in. Read it back from GET and echo it to keep the files; write lookup_file_uploads to add one."},"lookup_suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lookup Suggestion","description":"Free-form hint shown to the smart-lookup matcher."},"lookup_reasoning_effort":{"anyOf":[{"type":"string","enum":["minimal","low","medium","high"]},{"type":"null"}],"title":"Lookup Reasoning Effort","description":"Reasoning effort for the smart-lookup matcher (gpt-5 family): minimal | low | medium | high. None = model default. Higher effort improves match reliability on noisy join keys at higher latency/cost."},"lookup_file_uploads":{"items":{"$ref":"#/components/schemas/LookupFileUpload"},"type":"array","title":"Lookup File Uploads","description":"Inline lookup-file content for the typed create call. Each entry is uploaded and its new id is appended to ``lookup_file_ids``; this field is create-input only."},"use_images":{"type":"boolean","title":"Use Images","description":"Retired — accepted for compatibility, ignored. Extraction reads the parsed text only.","default":false}},"additionalProperties":false,"type":"object","required":["id","type","extraction_schema"],"title":"PublicExtractNode"},"PublicIfElseNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"if_else","title":"Type"},"condition":{"oneOf":[{"$ref":"#/components/schemas/RangeCheck"},{"$ref":"#/components/schemas/DateCheck"},{"$ref":"#/components/schemas/ArithmeticCheck"},{"$ref":"#/components/schemas/ComparisonCheck"},{"$ref":"#/components/schemas/OneOfCheck"},{"$ref":"#/components/schemas/RegexCheck"},{"$ref":"#/components/schemas/RequiredCheck"},{"$ref":"#/components/schemas/ConfidenceCheck"},{"$ref":"#/components/schemas/ExpressionCheck"},{"$ref":"#/components/schemas/ValidationCheck"},{"$ref":"#/components/schemas/AllOfCheck"},{"$ref":"#/components/schemas/AnyOfCheck"}],"title":"Condition","discriminator":{"propertyName":"type","mapping":{"all_of":"#/components/schemas/AllOfCheck","any_of":"#/components/schemas/AnyOfCheck","arithmetic":"#/components/schemas/ArithmeticCheck","comparison":"#/components/schemas/ComparisonCheck","confidence":"#/components/schemas/ConfidenceCheck","date":"#/components/schemas/DateCheck","expression":"#/components/schemas/ExpressionCheck","one_of":"#/components/schemas/OneOfCheck","range":"#/components/schemas/RangeCheck","regex":"#/components/schemas/RegexCheck","required":"#/components/schemas/RequiredCheck","validation":"#/components/schemas/ValidationCheck"}}}},"additionalProperties":false,"type":"object","required":["id","type","condition"],"title":"PublicIfElseNode"},"PublicParseNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"parse","title":"Type"},"mode":{"type":"string","enum":["standard","agentic","lite","flash"],"title":"Mode","description":"Parse tier. 'standard' (default): page-by-page parsing with reading-order correction — the best quality/speed balance for most documents and tables. 'agentic': adaptive parsing that works hardest on dense tables (50+ rows, many columns) — highest fidelity on complex documents; extra cost per page. 'lite' (shown as 'Fast' in the app): OCR-only tier — accurate OCR, no LLM call; use standard or agentic when the output needs LLM correction. 'flash': the PDF's own text layer plus layout grounding, no model call — the cheapest and fastest tier; a page with no text layer is OCR'd by default (see scanned_pages).","default":"standard"},"prompt_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Hint","description":"Free-form hint that biases the parse output. Standard and agentic modes only; ignored in lite."},"figure_enhancement":{"type":"boolean","title":"Figure Enhancement","description":"Standard mode: extract structured data from charts and images — extra processing per figure. Ignored in agentic and in lite.","default":false},"annotation_reading":{"type":"boolean","title":"Annotation Reading","description":"Standard mode, experimental: re-read handwritten numbers inside larger blocks on their own high-resolution crop, and mark handwriting in the markdown as <handwritten>. Ignored in agentic, lite and flash.","default":false},"cache":{"type":"boolean","title":"Cache","description":"Reuse parsed output when the same file was already parsed with the same mode and settings — a hit skips the whole parse. Disable to force a fresh parse.","default":true},"effort":{"type":"string","enum":["low","mid","accurate"],"title":"Effort","description":"Agentic mode: quality/cost preset. 'low' = several times cheaper but more errors on dense or low-contrast tables, 'mid' (default) = balanced, 'accurate' = highest fidelity. (Distinct from lite `ocr_effort`.)","default":"mid"},"ocr_effort":{"type":"string","enum":["medium","high"],"title":"Ocr Effort","description":"Lite mode: 'high' (default) = the strongest OCR — best accuracy on complex layouts, tables, and handwriting. 'medium' = faster and cheaper, for clean digital documents. (Distinct from agentic `effort`.)","default":"high"},"scanned_pages":{"type":"string","enum":["ocr","skip","fail"],"title":"Scanned Pages","description":"Flash mode: what to do with a page whose text layer produced no words. 'ocr' (default): OCR the page and parse it like any other, at no extra model cost. 'skip': serve it blank and flag it, don't fail the parse. 'fail': raise, naming the page numbers.","default":"ocr"}},"additionalProperties":false,"type":"object","required":["id","type"],"title":"PublicParseNode"},"PublicSlackAlertNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"slack_alert","title":"Type"},"channel_id":{"type":"string","minLength":1,"title":"Channel Id"},"channel_name":{"type":"string","minLength":1,"title":"Channel Name"},"message_template":{"type":"string","minLength":1,"title":"Message Template"},"severity":{"type":"string","enum":["info","warning","critical"],"title":"Severity","default":"info"}},"additionalProperties":false,"type":"object","required":["id","type","channel_id","channel_name","message_template"],"title":"PublicSlackAlertNode","description":"Terminal alert-sink. ``field_index`` is executor-injected — omitted here."},"PublicValidateNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"validate","title":"Type"},"rules":{"items":{"$ref":"#/components/schemas/ValidationRule"},"type":"array","minItems":1,"title":"Rules"}},"additionalProperties":false,"type":"object","required":["id","type","rules"],"title":"PublicValidateNode"},"RangeCheck":{"properties":{"type":{"type":"string","const":"range","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The bounded numeric field. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max"}},"additionalProperties":false,"type":"object","required":["type","field"],"title":"RangeCheck"},"RegexCheck":{"properties":{"type":{"type":"string","const":"regex","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The field to match. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"pattern":{"type":"string","minLength":1,"title":"Pattern","description":"Evaluated with google-re2 (linear time); never stdlib re."}},"additionalProperties":false,"type":"object","required":["type","field","pattern"],"title":"RegexCheck"},"RequiredCheck":{"properties":{"type":{"type":"string","const":"required","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The field that must be present. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."}},"additionalProperties":false,"type":"object","required":["type","field"],"title":"RequiredCheck"},"ResultsResponseV3":{"properties":{"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The document packet's UUID — v3 canonical name for `collection_id`. Same value; both fields are always present.","default":""},"verification_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Url","description":"Link to the AnyFormat dashboard for human review of this collection's results. `null` if the dashboard URL cannot be constructed (e.g. no files in the collection, or the deployment has no frontend URL configured)."},"parse":{"anyOf":[{"$ref":"#/components/schemas/ParseResult"},{"type":"null"}],"description":"Parse-node output (rendered markdown). `null` when the workflow has no parse node. Always present in the response."},"classifications":{"items":{"$ref":"#/components/schemas/ClassificationResult"},"type":"array","title":"Classifications","description":"Per-classifier-node verdicts. Empty when the workflow has no classifier."},"splits":{"items":{"$ref":"#/components/schemas/SplitResult"},"type":"array","title":"Splits","description":"Splitter output: category-level geometry with optional partitions. Empty when the workflow has no splitter."},"extractions":{"items":{"$ref":"#/components/schemas/Extraction"},"type":"array","title":"Extractions","description":"Flat list of extraction datapoints. Linear workflows produce one entry with `split_name=null` and `partition=null`. Split workflows produce one entry per (split, partition). Empty when no extraction has run yet."},"edits":{"items":{"$ref":"#/components/schemas/Edit"},"type":"array","title":"Edits","description":"Filled-form output, one entry per file an edit node processed. Empty when the workflow has no edit node."},"extraction":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/ExtractedField"},{"items":{"additionalProperties":{"$ref":"#/components/schemas/ExtractedField"},"type":"object"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Extraction","description":"**Deprecated** — use `extractions` instead. Extracted fields keyed by field name, populated only for linear workflows (single extract node, no splitter). `null` for split workflows; read `extractions[]` instead.","deprecated":true}},"type":"object","required":["document_packet_id"],"title":"ResultsResponseV3","description":"v3-scoped results envelope — same shape as ``ResultsResponse`` minus the\nlegacy ``collection_id`` alias. v3 emits only ``document_packet_id``."},"RunDetailV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the run (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow this run executed (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The document packet the run executed on (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"status":{"$ref":"#/components/schemas/RunStatus","description":"Execution status. Non-terminal: `queued`, `in_progress`. Terminal: `processed` (success), `error`, `cancelled`.","examples":["processed"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the run was triggered (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp of the run's last status change (ISO 8601)."},"results":{"anyOf":[{"$ref":"#/components/schemas/ResultsResponseV3"},{"type":"null"}],"description":"Extraction results envelope; `null` until `status` is `processed`."}},"type":"object","required":["id","workflow_id","document_packet_id","status"],"title":"RunDetailV3","description":"Flat single-run read: lifecycle status plus results inline.\n\n`results` is `null` until the run reaches `processed`, then carries the\nresults envelope — no separate results endpoint, no 412 while in flight."},"RunListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunSummaryV3"},"type":"array","title":"Items","description":"Runs on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"RunListPageV3","description":"One keyset page of runs.\n\nFixed ``(-created_at, -id)`` order. No totals or page numbers —\niterate by following ``next_cursor`` until it is null."},"RunStatus":{"type":"string","enum":["queued","in_progress","processed","error","cancelled"],"title":"RunStatus","description":"Execution lifecycle of a run. Non-terminal: ``queued``,\n``in_progress``. Terminal: ``processed`` (success), ``error``,\n``cancelled``."},"RunSummaryV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the run (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The document packet the run executes on (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"status":{"$ref":"#/components/schemas/RunStatus","description":"Execution status. Non-terminal: `queued`, `in_progress`. Terminal: `processed` (success), `error`, `cancelled`.","examples":["processed"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the run was triggered (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp of the run's last status change (ISO 8601)."}},"type":"object","required":["id","document_packet_id","status"],"title":"RunSummaryV3","description":"Slim run projection returned by list pages."},"RunTriggeredV3":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier of the new run (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The document packet the run executes on (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow being run (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"status":{"$ref":"#/components/schemas/RunStatus","description":"Status at acceptance time — normally `queued`.","examples":["queued"]}},"type":"object","required":["run_id","document_packet_id","workflow_id","status"],"title":"RunTriggeredV3","description":"202 response for both run triggers (`upload/run/` and\n`document-packets/{id}/run/`)."},"SplitPartition":{"properties":{"id":{"type":"string","title":"Id","description":"The partition's UUID. Pass it to `GET /v3/splits/{split_id}/pdf/` to download these pages as a PDF."},"name":{"type":"string","title":"Name","description":"The partition value (free-form string)."},"files":{"items":{"$ref":"#/components/schemas/FilePages"},"type":"array","title":"Files"},"confidence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confidence","description":"0-100 minimum confidence across the partition's ranges. `null` when the partition holds no page, because nothing was measured."}},"type":"object","required":["id","name","files","confidence"],"title":"SplitPartition","description":"A partition value within a split (e.g. `1234-5678` under `Account Holdings`)."},"SplitResult":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The split's UUID, for `GET /v3/splits/{split_id}/pdf/`. `null` when the splitter partitions this category, because the category is then several sub-documents and no single one of them: download each `partitions[].id` instead."},"name":{"type":"string","title":"Name","description":"The split's category name."},"files":{"items":{"$ref":"#/components/schemas/FilePages"},"type":"array","title":"Files","description":"Per-file page lists, union of all partitions."},"confidence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confidence","description":"0-100 aggregate confidence (min across partitions). `null` when the category matched no page, because nothing was measured."},"partitions":{"items":{"$ref":"#/components/schemas/SplitPartition"},"type":"array","title":"Partitions"}},"type":"object","required":["name","files","confidence"],"title":"SplitResult","description":"A category-level split: which pages of which files fall under it, plus\nany partitions inside it. Extraction data lives under `extractions[]` —\njoin by `split_name`."},"SplitterNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"splitter","title":"Type"},"rules":{"items":{"$ref":"#/components/schemas/SplitterRule"},"type":"array","minItems":1,"title":"Rules"}},"additionalProperties":false,"type":"object","required":["id","type","rules"],"title":"SplitterNode"},"SplitterRule":{"properties":{"id":{"type":"string","minLength":1,"title":"Id"},"name":{"type":"string","minLength":1,"title":"Name"},"description":{"type":"string","minLength":1,"title":"Description"},"partition_key":{"type":"string","title":"Partition Key","description":"Field that further partitions this category into separate sub-documents (e.g. invoice_number): each distinct value becomes its own split, extracted independently. Empty = routing-only, the whole category flows on as one document.","default":""}},"additionalProperties":false,"type":"object","required":["id","name","description"],"title":"SplitterRule"},"StagedFileRef":{"properties":{"object_id":{"type":"string","minLength":1,"title":"Object Id","description":"`object_id` from the staging response, uploaded already.","examples":["06a953d9792572568000f838b051ca9b"]},"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename","description":"Name the file lands under in the workflow.","examples":["april.pdf"]}},"type":"object","required":["object_id","filename"],"title":"StagedFileRef","description":"One file staged via ``POST /v3/blobs/slots/``, referenced by id.\n\nThe id replaces the staged file's kilobytes-long presigned ``read_url``;\nthe server resolves it back to the bytes. ``filename`` is required because\na staged blob carries no name of its own."},"StringField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"string","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"StringField"},"Validation":{"properties":{"rule_id":{"type":"string","title":"Rule Id","description":"The configured rule ID."},"description":{"type":"string","title":"Description","description":"The rule's natural-language description; empty for a deterministic rule.","default":""},"severity":{"type":"string","title":"Severity","description":"`error` or `warning`, as declared on the rule."},"status":{"type":"string","title":"Status","description":"`pass`, `fail`, or `inconclusive` — the last one when the rule could not be evaluated (no data, an unanswerable expression)."},"detail":{"type":"string","title":"Detail","description":"Human-readable explanation of the verdict.","default":""},"compared_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Compared Values","description":"The field values the rule looked at, keyed by field name. `null` when nothing was compared."},"source_fields":{"items":{"type":"string"},"type":"array","title":"Source Fields","description":"`persistent_id`s of the rule's inputs. Empty for automatic extraction warnings; field names are in `compared_values`."}},"type":"object","required":["rule_id","severity","status"],"title":"Validation","description":"A configured rule verdict."},"ValidationCheck":{"properties":{"type":{"type":"string","const":"validation","title":"Type"},"rule_id":{"type":"string","minLength":1,"title":"Rule Id","description":"Stable id of the upstream ValidationRule to route on."},"status":{"type":"string","enum":["fail","pass","inconclusive"],"title":"Status","description":"Outcome to match. ``fail`` (default) is the common case for routing to an alert branch.","default":"fail"}},"additionalProperties":false,"type":"object","required":["type","rule_id"],"title":"ValidationCheck","description":"Routes on the outcome of a named validation rule already run upstream.\n\nReads from ``state.validation_results`` (populated by an upstream\n``ValidateNode``), filtered to the current partition (``split_id``) so\nper-partition IfElse routing matches per-partition rule outcomes. The\n``status`` values mirror the worker enum\n(``anyformat_core.operations.validate_rules`` — ``pass`` / ``fail`` /\n``inconclusive``) verbatim: no translation layer, so template tokens\nlike ``${validation.<rule_id>.status}`` render the same three strings\nthe enum uses.\n\nUnlike every other ``Check`` variant this consumes no extracted fields\n(``field_ids`` returns ``[]``); the rule identity is the entire input.\nA ``rule_id`` with no matching entry evaluates to ``inconclusive`` — the\nrule didn't run for this partition, so the outcome is unknown."},"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"},"ValidationRule":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable rule id; round-trips through validation results."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional human-readable rule name. Round-trips through the config endpoint so renames are preserved."},"kind":{"type":"string","enum":["ai","deterministic"],"title":"Kind","description":"'deterministic' = a structured check run in code — instant, free, reproducible; 'ai' = a model judges the rule description against the extraction. Prefer deterministic whenever the condition is exact and testable.","default":"ai"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Natural-language description sent to the LLM. Required when kind == 'ai'."},"check":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/RangeCheck"},{"$ref":"#/components/schemas/DateCheck"},{"$ref":"#/components/schemas/ArithmeticCheck"},{"$ref":"#/components/schemas/ComparisonCheck"},{"$ref":"#/components/schemas/OneOfCheck"},{"$ref":"#/components/schemas/RegexCheck"},{"$ref":"#/components/schemas/RequiredCheck"},{"$ref":"#/components/schemas/ConfidenceCheck"},{"$ref":"#/components/schemas/ExpressionCheck"},{"$ref":"#/components/schemas/ValidationCheck"},{"$ref":"#/components/schemas/AllOfCheck"},{"$ref":"#/components/schemas/AnyOfCheck"}],"discriminator":{"propertyName":"type","mapping":{"all_of":"#/components/schemas/AllOfCheck","any_of":"#/components/schemas/AnyOfCheck","arithmetic":"#/components/schemas/ArithmeticCheck","comparison":"#/components/schemas/ComparisonCheck","confidence":"#/components/schemas/ConfidenceCheck","date":"#/components/schemas/DateCheck","expression":"#/components/schemas/ExpressionCheck","one_of":"#/components/schemas/OneOfCheck","range":"#/components/schemas/RangeCheck","regex":"#/components/schemas/RegexCheck","required":"#/components/schemas/RequiredCheck","validation":"#/components/schemas/ValidationCheck"}}},{"type":"null"}],"title":"Check","description":"Structured deterministic check. Required when kind == 'deterministic'."},"severity":{"type":"string","enum":["error","warning"],"title":"Severity","description":"How a failed rule is labelled in results. Display-level only — it never blocks the run.","default":"error"},"source_fields":{"items":{"type":"string"},"type":"array","title":"Source Fields","description":"Persistent ids of fields this rule references."}},"additionalProperties":false,"type":"object","required":["id"],"title":"ValidationRule"},"WorkflowCreateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","examples":["Invoice or receipt"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/PublicParseNode"},{"$ref":"#/components/schemas/ClassifyNode"},{"$ref":"#/components/schemas/SplitterNode"},{"$ref":"#/components/schemas/PublicExtractNode"},{"$ref":"#/components/schemas/PublicValidateNode"},{"$ref":"#/components/schemas/PublicIfElseNode"},{"$ref":"#/components/schemas/PublicSlackAlertNode"},{"$ref":"#/components/schemas/PublicEditNode"},{"$ref":"#/components/schemas/KnowledgeNode"}],"discriminator":{"propertyName":"type","mapping":{"classify":"#/components/schemas/ClassifyNode","edit":"#/components/schemas/PublicEditNode","extract":"#/components/schemas/PublicExtractNode","if_else":"#/components/schemas/PublicIfElseNode","knowledge":"#/components/schemas/KnowledgeNode","parse":"#/components/schemas/PublicParseNode","slack_alert":"#/components/schemas/PublicSlackAlertNode","splitter":"#/components/schemas/SplitterNode","validate":"#/components/schemas/PublicValidateNode"}}},"type":"array","minItems":1,"title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/Edge"},"type":"array","title":"Edges"}},"additionalProperties":false,"type":"object","required":["name","nodes"],"title":"WorkflowCreateRequest","description":"Public-surface workflow create body — typed graph of parse / classify / splitter / extract / validate nodes.\n\nA ``validate`` node carries ``rules``; each rule is either AI-evaluated\n(``kind=\"ai\"`` + a natural-language ``description``) or deterministic\n(``kind=\"deterministic\"`` + a structured ``check``, evaluated in pure\nPython with no model call).\n\nUses ``PublicNode`` (public request models with only the fields callers\nmay set); the domain ``AnyNode`` also carries ``filter`` (worker-only)\nand executor-injected / staff-only fields, so the public bodies pin a\nstricter node schema. Call :meth:`to_domain` before forwarding to the\nbackend.","examples":[{"description":"Pull the invoice number and total from each document.","edges":[{"source":"parse","target":"extract"}],"name":"Invoice totals","nodes":[{"id":"parse","mode":"standard","type":"parse"},{"extraction_schema":{"fields":[{"data_type":"string","description":"Invoice number as printed on the document.","name":"invoice_number"},{"data_type":"float","description":"Invoice total in the document's currency.","name":"total_amount"}]},"id":"extract","mode":"standard","type":"extract"}]}]},"WorkflowDetailV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the workflow (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"name":{"type":"string","title":"Name","description":"Human-readable name of the workflow.","examples":["Invoice Processing"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of what this workflow extracts.","examples":["A workflow for processing invoices and retrieving invoice details."]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the workflow was created (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the workflow was last modified (ISO 8601)."},"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/PublicParseNode"},{"$ref":"#/components/schemas/ClassifyNode"},{"$ref":"#/components/schemas/SplitterNode"},{"$ref":"#/components/schemas/PublicExtractNode"},{"$ref":"#/components/schemas/PublicValidateNode"},{"$ref":"#/components/schemas/PublicIfElseNode"},{"$ref":"#/components/schemas/PublicSlackAlertNode"},{"$ref":"#/components/schemas/PublicEditNode"},{"$ref":"#/components/schemas/KnowledgeNode"}],"discriminator":{"propertyName":"type","mapping":{"classify":"#/components/schemas/ClassifyNode","edit":"#/components/schemas/PublicEditNode","extract":"#/components/schemas/PublicExtractNode","if_else":"#/components/schemas/PublicIfElseNode","knowledge":"#/components/schemas/KnowledgeNode","parse":"#/components/schemas/PublicParseNode","slack_alert":"#/components/schemas/PublicSlackAlertNode","splitter":"#/components/schemas/SplitterNode","validate":"#/components/schemas/PublicValidateNode"}}},"type":"array","title":"Nodes","description":"Typed graph nodes (parse / classify / splitter / extract / validate / if_else)."},"edges":{"items":{"$ref":"#/components/schemas/Edge"},"type":"array","title":"Edges","description":"Directed edges between the graph nodes."}},"type":"object","required":["id","name","nodes"],"title":"WorkflowDetailV3","description":"A workflow with its complete typed graph inline.\n\n``{name, description, nodes, edges}`` is the exact shape\n``POST /v3/workflows/`` accepts — mutate it and feed it back to edit."},"WorkflowListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowSummaryV3"},"type":"array","title":"Items","description":"Workflows on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"WorkflowListPageV3","description":"One keyset page of workflows.\n\nFixed ``(-created_at, -id)`` order. No totals or page numbers by design\n(ANY-1608) — iterate by following ``next_cursor`` until it is null."},"WorkflowSummaryV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the workflow (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"name":{"type":"string","title":"Name","description":"Human-readable name of the workflow.","examples":["Invoice Processing"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of what this workflow extracts.","examples":["A workflow for processing invoices and retrieving invoice details."]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the workflow was created (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the workflow was last modified (ISO 8601)."}},"type":"object","required":["id","name"],"title":"WorkflowSummaryV3","description":"Slim workflow projection returned by create and list."},"WorkflowUpdateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","examples":["Invoice or receipt"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/PublicParseNode"},{"$ref":"#/components/schemas/ClassifyNode"},{"$ref":"#/components/schemas/SplitterNode"},{"$ref":"#/components/schemas/PublicExtractNode"},{"$ref":"#/components/schemas/PublicValidateNode"},{"$ref":"#/components/schemas/PublicIfElseNode"},{"$ref":"#/components/schemas/PublicSlackAlertNode"},{"$ref":"#/components/schemas/PublicEditNode"},{"$ref":"#/components/schemas/KnowledgeNode"}],"discriminator":{"propertyName":"type","mapping":{"classify":"#/components/schemas/ClassifyNode","edit":"#/components/schemas/PublicEditNode","extract":"#/components/schemas/PublicExtractNode","if_else":"#/components/schemas/PublicIfElseNode","knowledge":"#/components/schemas/KnowledgeNode","parse":"#/components/schemas/PublicParseNode","slack_alert":"#/components/schemas/PublicSlackAlertNode","splitter":"#/components/schemas/SplitterNode","validate":"#/components/schemas/PublicValidateNode"}}},"type":"array","minItems":1,"title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/Edge"},"type":"array","title":"Edges"}},"additionalProperties":false,"type":"object","required":["name","nodes"],"title":"WorkflowUpdateRequest","description":"Public-surface workflow update body — full replacement of the typed graph.\n\nEcho each existing field's ``persistent_id`` (from ``GET``) unchanged —\nincluding across renames — to keep the field's identity; omit it for\nnew fields. Restricts the node union to the public types (see\n``WorkflowCreateRequest``). Call :meth:`to_domain` before forwarding to\nthe backend.","examples":[{"description":"Pull the invoice number and total from each document.","edges":[{"source":"parse","target":"extract"}],"name":"Invoice totals","nodes":[{"id":"parse","mode":"standard","type":"parse"},{"extraction_schema":{"fields":[{"data_type":"string","description":"Invoice number as printed on the document.","name":"invoice_number","persistent_id":"0686bb97-8c30-70f0-8000-97669e00aaaa"},{"data_type":"float","description":"Invoice total in the document's currency.","name":"total_amount"}]},"id":"extract","mode":"standard","type":"extract"}]}]},"WorkflowVersionListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowVersionSummaryV3"},"type":"array","title":"Items","description":"Versions on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"WorkflowVersionListPageV3","description":"One keyset page of a workflow's versions, newest first.\n\nItem 0 of the first page is the version runs use. Follow ``next_cursor``\nuntil it is null; there are no totals or page numbers."},"WorkflowVersionSummaryV3":{"properties":{"version_id":{"type":"string","title":"Version Id","description":"Identifier of the version; pass it as `?version=` on `GET /v3/workflows/{workflow_id}/`.","examples":["FGaV4I2JAA"]},"version":{"type":"string","title":"Version","description":"Display number, `major.minor.patch`.","examples":["1.2.0"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the version was created (ISO 8601)."}},"type":"object","required":["version_id","version"],"title":"WorkflowVersionSummaryV3","description":"One entry in a workflow's version history.\n\nVersions are read-only: they exist for comparison and audit, and runs\nalways use the latest version. Pass ``version_id`` as\n``GET /v3/workflows/{workflow_id}/?version=`` to read that version's graph."},"_FieldOperand":{"properties":{"source":{"type":"string","const":"field","title":"Source"},"field":{"type":"string","minLength":1,"title":"Field","description":"The compared field. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."}},"additionalProperties":false,"type":"object","required":["source","field"],"title":"_FieldOperand"},"_LiteralOperand":{"properties":{"source":{"type":"string","const":"literal","title":"Source"},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"}],"title":"Value"}},"additionalProperties":false,"type":"object","required":["source","value"],"title":"_LiteralOperand"},"ErrorEnvelope":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary."},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of field errors for validation failures, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`)."},"error_code":{"type":"string","description":"Stable identifier for programmatic handling.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"]},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx)."},"request_id":{"type":"string","description":"Correlates this response with server logs."}}}},"securitySchemes":{"ApiKeyAuth":{"type":"http","description":"API key issued from app.anyformat.ai/api-key. Send as `Authorization: Bearer <key>`.","scheme":"bearer"}}},"tags":[{"name":"workflows","description":"Workflows define extraction templates — what fields to extract from documents. Create workflows, upload files, run extractions, and fetch results."},{"name":"document-packets","description":"Document packets group uploaded documents for a workflow. Address a packet directly to (re-)run its workflow."},{"name":"runs","description":"Extraction runs — the first-class result entity. Each run is a single execution of a workflow against a document packet; fetch its status and results flat by run id."},{"name":"splits","description":"Splits — the sub-documents a splitter node carves out of a packet. Download any one of them as a PDF, built from the source documents on request and never stored."},{"name":"parse","description":"Parse a single document with the platform's fast lite parse — a one-call shortcut over the workflow upload + run primitives, backed by your organization's system parse workflow."},{"name":"health","description":"Health check endpoints to verify API availability."}]}