{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/processor_runs":{"post":{"operationId":"create","summary":"Run Processor","description":"Run processors (extraction, classification, splitting, etc.) on a given document.\n\n**Synchronous vs Asynchronous Processing:**\n- **Asynchronous (default)**: Returns immediately with `PROCESSING` status. Use webhooks or polling to get results.\n- **Synchronous**: Set `sync: true` to wait for completion and get final results in the response (5-minute timeout).\n\n**For asynchronous processing:**\n- You can [configure webhooks](https://docs.extend.ai/product/webhooks/configuration) to receive notifications when a processor run is complete or failed.\n- Or you can [poll the get endpoint](https://docs.extend.ai/2025-04-21/developers/api-reference/processor-endpoints/get-processor-run) for updates on the status of the processor run.\n","tags":["subpackage_processorRun"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully created processor run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processorRun_create_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests - Processing runs limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunProcessorRequestTooManyRequestsError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"processorId":{"$ref":"#/components/schemas/ProcessorId"},"version":{"type":"string","default":"latest","description":"An optional version of the processor to use. When not supplied, the most recent published version of the processor will be used. Special values include:\n- `\"latest\"` for the most recent published version. If there are no published versions, the draft version will be used.\n- `\"draft\"` for the draft version.\n- Specific version numbers corresponding to versions your team has published, e.g. `\"1.0\"`, `\"2.2\"`, etc.\n"},"file":{"$ref":"#/components/schemas/ProcessorRunFileInput","description":"The file to be processed. One of `file` or `rawText` must be provided. Supported file types can be found [here](https://docs.extend.ai/2025-04-21/product/general/supported-file-types)."},"rawText":{"type":"string","description":"A raw string to be processed. Can be used in place of file when passing raw text data streams. One of `file` or `rawText` must be provided."},"sync":{"type":"boolean","default":false,"description":"Whether to run the processor synchronously. When `true`, the request will wait for the processor run to complete and return the final results. When `false` (default), the request returns immediately with a `PROCESSING` status, and you can poll for completion or use webhooks. For production use cases, we recommending leaving sync off and building around an async integration for more resiliency, unless your use case is predictably fast (e.g. sub < 30 seconds) run time or otherwise have integration constraints that require a synchronous API.\n\n**Timeout**: Synchronous requests have a 5-minute timeout. If the processor run takes longer, it will continue processing asynchronously and you can retrieve the results via the GET endpoint.\n"},"priority":{"type":"integer","default":50,"description":"An optional value used to determine the relative order of ProcessorRuns when rate limiting is in effect. Lower values will be prioritized before higher values."},"metadata":{"$ref":"#/components/schemas/JsonObject","description":"An optional object that can be passed in to identify the run of the document processor. It will be returned back to you in the response and webhooks.\n\nTo categorize processor runs for billing and usage tracking, include `extend:usage_tags` with an array of string values (e.g., `{\"extend:usage_tags\": [\"production\", \"team-eng\", \"customer-123\"]}`). Tags must contain only alphanumeric characters, hyphens, and underscores; any special characters will be automatically removed.\n"},"config":{"$ref":"#/components/schemas/ProcessorRunsPostRequestBodyContentApplicationJsonSchemaConfig","description":"The configuration for the processor run. If this is provided, this config will be used. If not provided, the config for the specific version you provide will be used. The type of configuration must match the processor type."}},"required":["processorId"]}}}}},"get":{"operationId":"list","summary":"List Processor Runs","description":"List runs of a Processor. A ProcessorRun represents a single execution of a processor against a file.\n","tags":["subpackage_processorRun"],"parameters":[{"name":"status","in":"query","description":"Filters processor runs by their status. If not provided, no filter is applied.\n\n The status of a processor run:\n * `\"PENDING\"` - The processor run has not started yet\n * `\"PROCESSING\"` - The processor run is in progress\n * `\"PROCESSED\"` - The processor run completed successfully\n * `\"FAILED\"` - The processor run encountered an error\n * `\"CANCELLED\"` - The processor run was cancelled\n","required":false,"schema":{"$ref":"#/components/schemas/ProcessorStatus"}},{"name":"processorId","in":"query","description":"Filters processor runs by the processor ID. If not provided, runs for all processors are returned.\n\nExample: `\"dp_BMdfq_yWM3sT-ZzvCnA3f\"`\n","required":false,"schema":{"type":"string"}},{"name":"processorType","in":"query","description":"Filters processor runs by the processor type. If not provided, runs for all processor types are returned.\n\nExample: `\"EXTRACT\"`\n","required":false,"schema":{"$ref":"#/components/schemas/ProcessorType"}},{"name":"sourceId","in":"query","description":"Filters processor runs by the source ID. The source ID corresponds to the entity that created the processor run.\n\nExample: `\"workflow_run_123\"`\n","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","description":"Filters processor runs by the source that created them. If not provided, runs from all sources are returned.\n\nThe source of the processor run:\n* `\"ADMIN\"` - Created by admin\n* `\"BATCH_PROCESSOR_RUN\"` - Created from a batch processor run\n* `\"PLAYGROUND\"` - Created from playground\n* `\"WORKFLOW_CONFIGURATION\"` - Created from workflow configuration\n* `\"WORKFLOW_RUN\"` - Created from a workflow run\n* `\"STUDIO\"` - Created from Studio\n* `\"API\"` - Created via API\n","required":false,"schema":{"$ref":"#/components/schemas/ProcessorRunsGetParametersSource"}},{"name":"fileNameContains","in":"query","description":"Filters processor runs by the name of the file. Only returns processor runs where the file name contains this string.\n\nExample: `\"invoice\"`\n","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","description":"Sorts the processor runs by the given field.","required":false,"schema":{"$ref":"#/components/schemas/SortByEnum","default":"updatedAt"}},{"name":"sortDir","in":"query","description":"Sorts the processor runs in ascending or descending order. Ascending order means the earliest processor run is returned first.","required":false,"schema":{"$ref":"#/components/schemas/SortDirEnum","default":"desc"}},{"name":"nextPageToken","in":"query","required":false,"schema":{"$ref":"#/components/schemas/NextPageToken"}},{"name":"maxPageSize","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MaxPageSize","default":10}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"You will get a list of summaries for each processor run. These are shortened versions of the full ProcessorRun object.\n\nTo get the full object, use the [Get ProcessorRun](https://docs.extend.ai/2025-04-21/developers/api-reference/processor-endpoints/get-processor-run) endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processorRun_list_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/processor_runs/{id}":{"get":{"operationId":"get","summary":"Get Processor Run","description":"Retrieve details about a specific processor run, including its status, outputs, and any edits made during review.\n\nA common use case for this endpoint is to poll for the status and final output of an async processor run when using the [Run Processor](https://docs.extend.ai/2025-04-21/developers/api-reference/processor-endpoints/run-processor) endpoint. For instance, if you do not want to not configure webhooks to receive the output via completion/failure events.\n","tags":["subpackage_processorRun"],"parameters":[{"name":"id","in":"path","description":"The unique identifier for this processor run.\n\nExample: `\"dpr_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved processor run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processorRun_get_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete","summary":"Delete Processor Run","description":"Delete a processor run and all associated data from Extend. This operation is permanent and cannot be undone.\n\nThis endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.\n","tags":["subpackage_processorRun"],"parameters":[{"name":"id","in":"path","description":"The ID of the processor run to delete.\n\nExample: `\"dpr_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted processor run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processorRun_delete_Response_200"}}}},"404":{"description":"Processor run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}}}},"/processor_runs/{id}/cancel":{"post":{"operationId":"cancel","summary":"Cancel Processor Run","description":"Cancel a running processor run by its ID. This endpoint allows you to stop a processor run that is currently in progress.\n\nNote: Only processor runs with a status of `\"PROCESSING\"` can be cancelled. Processor runs that have already completed, failed, or been cancelled cannot be cancelled again.\n","tags":["subpackage_processorRun"],"parameters":[{"name":"id","in":"path","description":"The unique identifier for the processor run to cancel.\n\nExample: `\"dpr_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully cancelled processor run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processorRun_cancel_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/batch_processor_runs/{id}":{"get":{"operationId":"get","summary":"Get Batch Processor Run","description":"Retrieve details about a batch processor run, including evaluation runs","tags":["subpackage_batchProcessorRun"],"parameters":[{"name":"id","in":"path","description":"The unique identifier of the batch processor run to retrieve. The ID will always start with \"bpr_\".\n\nExample: `\"bpr_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved batch processor run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/batchProcessorRun_get_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/processors":{"get":{"operationId":"list","summary":"List Processors","description":"List all processors in your organization","tags":["subpackage_processor"],"parameters":[{"name":"type","in":"query","description":"Filter processors by type","required":false,"schema":{"$ref":"#/components/schemas/ProcessorType"}},{"name":"nextPageToken","in":"query","description":"Token for retrieving the next page of results","required":false,"schema":{"type":"string"}},{"name":"maxPageSize","in":"query","description":"Maximum number of processors to return per page","required":false,"schema":{"type":"integer","default":25}},{"name":"sortBy","in":"query","description":"Field to sort by","required":false,"schema":{"$ref":"#/components/schemas/ProcessorsGetParametersSortBy","default":"updatedAt"}},{"name":"sortDir","in":"query","description":"Sort direction","required":false,"schema":{"$ref":"#/components/schemas/ProcessorsGetParametersSortDir","default":"desc"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved processors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProcessorsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate Limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create","summary":"Create Processor","description":"Create a new processor in Extend, optionally cloning from an existing processor","tags":["subpackage_processor"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully created processor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processor_create_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Processor to clone not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the new processor"},"type":{"$ref":"#/components/schemas/ProcessorType"},"cloneProcessorId":{"type":"string","description":"The ID of an existing processor to clone. One of `cloneProcessorId` or `config` must be provided.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"config":{"$ref":"#/components/schemas/ProcessorsPostRequestBodyContentApplicationJsonSchemaConfig","description":"The configuration for the processor. The type of configuration must match the processor type. One of `cloneProcessorId` or `config` must be provided."}},"required":["name","type"]}}}}}},"/processors/{id}":{"post":{"operationId":"update","summary":"Update Processor","description":"Update an existing processor in Extend","tags":["subpackage_processor"],"parameters":[{"name":"id","in":"path","description":"The ID of the processor to update.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully updated processor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processor_update_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The new name for the processor"},"config":{"$ref":"#/components/schemas/ProcessorsIdPostRequestBodyContentApplicationJsonSchemaConfig","description":"The new configuration for the processor. The type of configuration must match the processor type:\n* For classification processors, use `ClassificationConfig`\n* For extraction processors, use `ExtractionConfig`\n* For splitter processors, use `SplitterConfig`\n"}}}}}}}},"/processors/{id}/publish":{"post":{"operationId":"create","summary":"Publish Processor Version","description":"This endpoint allows you to publish a new version of an existing processor. Publishing a new version creates a snapshot of the processor's current configuration and makes it available for use in workflows.\n\nPublishing a new version does not automatically update existing workflows using this processor. You may need to manually update workflows to use the new version if desired.\n","tags":["subpackage_processorVersion"],"parameters":[{"name":"id","in":"path","description":"The ID of the processor to publish a new version for.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully published processor version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processorVersion_create_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"releaseType":{"$ref":"#/components/schemas/ProcessorsIdPublishPostRequestBodyContentApplicationJsonSchemaReleaseType","description":"The type of release for this version. The two options are \"major\" and \"minor\", which will increment the version number accordingly."},"description":{"type":"string","description":"A description of the changes in this version. This helps track the evolution of the processor over time."},"config":{"$ref":"#/components/schemas/ProcessorsIdPublishPostRequestBodyContentApplicationJsonSchemaConfig","description":"The configuration for this version of the processor. The type of configuration must match the processor type."}},"required":["releaseType"]}}}}}},"/processors/{processorId}/versions/{processorVersionId}":{"get":{"operationId":"get","summary":"Get Processor Version","description":"Retrieve a specific version of a processor in Extend","tags":["subpackage_processorVersion"],"parameters":[{"name":"processorId","in":"path","description":"The ID of the processor.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":true,"schema":{"type":"string"}},{"name":"processorVersionId","in":"path","description":"The ID of the specific processor version to retrieve.\n\nExample: `\"dpv_QYk6jgHA_8CsO8rVWhyNC\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved processor version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processorVersion_get_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Processor or version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/processors/{id}/versions":{"get":{"operationId":"list","summary":"List Processor Versions","description":"This endpoint allows you to fetch all versions of a given processor, including the current `draft` version.\n\nVersions are typically returned in descending order of creation (newest first), but this should be confirmed in the actual implementation.\nThe `draft` version is the latest unpublished version of the processor, which can be published to create a new version. It might not have any changes from the last published version.\n","tags":["subpackage_processorVersion"],"parameters":[{"name":"id","in":"path","description":"The ID of the processor to retrieve versions for.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved processor versions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/processorVersion_list_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Processor not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parse":{"post":{"operationId":"parse","summary":"Parse File","description":"Parse files to get cleaned, chunked target content (e.g. markdown).\n\nThe Parse endpoint allows you to convert documents into structured, machine-readable formats with fine-grained control over the parsing process. This endpoint is ideal for extracting cleaned document content to be used as context for downstream processing, e.g. RAG pipelines, custom ingestion pipelines, embeddings classification, etc.\n\nFor more details, see the [Parse File guide](https://docs.extend.ai/2025-04-21/product/parsing/parse).\n","tags":[""],"parameters":[{"name":"responseType","in":"query","description":"Controls the format of the response chunks. Defaults to `json` if not specified.\n* `json` - Returns parsed outputs in the response body\n* `url` - Return a presigned URL to the parsed content in the response body\n","required":false,"schema":{"$ref":"#/components/schemas/ParsePostParametersResponseType"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully parsed file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParserRun"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/ParsePostRequestBodyContentApplicationJsonSchemaFile","description":"A file object containing either a URL or a fileId."},"config":{"$ref":"#/components/schemas/ParseConfig"}},"required":["file"]}}}}}},"/parse/async":{"post":{"operationId":"parse-async","summary":"Parse File Async","description":"Parse files **asynchronously** to get cleaned, chunked target content (e.g. markdown).\n\nThe Parse Async endpoint allows you to convert documents into structured, machine-readable formats with fine-grained control over the parsing process. This endpoint is ideal for extracting cleaned document content to be used as context for downstream processing, e.g. RAG pipelines, custom ingestion pipelines, embeddings classification, etc.\n\nParse files asynchronously and get a parser run ID that can be used to check status and retrieve results with the [Get Parser Run](https://docs.extend.ai/2025-04-21/developers/api-reference/parse-endpoints/get-parser-run) endpoint.\n\nThis is useful for:\n* Large files that may take longer to process\n* Avoiding timeout issues with synchronous parsing.\n\nFor more details, see the [Parse File guide](https://docs.extend.ai/2025-04-21/product/parsing/parse).\n","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"202":{"description":"Successfully initiated parser run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParserRunStatus"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/ParseAsyncPostRequestBodyContentApplicationJsonSchemaFile","description":"A file object containing either a URL or a fileId."},"config":{"$ref":"#/components/schemas/ParseConfig"}},"required":["file"]}}}}}},"/parser_runs/{id}":{"get":{"operationId":"get","summary":"Get Parser Run","description":"Retrieve the status and results of a parser run.\n\nUse this endpoint to get results for a parser run that has already completed, or to check on the status of an asynchronous parser run initiated via the [Parse File Asynchronously](https://docs.extend.ai/2025-04-21/developers/api-reference/parse-endpoints/parse-file-async) endpoint.\n\nIf parsing is still in progress, you'll receive a response with just the status. Once complete, you'll receive the full parsed content in the response.\n","tags":["subpackage_parserRun"],"parameters":[{"name":"id","in":"path","description":"The unique identifier for the parser run.\n\nExample: `\"parser_run_xK9mLPqRtN3vS8wF5hB2cQ\"`\n","required":true,"schema":{"type":"string"}},{"name":"responseType","in":"query","description":"Controls the format of the response chunks. Defaults to `json` if not specified.\n* `json` - Returns chunks with inline content\n* `url` - Returns chunks with presigned URLs to content instead of inline data\n","required":false,"schema":{"$ref":"#/components/schemas/ParserRunsIdGetParametersResponseType"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved parser run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/parserRun_get_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete","summary":"Delete Parser Run","description":"Delete a parser run and all associated data from Extend. This operation is permanent and cannot be undone.\n\nThis endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.\n","tags":["subpackage_parserRun"],"parameters":[{"name":"id","in":"path","description":"The ID of the parser run to delete.\n\nExample: `\"parser_run_xK9mLPqRtN3vS8wF5hB2cQ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted parser run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/parserRun_delete_Response_200"}}}},"404":{"description":"Parser run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}}}},"/workflow_runs":{"post":{"operationId":"create","summary":"Run Workflow","description":"Run a Workflow with files. A Workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome. A WorkflowRun will be created for each file processed. A WorkflowRun represents a single execution of a workflow against a file.\n","tags":["subpackage_workflowRun"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully created workflow runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowRun_create_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string","description":"The ID of the workflow to run.\n\nExample: `\"workflow_BMdfq_yWM3sT-ZzvCnA3f\"`\n"},"files":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRunFileInput"},"description":"An array of files to process through the workflow. Either the `files` array or `rawTexts` array must be provided. Supported file types can be found [here](https://docs.extend.ai/2025-04-21/product/general/supported-file-types). There is a limit if 50 files that can be processed at once using this endpoint. If you wish to process more at a time, consider using the [Batch Run Workflow](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/batch-run-workflow) endpoint.\n"},"rawTexts":{"type":"array","items":{"type":"string"},"description":"An array of raw strings. Can be used in place of files when passing raw data. The raw data will be converted to `.txt` files and run through the workflow. If the data follows a specific format, it is recommended to use the files parameter instead. Either `files` or `rawTexts` must be provided.\n"},"version":{"type":"string","description":"An optional version of the workflow that files will be run through. This number can be found when viewing the workflow on the Extend platform. When a version number is not supplied, the most recent published version of the workflow will be used. If no published versions exist, the draft version will be used. To run the `\"draft\"` version of a workflow, use `\"draft\"` as the version.\n\nExamples:\n- `\"3\"` - Run version 3 of the workflow\n- `\"draft\"` - Run the draft version of the workflow\n"},"priority":{"type":"integer","default":50,"description":"An optional value used to determine the relative order of WorkflowRuns when rate limiting is in effect. Lower values will be prioritized before higher values."},"metadata":{"$ref":"#/components/schemas/JsonObject","description":"An optional metadata object that can be assigned to a specific WorkflowRun to help identify it. It will be returned in the response and webhooks. You can place any arbitrary `key : value` pairs in this object.\n\nTo categorize workflow runs for billing and usage tracking, include `extend:usage_tags` with an array of string values (e.g., `{\"extend:usage_tags\": [\"production\", \"team-eng\", \"customer-123\"]}`). Tags must contain only alphanumeric characters, hyphens, and underscores; any special characters will be automatically removed.\n"}},"required":["workflowId"]}}}}},"get":{"operationId":"list","summary":"List Workflow Runs","description":"List runs of a Workflow. Workflows are sequences of steps that process files and data in a specific order to achieve a desired outcome. A WorkflowRun represents a single execution of a workflow against a file.\n","tags":["subpackage_workflowRun"],"parameters":[{"name":"status","in":"query","description":"Filters workflow runs by their status. If not provided, no filter is applied.\n\n The status of a workflow run:\n * `\"PENDING\"` - The workflow run has not started yet\n * `\"PROCESSING\"` - The workflow run is in progress\n * `\"NEEDS_REVIEW\"` - The workflow run requires manual review\n * `\"REJECTED\"` - The workflow run was rejected during manual review\n * `\"PROCESSED\"` - The workflow run completed successfully\n * `\"FAILED\"` - The workflow run encountered an error\n * `\"CANCELLED\"` - The workflow run was cancelled\n * `\"CANCELLING\"` - The workflow run is being cancelled\n","required":false,"schema":{"$ref":"#/components/schemas/WorkflowStatus"}},{"name":"workflowId","in":"query","description":"Filters workflow runs by the workflow ID. If not provided, runs for all workflows are returned.\n\nExample: `\"workflow_BMdfq_yWM3sT-ZzvCnA3f\"`\n","required":false,"schema":{"type":"string"}},{"name":"batchId","in":"query","description":"Filters workflow runs by the batch ID. This is useful for fetching all runs for a given batch created via the [Batch Run Workflow](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/batch-run-workflow) endpoint.\n\nExample: `\"batch_7Ws31-F5\"`\n","required":false,"schema":{"type":"string"}},{"name":"fileNameContains","in":"query","description":"Filters workflow runs by the name of the file. Only returns workflow runs where the file name contains this string.\n\nExample: `\"invoice\"`\n","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","description":"Sorts the workflow runs by the given field.","required":false,"schema":{"$ref":"#/components/schemas/SortByEnum","default":"updatedAt"}},{"name":"sortDir","in":"query","description":"Sorts the workflow runs in ascending or descending order. Ascending order means the earliest workflow run is returned first.","required":false,"schema":{"$ref":"#/components/schemas/SortDirEnum","default":"desc"}},{"name":"nextPageToken","in":"query","required":false,"schema":{"$ref":"#/components/schemas/NextPageToken"}},{"name":"maxPageSize","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MaxPageSize","default":10}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"You will get a list of summaries for each workflow run. These are shortened versions of the full WorkflowRun object.\n\nTo get the full object, use the [Get WorkflowRun](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/get-workflow-run) endpoint.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowRun_list_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workflow_runs/{workflowRunId}":{"get":{"operationId":"get","summary":"Get Workflow Run","description":"Once a workflow has been run, you can check the status and output of a specific WorkflowRun.","tags":["subpackage_workflowRun"],"parameters":[{"name":"workflowRunId","in":"path","description":"The ID of the WorkflowRun that was outputted after a Workflow was run through the API.\n\nExample: `\"workflow_run_8k9m-xyzAB_Pqrst-Nvw4\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved workflow run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowRun_get_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"update","summary":"Update Workflow Run","description":"You can update the name and metadata of an in progress WorkflowRun at any time using this endpoint.","tags":["subpackage_workflowRun"],"parameters":[{"name":"workflowRunId","in":"path","description":"The ID of the WorkflowRun. This ID will start with \"workflow_run\". This ID can be found in the API response when creating a Workflow Run, or in the \"history\" tab of a workflow on the Extend platform.\n\nExample: `\"workflow_run_8k9m-xyzAB_Pqrst-Nvw4\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully updated workflow run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowRun_update_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"An optional name that can be assigned to a specific WorkflowRun"},"metadata":{"$ref":"#/components/schemas/JsonObject","description":"A metadata object that can be assigned to a specific WorkflowRun. If metadata already exists on this WorkflowRun, the newly incoming metadata will be merged with the existing metadata, with the incoming metadata taking field precedence.\n\nYou can include any arbitrary `key : value` pairs in this object.\n\nTo categorize workflow runs for billing and usage tracking, include `extend:usage_tags` with an array of string values (e.g., `{\"extend:usage_tags\": [\"production\", \"team-eng\", \"customer-123\"]}`). Tags must contain only alphanumeric characters, hyphens, and underscores; any special characters will be automatically removed.\n"}}}}}}},"delete":{"operationId":"delete","summary":"Delete Workflow Run","description":"Delete a workflow run and all associated data from Extend. This operation is permanent and cannot be undone.\n\nThis endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.\n","tags":["subpackage_workflowRun"],"parameters":[{"name":"workflowRunId","in":"path","description":"The ID of the workflow run to delete.\n\nExample: `\"workflow_run_xKm9pNv3qWsY_jL2tR5Dh\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted workflow run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowRun_delete_Response_200"}}}},"404":{"description":"Workflow run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}}}},"/workflow_runs/{workflowRunId}/cancel":{"post":{"operationId":"cancel","summary":"Cancel Workflow Run","description":"Cancel a running workflow run by its ID. This endpoint allows you to stop a workflow run that is currently in progress.\n\nNote: Only workflow runs with a status of `PROCESSING` or `PENDING` can be cancelled. Workflow runs that are completed, failed, in review, rejected, or already cancelled cannot be cancelled.\n","tags":["subpackage_workflowRun"],"parameters":[{"name":"workflowRunId","in":"path","description":"The ID of the workflow run to cancel.\n\nExample: `\"workflow_run_xKm9pNv3qWsY_jL2tR5Dh\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully cancelled workflow run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowRun_cancel_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Workflow run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}}}},"/workflows":{"post":{"operationId":"create","summary":"Create Workflow","description":"Create a new workflow in Extend. Workflows are sequences of steps that process files and data in a specific order to achieve a desired outcome.\n\nThis endpoint will create a new workflow in Extend, which can then be configured and deployed. Typically, workflows are created from our UI, however this endpoint can be used to create workflows programmatically. Configuration of the flow still needs to be done in the dashboard.\n","tags":["subpackage_workflow"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully created workflow","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflow_create_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the workflow"}},"required":["name"]}}}}}},"/workflow_runs/batch":{"post":{"operationId":"create","summary":"Batch Run Workflow","description":"This endpoint allows you to efficiently initiate large batches of workflow runs in a single request (up to 1,000 in a single request, but you can queue up multiple batches in rapid succession). It accepts an array of inputs, each containing a file and metadata pair. The primary use case for this endpoint is for doing large bulk runs of >1000 files at a time that can process over the course of a few hours without needing to manage rate limits that would likely occur using the primary run endpoint.\n\nUnlike the single [Run Workflow](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/run-workflow) endpoint which returns the details of the created workflow runs immediately, this batch endpoint returns a `batchId`.\n\nOur recommended usage pattern is to integrate with [Webhooks](https://docs.extend.ai/2025-04-21/product/webhooks/configuration) for consuming results, using the `metadata` and `batchId` to match up results to the original inputs in your downstream systems. However, you can integrate in a polling mechanism by using a combination of the [List Workflow Runs](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/list-workflow-runs) endpoint to fetch all runs via a batch, and then [Get Workflow Run](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/get-workflow-run) to fetch the full outputs each run.\n\n**Priority:** By default, workflow runs created through this batch endpoint are assigned a priority of 90. You can override this by passing an optional `priority` value (1–100) in the request body — lower values run first.\n\n**Processing and Monitoring:**\nUpon successful submission, the endpoint returns a `batchId`. The individual workflow runs are then queued for processing.\n\n- **Monitoring:** Track the progress and consume results of individual runs using [Webhooks](https://docs.extend.ai/2025-04-21/product/webhooks/configuration). Subscribe to events like `workflow_run.completed`, `workflow_run.failed`, etc. The webhook payload for these events will include the corresponding `batchId` and the `metadata` you provided for each input.\n- **Fetching Results:** You can also use the [List Workflow Runs](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/list-workflow-runs) endpoint and filter using the `batchId` query param.\n","tags":["subpackage_batchWorkflowRun"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully queued batch workflow run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/batchWorkflowRun_create_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string","description":"The ID of the workflow to run. This ID will start with \"workflow_\". This ID can be found viewing the workflow on the Extend platform.\n\nExample: `\"workflow_BMdfq_yWM3sT-ZzvCnA3f\"`\n"},"version":{"type":"string","description":"An optional version of the workflow to use. This can be a specific version number (e.g., `\"1\"`, `\"2\"`) found on the Extend platform, or `\"draft\"` to use the current unpublished draft version. When a version is not supplied, the latest deployed version of the workflow will be used. If no deployed version exists, the draft version will be used."},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRunsBatchPostRequestBodyContentApplicationJsonSchemaInputsItems"},"description":"An array of input objects to be processed by the workflow. Each object represents a single workflow run to be created. The array must contain at least 1 input and at most 1000 inputs.\n"},"priority":{"type":"integer","default":90,"description":"An optional value used to determine the relative order of WorkflowRuns when rate limiting is in effect. Lower values will be prioritized before higher values. Defaults to 90 if not specified."}},"required":["workflowId","inputs"]}}}}}},"/workflow_runs/{workflowRunId}/outputs/{outputId}":{"post":{"operationId":"update","summary":"Correct Workflow Run Outputs","description":"Use this endpoint to submit corrected outputs for a WorkflowRun for future processor evaluation and tuning in Extend.\n\nIf you are using our Human-in-the-loop workflow review, then we already will be collecting your operator submitted corrections. However, if you are receiving data via the API without human review, there could be incorrect outputs that you would like to correct for future usage in evaluation and tuning within the Extend platform. This endpoint allows you to submit corrected outputs for a WorkflowRun, by providing the correct output for a given output ID.\n\nThe output ID, would be found in a given entry within the outputs arrays of a Workflow Run payload. The ID would look something like `dpr_gwkZZNRrPgkjcq0y-***`.\n","tags":["subpackage_workflowRunOutput"],"parameters":[{"name":"workflowRunId","in":"path","required":true,"schema":{"type":"string"}},{"name":"outputId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully corrected workflow run output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/workflowRunOutput_update_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reviewedOutput":{"$ref":"#/components/schemas/ProvidedProcessorOutput","description":"The corrected output of the processor when run against the file.\n\nThis should conform to the output type schema of the given processor.\n\nIf this is an extraction result, you can include all fields, or just the ones that were corrected, our system will handle merges/dedupes. However, if you do include a field, we assume the value included in the final reviewed value.\n"}},"required":["reviewedOutput"]}}}}}},"/files/upload":{"post":{"operationId":"upload","summary":"Upload File","description":"Upload and create a new file in Extend.\n\nThis endpoint accepts file contents and registers them as a File in Extend, which can be used for [running workflows](https://docs.extend.ai/2025-04-21/developers/api-reference/workflow-endpoints/run-workflow), [creating evaluation set items](https://docs.extend.ai/2025-04-21/developers/api-reference/evaluation-set-endpoints/bulk-create-evaluation-set-items), [parsing](https://docs.extend.ai/2025-04-21/developers/api-reference/parse-endpoints/parse-file), etc.\n\nIf an uploaded file is detected as a Word or PowerPoint document, it will be automatically converted to a PDF.\n\nSupported file types can be found [here](https://docs.extend.ai/2025-04-21/product/general/supported-file-types).\n\nThis endpoint requires multipart form encoding. Most HTTP clients will handle this encoding automatically (see the examples).\n","tags":["subpackage_file"],"parameters":[{"name":"convertToPdf","in":"query","description":"When true, converts the uploaded file to PDF. Supported file types include images (JPEG, PNG, TIFF, GIF, BMP, WebP, HEIC/HEIF), Word documents, PowerPoint, Excel, and HTML.","required":false,"schema":{"type":"boolean","default":false}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully uploaded file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/file_upload_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFileRequestBadRequestError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file contents to upload"}},"required":["file"]}}}}}},"/files/{id}":{"get":{"operationId":"get","summary":"Get File","description":"Fetch a file by its ID to obtain additional details and the raw file content.","tags":["subpackage_file"],"parameters":[{"name":"id","in":"path","description":"Extend's ID for the file. It will always start with `\"file_\"`. This ID is returned when creating a new File, or the value on the `fileId` field in a WorkflowRun.\n\nExample: `\"file_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":true,"schema":{"type":"string"}},{"name":"rawText","in":"query","description":"If set to true, the raw text content of the file will be included in the response. This is useful for indexing text-based files like PDFs, Word Documents, etc.\n","required":false,"schema":{"type":"boolean","default":false}},{"name":"markdown","in":"query","description":"If set to true, the markdown content of the file will be included in the response. This is useful for indexing very clean content into RAG pipelines for files like PDFs, Word Documents, etc.\n\nOnly available for files with a type of PDF, IMG, or .doc/.docx files that were auto-converted to PDFs.\n","required":false,"schema":{"type":"boolean","default":false}},{"name":"html","in":"query","description":"If set to true, the html content of the file will be included in the response. This is useful for indexing html content into RAG pipelines.\n\nOnly available for files with a type of DOCX.\n","required":false,"schema":{"type":"boolean","default":false}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/file_get_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete","summary":"Delete File","description":"Delete a file and all associated data from Extend. This operation is permanent and cannot be undone.\n\nThis endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.\n","tags":["subpackage_file"],"parameters":[{"name":"id","in":"path","description":"The ID of the file to delete.\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/file_delete_Response_200"}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}}}},"/files":{"get":{"operationId":"list","summary":"List Files","description":"List files in your account. Files represent documents that have been uploaded to Extend. This endpoint returns a paginated response. You can use the `nextPageToken` to fetch subsequent results.","tags":["subpackage_file"],"parameters":[{"name":"nameContains","in":"query","description":"Filters files to only include those that contain the given string in the name.\n\nExample: `\"invoice\"`\n","required":false,"schema":{"type":"string"}},{"name":"sortDir","in":"query","description":"Sorts the files in ascending or descending order. Ascending order means the earliest file is returned first.","required":false,"schema":{"$ref":"#/components/schemas/SortDirEnum","default":"desc"}},{"name":"nextPageToken","in":"query","required":false,"schema":{"$ref":"#/components/schemas/NextPageToken"}},{"name":"maxPageSize","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MaxPageSize","default":10}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/file_list_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create-file","summary":"Create File","description":"Create a new file in Extend for use in an evaluation set. This endpoint is deprecated, use /files/upload instead.","tags":[""],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully created file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createFile_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the file"},"url":{"type":"string","description":"A pre signed URL for the file"},"rawText":{"type":"string","description":"The raw text content of the file"},"mediaType":{"type":"string","description":"The media type of the file (e.g. application/pdf)"}},"required":["name"]}}}}}},"/edit":{"post":{"operationId":"create","summary":"Edit File","description":"Edit and manipulate PDF documents by detecting and filling form fields.\nThis is a synchronous endpoint that will wait for the edit operation to complete (up to 5 minutes) before returning results. For longer operations, use the [Edit File Async](https://docs.extend.ai/2025-04-21/developers/api-reference/edit-endpoints/edit-file-async) endpoint.\n","tags":["subpackage_edit"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully edited file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditRun"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment Required Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"404":{"description":"Not Found Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/EditPostRequestBodyContentApplicationJsonSchemaFile","description":"A file object containing either a URL or a fileId."},"config":{"$ref":"#/components/schemas/EditPostRequestBodyContentApplicationJsonSchemaConfig","description":"Configuration for the edit operation. Field values should be specified using `extend_edit:value` on each field in the schema."}},"required":["file"]}}}}}},"/edit/async":{"post":{"operationId":"create-async","summary":"Edit File Async","description":"Edit and manipulate PDF documents **asynchronously** by filling forms, adding/modifying text fields, and applying structured changes.\n\nThe Edit Async endpoint allows you to convert and edit documents asynchronously and get an edit run ID that can be used to check status and retrieve results with the [Get Edit Run](https://docs.extend.ai/2025-04-21/developers/api-reference/edit-endpoints/get-edit-run) endpoint.\n\nThis is useful for:\n* Large files that may take longer to process\n* Avoiding timeout issues with synchronous editing\n* Processing multiple files in parallel\n","tags":["subpackage_edit"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully initiated edit run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditRunStatus"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/EditAsyncPostRequestBodyContentApplicationJsonSchemaFile","description":"A file object containing either a URL or a fileId."},"config":{"$ref":"#/components/schemas/EditAsyncPostRequestBodyContentApplicationJsonSchemaConfig","description":"Configuration for the edit operation. Field values should be specified using `extend_edit:value` on each field in the schema."}},"required":["file"]}}}}}},"/edit_schemas/generate":{"post":{"operationId":"generate","summary":"Generate Edit Schema","description":"Detect fields in a PDF form and synchronously return an edit schema payload.\n\nUse this endpoint when you want Extend to bootstrap an `EditRootJSONSchema` from an existing form, optionally mapping an existing schema onto the detected fields.\n\nThis endpoint returns the generated schema directly. There are no schema generation run resources to poll or delete.\n","tags":["subpackage_editSchemas"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully generated edit schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditSchemaGenerationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Payment Required Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"404":{"description":"Not Found Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/EditSchemasGeneratePostRequestBodyContentApplicationJsonSchemaFile","description":"A file object containing either a URL or a fileId."},"config":{"$ref":"#/components/schemas/EditSchemaGenerationConfig"}},"required":["file"]}}}}}},"/edit_runs/{id}":{"get":{"operationId":"get","summary":"Get Edit Run","description":"Retrieve the status and results of an edit run.\n\nUse this endpoint to get results for an edit run that has already completed, or to check on the status of an asynchronous edit run initiated via the [Edit File Asynchronously](https://docs.extend.ai/2025-04-21/developers/api-reference/edit-endpoints/edit-file-async) endpoint.\n\nIf editing is still in progress, you'll receive a response with just the status. Once complete, you'll receive the full edited file information in the response.\n","tags":["subpackage_edit"],"parameters":[{"name":"id","in":"path","description":"The unique identifier for the edit run.\n\nExample: `\"edit_run_xK9mLPqRtN3vS8wF5hB2cQ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved edit run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/edit_get_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete","summary":"Delete Edit Run","description":"Delete an edit run and all associated data from Extend. This operation is permanent and cannot be undone.\n\nThis endpoint can be used if you'd like to manage data retention on your own rather than relying on automated data retention policies, or to make one-off deletions for your downstream customers.\n","tags":["subpackage_edit"],"parameters":[{"name":"id","in":"path","description":"The ID of the edit run to delete.\n\nExample: `\"edit_run_xK9mLPqRtN3vS8wF5hB2cQ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted edit run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/edit_delete_Response_200"}}}},"404":{"description":"Edit run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}}}},"/edit_templates/{id}":{"get":{"operationId":"get-template","summary":"Get Edit Template","description":"Retrieve a saved edit template by ID.\n\nUse this endpoint to inspect the source file, default edit configuration, and optional schema generation configuration saved on an edit template. You can reuse the returned `editTemplate.config` with `POST /edit` or `POST /edit/async`, and reuse `editTemplate.schemaConfig` with `POST /edit_schemas/generate`.\n","tags":["subpackage_edit"],"parameters":[{"name":"id","in":"path","description":"The unique identifier for the edit template.\n\nExample: `\"edt_xK9mLPqRtN3vS8wF5hB2cQ\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved edit template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/edit_getTemplate_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}}}},"/evaluation_sets/{id}":{"get":{"operationId":"get","summary":"Get Evaluation Set","description":"Retrieve a specific evaluation set by ID. This returns an evaluation set object, but does not include the items in the evaluation set. You can use the [List Evaluation Set Items](https://docs.extend.ai/2025-04-21/developers/api-reference/evaluation-set-endpoints/list-evaluation-set-items) endpoint to get the items in an evaluation set.\n","tags":["subpackage_evaluationSet"],"parameters":[{"name":"id","in":"path","description":"The ID of the evaluation set to retrieve.\n\nExample: `\"ev_2LcgeY_mp2T5yPaEuq5Lw\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved evaluation set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/evaluationSet_get_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Evaluation set not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/evaluation_sets":{"get":{"operationId":"list","summary":"List Evaluation Sets","description":"List evaluation sets in your account. You can use the `processorId` parameter to filter evaluation sets by processor. \n\nThis endpoint returns a paginated response. You can use the `nextPageToken` to fetch subsequent results.\n","tags":["subpackage_evaluationSet"],"parameters":[{"name":"processorId","in":"query","description":"The ID of the processor to filter evaluation sets by.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n","required":false,"schema":{"type":"string"}},{"name":"sortBy","in":"query","description":"Sorts the evaluation sets by the given field.","required":false,"schema":{"$ref":"#/components/schemas/SortByEnum","default":"updatedAt"}},{"name":"sortDir","in":"query","description":"Sorts the evaluation sets in ascending or descending order. Ascending order means the earliest evaluation set is returned first.","required":false,"schema":{"$ref":"#/components/schemas/SortDirEnum","default":"desc"}},{"name":"nextPageToken","in":"query","required":false,"schema":{"$ref":"#/components/schemas/NextPageToken"}},{"name":"maxPageSize","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MaxPageSize","default":10}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved evaluation sets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/evaluationSet_list_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create","summary":"Create Evaluation Set","description":"Evaluation sets are collections of files and expected outputs that are used to evaluate the performance of a given processor in Extend. This endpoint will create a new evaluation set in Extend, which items can be added to using the [Create Evaluation Set Item](https://docs.extend.ai/2025-04-21/developers/api-reference/evaluation-set-endpoints/create-evaluation-set-item) endpoint.\n\nNote: it is not necessary to create an evaluation set via API. You can also create an evaluation set via the Extend dashboard and take the ID from there.\n","tags":["subpackage_evaluationSet"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully created evaluation set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/evaluationSet_create_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the evaluation set.\n\nExample: `\"Invoice Processing Test Set\"`\n"},"description":{"type":"string","description":"A description of what this evaluation set is used for.\n\nExample: `\"Q4 2023 vendor invoices\"`\n"},"processorId":{"type":"string","description":"The ID of the processor to create an evaluation set for. Evaluation sets can in theory be run against any processor, but it is required to associate the evaluation set with a primary processor.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"}},"required":["name","description","processorId"]}}}}}},"/evaluation_sets/{id}/items":{"get":{"operationId":"list","summary":"List Evaluation Set Items","description":"List all items in a specific evaluation set. Evaluation set items are the individual files and expected outputs that are used to evaluate the performance of a given processor in Extend. \n\nThis endpoint returns a paginated response. You can use the `nextPageToken` to fetch subsequent results.\n","tags":["subpackage_evaluationSetItem"],"parameters":[{"name":"id","in":"path","description":"The ID of the evaluation set to retrieve items for.\n\nExample: `\"ev_2LcgeY_mp2T5yPaEuq5Lw\"`\n","required":true,"schema":{"type":"string"}},{"name":"sortBy","in":"query","description":"Sorts the evaluation set items by the given field.","required":false,"schema":{"$ref":"#/components/schemas/SortByEnum","default":"updatedAt"}},{"name":"sortDir","in":"query","description":"Sorts the evaluation set items in ascending or descending order. Ascending order means the earliest evaluation set is returned first.","required":false,"schema":{"$ref":"#/components/schemas/SortDirEnum","default":"desc"}},{"name":"nextPageToken","in":"query","required":false,"schema":{"$ref":"#/components/schemas/NextPageToken"}},{"name":"maxPageSize","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MaxPageSize","default":10}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved evaluation set items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/evaluationSetItem_list_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Evaluation set not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/evaluation_set_items":{"post":{"operationId":"create","summary":"Create Evaluation Set Item","description":"Evaluation set items are the individual files and expected outputs that are used to evaluate the performance of a given processor in Extend. This endpoint will create a new evaluation set item in Extend, which will be used during an evaluation run.\n\nBest Practices for Outputs in Evaluation Sets:\n- **Configure First, Output Later**\n  - Always create and finalize your processor configuration before creating evaluation sets\n  - Field IDs in outputs must match those defined in your processor configuration\n- **Type Consistency**\n  - Ensure output types exactly match your processor configuration\n  - For example, if a field is configured as \"currency\", don't submit a simple number value\n- **Field IDs**\n  - Use the exact field IDs from your processor configuration\n  - Create your own semantic IDs instead in the configs for each field/type instead of using the generated ones\n- **Value**\n  - Remember that all results are inside the value key of a result object, except the values within nested structures.\n","tags":["subpackage_evaluationSetItem"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully created evaluation set item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/evaluationSetItem_create_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"evaluationSetId":{"type":"string","description":"The ID of the evaluation set to add the item to.\n\nExample: `\"ev_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"fileId":{"type":"string","description":"Extend's internal ID for the file. It will always start with \"file_\".\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"expectedOutput":{"$ref":"#/components/schemas/ProvidedProcessorOutput","description":"The expected output that will be used to evaluate the processor's performance."}},"required":["evaluationSetId","fileId","expectedOutput"]}}}}}},"/evaluation_set_items/{id}":{"post":{"operationId":"update","summary":"Update Evaluation Set Item","description":"If you need to change the expected output for a given evaluation set item, you can use this endpoint to update the item. This can be useful if you need to correct an error in the expected output or if the output of the processor has changed.\n","tags":["subpackage_evaluationSetItem"],"parameters":[{"name":"id","in":"path","description":"The ID of the evaluation set item to update.\n\nExample: `\"evi_kR9mNP12Qw4yTv8BdR3H\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully updated evaluation set item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/evaluationSetItem_update_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedOutput":{"$ref":"#/components/schemas/ProvidedProcessorOutput","description":"The expected output of the processor when run against the file"}},"required":["expectedOutput"]}}}}},"delete":{"operationId":"delete","summary":"Delete Evaluation Set Item","description":"Delete an evaluation set item from an evaluation set. This operation is permanent and cannot be undone.\n\nThis endpoint can be used to remove individual items from an evaluation set when they are no longer needed or if they were added in error.\n","tags":["subpackage_evaluationSetItem"],"parameters":[{"name":"id","in":"path","description":"The ID of the evaluation set item to delete.\n\nExample: `\"evi_kR9mNP12Qw4yTv8BdR3H\"`\n","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}},{"name":"x-extend-workspace-id","in":"header","description":"The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted evaluation set item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/evaluationSetItem_delete_Response_200"}}}},"404":{"description":"Evaluation set item not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendError"}}}}}}},"/evaluation_set_items/bulk":{"post":{"operationId":"create-batch","summary":"Bulk Create Evaluation Set Items","description":"If you have a large number of files that you need to add to an evaluation set, you can use this endpoint to create multiple evaluation set items at once. This can be useful if you have a large dataset that you need to evaluate the performance of a processor against.\n\nNote: you still need to create each File first using the file API.\n","tags":["subpackage_evaluationSetItem"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-extend-api-version","in":"header","description":"API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.","required":false,"schema":{"type":"string","enum":["2025-04-21"],"default":"2025-04-21"}}],"responses":{"200":{"description":"Successfully created evaluation set items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/evaluationSetItem_createBatch_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"evaluationSetId":{"type":"string","description":"The ID of the evaluation set to add the items to.\n\nExample: `\"ev_2LcgeY_mp2T5yPaEuq5Lw\"`\n"},"items":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSetItemsBulkPostRequestBodyContentApplicationJsonSchemaItemsItems"},"description":"An array of objects representing the evaluation set items to create"}},"required":["evaluationSetId","items"]}}}}}}},"servers":[{"url":"https://api.extend.ai","description":"production"}],"components":{"schemas":{"ProcessorId":{"type":"string","description":"The ID of the processor to be run.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n","title":"ProcessorId"},"ProcessorRunFileInput":{"type":"object","properties":{"fileName":{"type":"string","description":"The name of the file to be processed. If not provided, the file name will be inferred from the URL. It is highly recommended to include this parameter for legibility."},"fileUrl":{"type":"string","description":"A URL where the file can be downloaded from. If you use presigned URLs, we recommend an expiration time of 5-15 minutes. One of a `fileUrl` or `fileId` must be provided."},"fileId":{"type":"string","description":"Extend's internal ID for the file. It will always start with `file_`. One of a `fileUrl` or `fileId` must be provided. You can view a file ID from the Extend UI, for instance from running a parser or from a previous file creation. If you provide a `fileId`, any parsed data will be reused.\n"}},"description":"Input file for running a single processor.","title":"ProcessorRunFileInput"},"JsonObject":{"type":"object","additionalProperties":{"description":"Any type"},"description":"A flexible object that can hold any arbitrary JSON key-value structure.","title":"JsonObject"},"ClassificationConfigType":{"type":"string","enum":["CLASSIFY"],"description":"The type of configuration. Must be `\"CLASSIFY\"` for classification processors.","title":"ClassificationConfigType"},"ClassificationConfigBaseProcessor":{"type":"string","enum":["classification_performance","classification_light"],"default":"classification_performance","description":"The base processor to use. For classifiers, this must be either `\"classification_performance\"` or `\"classification_light\"`. See [Classification Changelog](https://docs.extend.ai/2025-04-21/changelog/classification/classification-performance) for more details.\n","title":"ClassificationConfigBaseProcessor"},"Classification":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the classification. We recommend lowercase, underscore-separated format."},"type":{"type":"string","description":"Type identifier for the classification."},"description":{"type":"string","description":"A detailed description of the classification."}},"required":["id","type","description"],"title":"Classification"},"ClassificationAdvancedOptionsContext":{"type":"string","enum":["default","max"],"default":"default","description":"The context to use for classification.","title":"ClassificationAdvancedOptionsContext"},"PageRangesItems":{"type":"object","properties":{"start":{"type":"integer","description":"The start page of the range."},"end":{"type":"integer","default":750,"description":"The end page of the range."}},"title":"PageRangesItems"},"PageRanges":{"type":"array","items":{"$ref":"#/components/schemas/PageRangesItems"},"description":"Limit processing to the specified page ranges. See [Page Ranges](https://docs.extend.ai/2025-04-21/product/page-ranges).","title":"PageRanges"},"ClassificationAdvancedOptions":{"type":"object","properties":{"context":{"$ref":"#/components/schemas/ClassificationAdvancedOptionsContext","default":"default","description":"The context to use for classification."},"advancedMultimodalEnabled":{"type":"boolean","default":false,"description":"Enable advanced multimodal processing for better handling of visual elements during classification."},"fixedPageLimit":{"type":"integer","description":"Limit processing to a specific number of pages from the beginning of the document. See [Page Ranges](https://docs.extend.ai/2025-04-21/product/page-ranges)."},"pageRanges":{"$ref":"#/components/schemas/PageRanges"}},"title":"ClassificationAdvancedOptions"},"ParseConfigTarget":{"type":"string","enum":["markdown","spatial"],"default":"markdown","description":"The target format for the parsed content.\n\nSupported values:\n\n* `markdown`: True markdown with logical reading order (headings, lists, tables, checkboxes). Best default for LLMs/RAG and enables section-based chunking.\n* `spatial`: Layout/position-preserving text that uses markdown elements for block types but is not strictly markdown due to whitespace/tabs used to maintain placement. Only page-based chunking is supported.\n\nGuidance:\n\n* Prefer `markdown` for most documents, multi-column reading order, and retrieval use cases\n* Prefer `spatial` for messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs\n\nSee “Markdown vs Spatial” in the Parse guide for details: /2025-04-21/developers/guides/parse#markdown-vs-spatial\n","title":"ParseConfigTarget"},"ParseConfigChunkingStrategyType":{"type":"string","enum":["page","document","section"],"default":"page","description":"The type of chunking strategy. Supported values:\n\n* `page`: Chunk document by pages.\n* `document`: Entire document is a single chunk. Essentially no chunking.\n* `section`: Split by logical sections. Not supported for target=spatial.\n","title":"ParseConfigChunkingStrategyType"},"ParseConfigChunkingStrategyOptions":{"type":"object","properties":{"minCharacters":{"type":"integer","description":"Specify a minimum number of characters per chunk."},"maxCharacters":{"type":"integer","description":"Specify a maximum number of characters per chunk."}},"description":"Additional options for the chunking strategy.","title":"ParseConfigChunkingStrategyOptions"},"ParseConfigChunkingStrategy":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ParseConfigChunkingStrategyType","default":"page","description":"The type of chunking strategy. Supported values:\n\n* `page`: Chunk document by pages.\n* `document`: Entire document is a single chunk. Essentially no chunking.\n* `section`: Split by logical sections. Not supported for target=spatial.\n"},"options":{"$ref":"#/components/schemas/ParseConfigChunkingStrategyOptions","description":"Additional options for the chunking strategy."}},"description":"Strategy for dividing the document into chunks.","title":"ParseConfigChunkingStrategy"},"ParseConfigEngine":{"type":"string","enum":["parse_performance","parse_light"],"default":"parse_performance","description":"The parsing engine to use. Supported values:\n* `parse_performance`: Full-featured parsing engine with highest accuracy (default)\n* `parse_light`: Lightweight parsing engine optimized for high-volume, cost-sensitive ingestion. Uses the new layout model with full layout support and the markdown target at lower cost and latency, but performs worse than `parse_performance` on lower-quality scans, harder handwriting, larger tables, non-Latin-based languages, and dense checkbox regions.\n","title":"ParseConfigEngine"},"ParseConfigBlockOptionsFigures":{"type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Whether to include figures in the output."},"figureImageClippingEnabled":{"type":"boolean","default":true,"description":"Whether to clip and extract images from figures."}},"description":"Options for figure blocks.","title":"ParseConfigBlockOptionsFigures"},"ParseConfigBlockOptionsTablesTargetFormat":{"type":"string","enum":["markdown","html"],"default":"markdown","description":"The target format for the table blocks. Supported values:\n* `markdown`: Convert table to Markdown format\n* `html`: Convert table to HTML format\n","title":"ParseConfigBlockOptionsTablesTargetFormat"},"ParseConfigBlockOptionsTablesAgentic":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable agentic table processing."},"customInstructions":{"type":"string","description":"Custom instructions to guide the agentic table processing."}},"description":"Options for agentic table processing using VLM-based review and correction.","title":"ParseConfigBlockOptionsTablesAgentic"},"ParseConfigBlockOptionsTables":{"type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"This option is deprecated and will have no effect. It will be removed in the next API version."},"targetFormat":{"$ref":"#/components/schemas/ParseConfigBlockOptionsTablesTargetFormat","default":"markdown","description":"The target format for the table blocks. Supported values:\n* `markdown`: Convert table to Markdown format\n* `html`: Convert table to HTML format\n"},"tableHeaderContinuationEnabled":{"type":"boolean","default":false,"description":"Whether to automatically copy table headers to headerless tables on subsequent pages when they have matching column counts. Useful for multi-page tables."},"cellBlocksEnabled":{"type":"boolean","default":false,"description":"Whether to include individual table cell blocks in the output. When enabled, each cell in a table will be represented as a separate block with its own bounding box and content and will be `children` of the table block."},"agentic":{"$ref":"#/components/schemas/ParseConfigBlockOptionsTablesAgentic","description":"Options for agentic table processing using VLM-based review and correction."}},"description":"Options for table blocks.","title":"ParseConfigBlockOptionsTables"},"ParseConfigBlockOptionsTextAgentic":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Whether to enable agentic text processing for OCR corrections."},"customInstructions":{"type":"string","description":"Custom instructions to guide the agentic text processing."}},"description":"Options for agentic text processing using VLM-based review and correction.","title":"ParseConfigBlockOptionsTextAgentic"},"ParseConfigBlockOptionsText":{"type":"object","properties":{"signatureDetectionEnabled":{"type":"boolean","default":true,"description":"Whether an additional vision model will be utilized for advanced signature detection. Recommended for most use cases, but should be disabled if signature detection is not necessary and latency is a concern."},"agentic":{"$ref":"#/components/schemas/ParseConfigBlockOptionsTextAgentic","description":"Options for agentic text processing using VLM-based review and correction."}},"description":"Options for text blocks.","title":"ParseConfigBlockOptionsText"},"ParseConfigBlockOptions":{"type":"object","properties":{"figures":{"$ref":"#/components/schemas/ParseConfigBlockOptionsFigures","description":"Options for figure blocks."},"tables":{"$ref":"#/components/schemas/ParseConfigBlockOptionsTables","description":"Options for table blocks."},"text":{"$ref":"#/components/schemas/ParseConfigBlockOptionsText","description":"Options for text blocks."}},"description":"Options for controlling how different block types are processed.","title":"ParseConfigBlockOptions"},"ParseConfigAdvancedOptionsExcelParsingMode":{"type":"string","enum":["basic","advanced"],"description":"Controls how Excel files are parsed.\n\n* `basic`: Fast, deterministic parsing.\n* `advanced`: Enable layout block detection for complex spreadsheets.\n\nFor `.xls` files, `basic` mode is always used.\n","title":"ParseConfigAdvancedOptionsExcelParsingMode"},"ParseConfigAdvancedOptionsReturnOcr":{"type":"object","properties":{"words":{"type":"boolean","default":false,"description":"Whether to include word-level OCR data in the response, including word bounding boxes and confidence scores. This meaningfully impacts the response size, consider using the signed url return format."}},"description":"Options for returning raw OCR data in the response.","title":"ParseConfigAdvancedOptionsReturnOcr"},"ParseConfigAdvancedOptions":{"type":"object","properties":{"pageRotationEnabled":{"type":"boolean","default":true,"description":"Whether to automatically detect and correct page rotation."},"agenticOcrEnabled":{"type":"boolean","default":false,"description":"Whether to enable agentic OCR corrections using VLM-based review and correction of OCR errors for messy handwriting and poorly scanned text. Deprecated - use `blockOptions.text.agentic` or `blockOptions.tables.agentic` instead for more granular control."},"pageRanges":{"$ref":"#/components/schemas/PageRanges"},"excelParsingMode":{"$ref":"#/components/schemas/ParseConfigAdvancedOptionsExcelParsingMode","description":"Controls how Excel files are parsed.\n\n* `basic`: Fast, deterministic parsing.\n* `advanced`: Enable layout block detection for complex spreadsheets.\n\nFor `.xls` files, `basic` mode is always used.\n"},"excelSkipHiddenContent":{"type":"boolean","default":false,"description":"Whether to exclude hidden rows, columns, and sheets when parsing Excel files."},"excelUseRawCellValues":{"type":"boolean","default":false,"description":"Whether to return raw calculated cell values instead of locale-formatted values when parsing Excel files. Useful when downstream processing needs the underlying numeric or unformatted data."},"excelSkipCalculation":{"type":"boolean","default":true,"description":"Whether to skip formula recalculation when opening Excel workbooks. Significantly improves parsing speed for formula-heavy spreadsheets. Disable if cell values depend on volatile functions like NOW() or TODAY()."},"verticalGroupingThreshold":{"type":"number","format":"double","default":1,"description":"Multiplier for the Y-axis threshold used to determine if text blocks should be placed on the same line or not (0.1-5.0, default 1.0). Higher values group elements that are further apart vertically. Only applies when the spatial target is set."},"returnOcr":{"$ref":"#/components/schemas/ParseConfigAdvancedOptionsReturnOcr","description":"Options for returning raw OCR data in the response."},"alwaysConvertToPdf":{"type":"boolean","default":false,"description":"Whether to convert supported file types (images, Word documents, PowerPoint, Excel, HTML) to PDF before parsing. This can improve parsing quality for some file types and ensures spatial output with bounding boxes."}},"title":"ParseConfigAdvancedOptions"},"ParseConfig":{"type":"object","properties":{"target":{"$ref":"#/components/schemas/ParseConfigTarget","default":"markdown","description":"The target format for the parsed content.\n\nSupported values:\n\n* `markdown`: True markdown with logical reading order (headings, lists, tables, checkboxes). Best default for LLMs/RAG and enables section-based chunking.\n* `spatial`: Layout/position-preserving text that uses markdown elements for block types but is not strictly markdown due to whitespace/tabs used to maintain placement. Only page-based chunking is supported.\n\nGuidance:\n\n* Prefer `markdown` for most documents, multi-column reading order, and retrieval use cases\n* Prefer `spatial` for messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs\n\nSee “Markdown vs Spatial” in the Parse guide for details: /2025-04-21/developers/guides/parse#markdown-vs-spatial\n"},"chunkingStrategy":{"$ref":"#/components/schemas/ParseConfigChunkingStrategy","description":"Strategy for dividing the document into chunks."},"engine":{"$ref":"#/components/schemas/ParseConfigEngine","default":"parse_performance","description":"The parsing engine to use. Supported values:\n* `parse_performance`: Full-featured parsing engine with highest accuracy (default)\n* `parse_light`: Lightweight parsing engine optimized for high-volume, cost-sensitive ingestion. Uses the new layout model with full layout support and the markdown target at lower cost and latency, but performs worse than `parse_performance` on lower-quality scans, harder handwriting, larger tables, non-Latin-based languages, and dense checkbox regions.\n"},"blockOptions":{"$ref":"#/components/schemas/ParseConfigBlockOptions","description":"Options for controlling how different block types are processed."},"advancedOptions":{"$ref":"#/components/schemas/ParseConfigAdvancedOptions"}},"description":"Configuration options for the parsing process.","title":"ParseConfig"},"ClassificationConfig":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ClassificationConfigType","description":"The type of configuration. Must be `\"CLASSIFY\"` for classification processors."},"baseProcessor":{"$ref":"#/components/schemas/ClassificationConfigBaseProcessor","default":"classification_performance","description":"The base processor to use. For classifiers, this must be either `\"classification_performance\"` or `\"classification_light\"`. See [Classification Changelog](https://docs.extend.ai/2025-04-21/changelog/classification/classification-performance) for more details.\n"},"baseVersion":{"type":"string","description":"The version of the `\"classification_performance\"` or `\"classification_light\"` processor to use. If this is provided, the `baseProcessor` must also be provided. See [Classification Changelog](https://docs.extend.ai/2025-04-21/changelog/classification/classification-performance) for more details."},"classifications":{"type":"array","items":{"$ref":"#/components/schemas/Classification"},"description":"Array of possible classifications for the document."},"classificationRules":{"type":"string","description":"Custom rules to guide the classification process in natural language."},"advancedOptions":{"$ref":"#/components/schemas/ClassificationAdvancedOptions","description":"Advanced configuration options."},"parser":{"$ref":"#/components/schemas/ParseConfig","description":"Configuration options for the parsing process."}},"required":["type","classifications"],"title":"ClassificationConfig"},"ExtractionConfigType":{"type":"string","enum":["EXTRACT"],"description":"The type of configuration. Must be \"EXTRACT\" for extraction processors.","title":"ExtractionConfigType"},"ExtractionConfigBaseProcessor":{"type":"string","enum":["extraction_performance","extraction_light"],"default":"extraction_performance","description":"The base processor to use. For extractors, this must be either `\"extraction_performance\"` or `\"extraction_light\"`. See [Extraction Changelog](https://docs.extend.ai/2025-04-21/changelog/extraction/extraction-performance) for more details.\n","title":"ExtractionConfigBaseProcessor"},"ExtractionFieldType":{"type":"string","enum":["string","number","currency","boolean","date","array","enum","object","signature"],"description":"The type of the field.","title":"ExtractionFieldType"},"Enum":{"type":"object","properties":{"value":{"type":"string","description":"The value of the enum option."},"description":{"type":"string","description":"Description of what this enum value represents."}},"required":["value","description"],"title":"Enum"},"ExtractionField":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the field."},"name":{"type":"string","description":"Human-readable name for the field."},"type":{"$ref":"#/components/schemas/ExtractionFieldType","description":"The type of the field."},"description":{"type":"string","description":"Detailed description of the field, including expected content and format."},"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionField"},"description":"Required when type is \"array\" or \"object\". Contains nested field definitions."},"enum":{"type":"array","items":{"$ref":"#/components/schemas/Enum"},"description":"Required when type is \"enum\". List of allowed values."}},"required":["id","name","type","description"],"title":"ExtractionField"},"ExtractionAdvancedOptionsArrayCitationStrategy":{"type":"string","enum":["item","property"],"description":"Granularity for array citations. This requires citationsEnabled=true and a base processor version that supports property-level array citations (extraction_performance ≥ 4.4.0).","title":"ExtractionAdvancedOptionsArrayCitationStrategy"},"ExtractionAdvancedOptionsReviewAgent":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether to enable the review agent for the extraction output."}},"description":"Configuration for the review agent that analyzes extraction results.\nWhen enabled, each field in the output metadata will include a `reviewAgentScore` (1-5)\nand may include additional `insights` of type `issue` or `review_summary` to help identify\nfields that may need manual review.\n\nTo learn more, view the [Review Agent Documentation](https://docs.extend.ai/product/extraction/review-agent)\n","title":"ExtractionAdvancedOptionsReviewAgent"},"ArrayStrategyType":{"type":"string","enum":["large_array_heuristics","large_array_max_context","large_array_overlap_context"],"description":"The strategy type for handling large array use cases. For most use cases this should be left null, or should be set to `large_array_heuristics`. If you're unsure of what your use case needs, reach out to the Extend team for help.\n- `large_array_heuristics`: Optimized for documents with very large arrays, but where latency matters. \n\n  This strategy uses specialized heuristics around chunking, tables, and merging to handle large arrays efficiently over large documents.\n\n- `large_array_max_context`: Optimizes for accuracy over latency in documents with very large arrays. \n\n  This strategy will do multiple passes through the entire document to ensure there is no context loss across any chunks/pages, maximizing accuracy for complex array extraction, but adding material latency.\n\n- `large_array_overlap_context`: Balances accuracy and latency in documents with very large arrays. \n\n  This strategy will always maintain surrounding/overlapping page context for every chunk/page that is extracted, eliminating array failure modes from context loss across page boundaries.\n","title":"ArrayStrategyType"},"ArrayStrategy":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ArrayStrategyType","description":"The strategy type for handling large array use cases. For most use cases this should be left null, or should be set to `large_array_heuristics`. If you're unsure of what your use case needs, reach out to the Extend team for help.\n- `large_array_heuristics`: Optimized for documents with very large arrays, but where latency matters. \n\n  This strategy uses specialized heuristics around chunking, tables, and merging to handle large arrays efficiently over large documents.\n\n- `large_array_max_context`: Optimizes for accuracy over latency in documents with very large arrays. \n\n  This strategy will do multiple passes through the entire document to ensure there is no context loss across any chunks/pages, maximizing accuracy for complex array extraction, but adding material latency.\n\n- `large_array_overlap_context`: Balances accuracy and latency in documents with very large arrays. \n\n  This strategy will always maintain surrounding/overlapping page context for every chunk/page that is extracted, eliminating array failure modes from context loss across page boundaries.\n"}},"required":["type"],"title":"ArrayStrategy"},"ExtractChunkingOptionsChunkingStrategy":{"type":"string","enum":["standard","semantic"],"description":"The strategy to use for chunking the document.","title":"ExtractChunkingOptionsChunkingStrategy"},"ExtractChunkingOptionsChunkSelectionStrategy":{"type":"string","enum":["intelligent","confidence","take_first","take_last"],"description":"The strategy to use for selecting chunks.","title":"ExtractChunkingOptionsChunkSelectionStrategy"},"ExtractChunkingOptions":{"type":"object","properties":{"chunkingStrategy":{"$ref":"#/components/schemas/ExtractChunkingOptionsChunkingStrategy","description":"The strategy to use for chunking the document."},"pageChunkSize":{"type":"integer","description":"The size of page chunks."},"chunkSelectionStrategy":{"$ref":"#/components/schemas/ExtractChunkingOptionsChunkSelectionStrategy","description":"The strategy to use for selecting chunks."},"customSemanticChunkingRules":{"type":"string","description":"Custom rules for semantic chunking."}},"title":"ExtractChunkingOptions"},"ExcelSheetRange":{"type":"object","properties":{"start":{"type":"integer","description":"The starting sheet index (0-based)."},"end":{"type":"integer","description":"The ending sheet index (0-based). Must be greater than or equal to start."}},"required":["start","end"],"title":"ExcelSheetRange"},"ExtractionAdvancedOptionsExcelSheetSelectionStrategy":{"type":"string","enum":["intelligent","all","first","last"],"description":"Strategy for selecting sheets from Excel documents.","title":"ExtractionAdvancedOptionsExcelSheetSelectionStrategy"},"ExtractionAdvancedOptions":{"type":"object","properties":{"documentKind":{"type":"string","description":"DEPRECATED - use extractionRules for all system prompts."},"keyDefinitions":{"type":"string","description":"DEPRECATED - use extractionRules for all system prompts."},"modelReasoningInsightsEnabled":{"type":"boolean","description":"Whether to enable model reasoning insights."},"advancedMultimodalEnabled":{"type":"boolean","description":"Whether to enable advanced multimodal features."},"citationsEnabled":{"type":"boolean","description":"Whether to enable citations in the output."},"arrayCitationStrategy":{"$ref":"#/components/schemas/ExtractionAdvancedOptionsArrayCitationStrategy","description":"Granularity for array citations. This requires citationsEnabled=true and a base processor version that supports property-level array citations (extraction_performance ≥ 4.4.0)."},"advancedFigureParsingEnabled":{"type":"boolean","description":"Whether to enable advanced figure parsing."},"reviewAgent":{"$ref":"#/components/schemas/ExtractionAdvancedOptionsReviewAgent","description":"Configuration for the review agent that analyzes extraction results.\nWhen enabled, each field in the output metadata will include a `reviewAgentScore` (1-5)\nand may include additional `insights` of type `issue` or `review_summary` to help identify\nfields that may need manual review.\n\nTo learn more, view the [Review Agent Documentation](https://docs.extend.ai/product/extraction/review-agent)\n"},"arrayStrategy":{"$ref":"#/components/schemas/ArrayStrategy","description":"Strategy for handling large arrays in documents."},"chunkingOptions":{"$ref":"#/components/schemas/ExtractChunkingOptions"},"excelSheetRanges":{"type":"array","items":{"$ref":"#/components/schemas/ExcelSheetRange"},"description":"Ranges of sheet indices to extract from Excel documents."},"excelSheetSelectionStrategy":{"$ref":"#/components/schemas/ExtractionAdvancedOptionsExcelSheetSelectionStrategy","description":"Strategy for selecting sheets from Excel documents."},"fixedPageLimit":{"type":"integer","description":"DEPRECATED - See [Page Ranges](https://docs.extend.ai/2025-04-21/product/page-ranges)."},"pageRanges":{"$ref":"#/components/schemas/PageRanges"}},"title":"ExtractionAdvancedOptions"},"ExtractionConfig":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ExtractionConfigType","description":"The type of configuration. Must be \"EXTRACT\" for extraction processors."},"baseProcessor":{"$ref":"#/components/schemas/ExtractionConfigBaseProcessor","default":"extraction_performance","description":"The base processor to use. For extractors, this must be either `\"extraction_performance\"` or `\"extraction_light\"`. See [Extraction Changelog](https://docs.extend.ai/2025-04-21/changelog/extraction/extraction-performance) for more details.\n"},"baseVersion":{"type":"string","description":"The version of the `\"extraction_performance\"` or `\"extraction_light\"` processor to use. If this is provided, the `baseProcessor` must also be provided. See [Extraction Changelog](https://docs.extend.ai/2025-04-21/changelog/extraction/extraction-performance) for more details."},"extractionRules":{"type":"string","description":"Custom rules to guide the extraction process in natural language."},"schema":{"$ref":"#/components/schemas/JsonObject","description":"JSON Schema definition of the data to extract. Either `fields` or `schema` must be provided.\n\nSee the [JSON Schema guide](https://docs.extend.ai/2025-04-21/product/extraction/schema) for details and examples of schema configuration.\n"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionField"},"description":"Array of fields to extract from the document. Either `fields` or `schema` must be provided.\n\nWe recommend using `schema` for new implementations.\n"},"advancedOptions":{"$ref":"#/components/schemas/ExtractionAdvancedOptions","description":"Advanced configuration options."},"parser":{"$ref":"#/components/schemas/ParseConfig","description":"Configuration options for the parsing process."}},"required":["type"],"title":"ExtractionConfig"},"SplitterConfigType":{"type":"string","enum":["SPLITTER"],"description":"The type of configuration. Must be \"SPLITTER\" for splitter processors.","title":"SplitterConfigType"},"SplitterConfigBaseProcessor":{"type":"string","enum":["splitting_performance","splitting_light"],"default":"splitting_performance","description":"The base processor to use. For splitters, this can currently only be `\"splitting_performance\"` or `\"splitting_light\"`. See [Splitting Changelog](https://docs.extend.ai/2025-04-21/changelog/splitting/splitting-performance) for more details.\n","title":"SplitterConfigBaseProcessor"},"SplitterAdvancedOptionsSplitMethod":{"type":"string","enum":["high_precision","low_latency"],"default":"high_precision","description":"The method to use for splitting documents. `high_precision` is more accurate but slower, while `low_latency` is faster but less precise.","title":"SplitterAdvancedOptionsSplitMethod"},"SplitterAdvancedOptions":{"type":"object","properties":{"splitIdentifierRules":{"type":"string","description":"Custom rules for identifying split points."},"splitMethod":{"$ref":"#/components/schemas/SplitterAdvancedOptionsSplitMethod","default":"high_precision","description":"The method to use for splitting documents. `high_precision` is more accurate but slower, while `low_latency` is faster but less precise."},"splitExcelDocumentsBySheetEnabled":{"type":"boolean","default":false,"description":"For Excel documents, split by worksheet."},"fixedPageLimit":{"type":"integer","description":"Limit processing to a specific number of pages from the beginning of the document. See [Page Ranges](https://docs.extend.ai/2025-04-21/product/page-ranges)."},"pageRanges":{"$ref":"#/components/schemas/PageRanges"}},"title":"SplitterAdvancedOptions"},"SplitterConfig":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/SplitterConfigType","description":"The type of configuration. Must be \"SPLITTER\" for splitter processors."},"baseProcessor":{"$ref":"#/components/schemas/SplitterConfigBaseProcessor","default":"splitting_performance","description":"The base processor to use. For splitters, this can currently only be `\"splitting_performance\"` or `\"splitting_light\"`. See [Splitting Changelog](https://docs.extend.ai/2025-04-21/changelog/splitting/splitting-performance) for more details.\n"},"baseVersion":{"type":"string","description":"The version of the `\"splitting_performance\"` or `\"splitting_light\"` processor to use. If this is provided, the `baseProcessor` must also be provided. See [Splitting Changelog](https://docs.extend.ai/2025-04-21/changelog/splitting/splitting-performance) for more details."},"splitClassifications":{"type":"array","items":{"$ref":"#/components/schemas/Classification"},"description":"Array of classifications that define the possible types of document sections."},"splitRules":{"type":"string","description":"Custom rules to guide the document splitting process in natural language."},"advancedOptions":{"$ref":"#/components/schemas/SplitterAdvancedOptions","description":"Advanced configuration options."},"parser":{"$ref":"#/components/schemas/ParseConfig","description":"Configuration options for the parsing process."}},"required":["type","splitClassifications"],"title":"SplitterConfig"},"ProcessorRunsPostRequestBodyContentApplicationJsonSchemaConfig":{"oneOf":[{"$ref":"#/components/schemas/ClassificationConfig"},{"$ref":"#/components/schemas/ExtractionConfig"},{"$ref":"#/components/schemas/SplitterConfig"}],"description":"The configuration for the processor run. If this is provided, this config will be used. If not provided, the config for the specific version you provide will be used. The type of configuration must match the processor type.","title":"ProcessorRunsPostRequestBodyContentApplicationJsonSchemaConfig"},"ProcessorStatus":{"type":"string","enum":["PENDING","PROCESSING","PROCESSED","FAILED","CANCELLED"],"description":"The status of a processor run:\n* `\"PENDING\"` - The processor run has not started yet\n* `\"PROCESSING\"` - The processor run is in progress\n* `\"PROCESSED\"` - The processor run completed successfully\n* `\"FAILED\"` - The processor run failed\n* `\"CANCELLED\"` - The processor run was cancelled\n","title":"ProcessorStatus"},"JsonOutputMetadataCitationsItemsPolygonItems":{"type":"object","properties":{"x":{"type":"number","format":"double","description":"X coordinate of the point"},"y":{"type":"number","format":"double","description":"Y coordinate of the point"}},"required":["x","y"],"title":"JsonOutputMetadataCitationsItemsPolygonItems"},"JsonOutputMetadataCitationsItems":{"type":"object","properties":{"page":{"type":"number","format":"double","description":"Page number where the citation was found"},"referenceText":{"type":["string","null"],"description":"The text that was referenced"},"polygon":{"type":"array","items":{"$ref":"#/components/schemas/JsonOutputMetadataCitationsItemsPolygonItems"},"description":"Array of points defining the polygon around the referenced text"},"pageWidth":{"type":"number","format":"double","description":"Width of the page in points"},"pageHeight":{"type":"number","format":"double","description":"Height of the page in points"}},"title":"JsonOutputMetadataCitationsItems"},"InsightType":{"type":"string","enum":["reasoning","issue","review_summary"],"description":"The type of insight:\n- `reasoning`: Model reasoning about the extraction decision\n- `issue`: A potential problem or concern identified by the agentic confidence system\n- `review_summary`: A summary explanation from the agentic confidence system about why the field may need manual review\n","title":"InsightType"},"Insight":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/InsightType","description":"The type of insight:\n- `reasoning`: Model reasoning about the extraction decision\n- `issue`: A potential problem or concern identified by the agentic confidence system\n- `review_summary`: A summary explanation from the agentic confidence system about why the field may need manual review\n"},"content":{"type":"string","description":"The content of the insight."}},"required":["type","content"],"title":"Insight"},"JsonOutputMetadata":{"type":"object","properties":{"ocrConfidence":{"type":["number","null"],"format":"double","description":"Confidence score from OCR processing, if applicable"},"logprobsConfidence":{"type":["number","null"],"format":"double","description":"Confidence score based on model logprobs"},"reviewAgentScore":{"type":["integer","null"],"description":"A 1-5 score indicating the review agent's confidence in the extracted value.\n- 5: High confidence, no issues detected\n- 4: Good confidence, minor observations\n- 3: Moderate confidence, some uncertainty\n- 2: Low confidence, likely issues\n- 1: Very low confidence, significant problems detected\n\nThese scores will be present when the `reviewAgent.enabled` flag is set to `true` in the processor config.\nIf the review agent is enabled but a score is not returned for a field, this value will be `null`.\nTo learn more, view the [Review Agent Documentation](https://docs.extend.ai/product/extraction/review-agent)\n"},"citations":{"type":"array","items":{"$ref":"#/components/schemas/JsonOutputMetadataCitationsItems"}},"insights":{"type":"array","items":{"$ref":"#/components/schemas/Insight"}}},"required":["logprobsConfidence"],"title":"JsonOutputMetadata"},"JsonOutput":{"type":"object","properties":{"value":{"$ref":"#/components/schemas/JsonObject","description":"The extracted values conforming to the schema defined in the processor config"},"metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonOutputMetadata"},"description":"Metadata about the extracted fields"}},"required":["value","metadata"],"title":"JsonOutput"},"ExtractionFieldResultType":{"type":"string","enum":["string","number","currency","boolean","date","enum","array","object","signature"],"description":"The type of the extracted field","title":"ExtractionFieldResultType"},"ExtractionFieldResultReferenceBoundingBoxesItems":{"type":"object","properties":{"top":{"type":"number","format":"double","description":"The top coordinate of the bounding box"},"left":{"type":"number","format":"double","description":"The left coordinate of the bounding box"},"bottom":{"type":"number","format":"double","description":"The bottom coordinate of the bounding box"},"right":{"type":"number","format":"double","description":"The right coordinate of the bounding box"}},"required":["top","left","bottom","right"],"title":"ExtractionFieldResultReferenceBoundingBoxesItems"},"ExtractionFieldResultReference":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this field"},"fieldName":{"type":"string","description":"The name of the extracted field"},"page":{"type":"number","format":"double","description":"The page number that this bounding box is from"},"boundingBoxes":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionFieldResultReferenceBoundingBoxesItems"},"description":"The bounding boxes of the field"}},"required":["id","fieldName","page","boundingBoxes"],"title":"ExtractionFieldResultReference"},"EnumOption":{"type":"object","properties":{"value":{"type":"string","description":"The enum value (e.g. \"ANNUAL\", \"MONTHLY\", etc.)"},"description":{"type":"string","description":"The description of the enum value"}},"required":["value","description"],"title":"EnumOption"},"ExtractionFieldResult":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this field"},"type":{"$ref":"#/components/schemas/ExtractionFieldResultType","description":"The type of the extracted field"},"value":{"description":"The extracted value, type depends on the field type. More details can be found [here](https://docs.extend.ai/2025-04-21/product/legacy/output-type-legacy#extraction-output-type-fields-array)."},"confidence":{"type":"number","format":"double","description":"A value between 0 and 1 indicating confidence in the extraction"},"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionField"},"description":"The field schema of nested fields"},"insights":{"type":"array","items":{"$ref":"#/components/schemas/Insight"},"description":"Reasoning and other insights from the model"},"references":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionFieldResultReference"},"description":"References for the extracted field"},"enum":{"type":"array","items":{"$ref":"#/components/schemas/EnumOption"},"description":"The enum options for enum fields, only set when type=enum"}},"required":["id","type","value","references"],"title":"ExtractionFieldResult"},"FieldsArrayOutput":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ExtractionFieldResult"},"description":"The output from an extraction processor","title":"FieldsArrayOutput"},"ExtractionOutput":{"oneOf":[{"$ref":"#/components/schemas/JsonOutput"},{"$ref":"#/components/schemas/FieldsArrayOutput"}],"description":"The output from an extraction processor","title":"ExtractionOutput"},"ClassifierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this classification"},"type":{"type":"string","description":"The type of classification"},"confidence":{"type":"number","format":"double","description":"A value between 0 and 1 indicating the model's confidence in the classification, where 1 represents maximum confidence"},"insights":{"type":"array","items":{"$ref":"#/components/schemas/Insight"},"description":"Additional insights about the classification decision"}},"required":["id","type","confidence","insights"],"title":"ClassifierOutput"},"SplitterOutputSplitsItems":{"type":"object","properties":{"type":{"type":"string","description":"The type of the split document (set in the processor config), corresponds to the classificationId"},"observation":{"type":"string","description":"Explanation of the results"},"identifier":{"type":"string","description":"Identifier for the split document (e.g. invoice number)"},"startPage":{"type":"integer","description":"The start page of the split document"},"endPage":{"type":"integer","description":"The end page of the split document"},"name":{"type":"string","description":"Optional name for the split"},"classificationId":{"type":"string","description":"ID of the classification type (set in the processor config)"},"id":{"type":"string","description":"Unique ID for this split"},"fileId":{"type":"string","description":"File ID associated with this split"}},"required":["type","observation","identifier","startPage","endPage","classificationId","id","fileId"],"title":"SplitterOutputSplitsItems"},"SplitterOutput":{"type":"object","properties":{"splits":{"type":"array","items":{"$ref":"#/components/schemas/SplitterOutputSplitsItems"}},"isExternal":{"type":"boolean"}},"required":["splits"],"title":"SplitterOutput"},"ProcessorOutput":{"oneOf":[{"$ref":"#/components/schemas/ExtractionOutput"},{"$ref":"#/components/schemas/ClassifierOutput"},{"$ref":"#/components/schemas/SplitterOutput"}],"description":"The output from a processor run. The type of output will match the processor type.","title":"ProcessorOutput"},"ExtractionOutputEdits":{"type":"object","properties":{"originalValue":{"description":"The original value before editing."},"editedValue":{"description":"The value after editing."},"notes":{"type":"string","description":"Any notes added during editing."},"page":{"type":"number","format":"double","description":"The page number where the edit was made."},"fieldType":{"type":"string","description":"The type of the edited field."}},"description":"A record of edits made to the processor output.\n","title":"ExtractionOutputEdits"},"ProcessorRunType":{"type":"string","enum":["CLASSIFY","EXTRACT","SPLITTER"],"description":"The type of processor:\n* `\"CLASSIFY\"` - Classifies documents into categories\n* `\"EXTRACT\"` - Extracts structured data from documents\n* `\"SPLITTER\"` - Splits documents into multiple parts\n","title":"ProcessorRunType"},"ProcessorRunConfig":{"oneOf":[{"$ref":"#/components/schemas/ClassificationConfig"},{"$ref":"#/components/schemas/ExtractionConfig"},{"$ref":"#/components/schemas/SplitterConfig"}],"description":"The configuration used for this processor run. The type of configuration will match the processor type.","title":"ProcessorRunConfig"},"FileType":{"type":"string","enum":["PDF","CSV","IMG","TXT","DOCX","EXCEL","XML","HTML"],"description":"The type of the file","title":"FileType"},"FileContentsPagesItems":{"type":"object","properties":{"pageNumber":{"type":"integer","description":"The page number of this page in the document."},"pageHeight":{"type":"number","format":"double"},"pageWidth":{"type":"number","format":"double"},"rawText":{"type":"string","description":"The raw text content extracted from this page."},"markdown":{"type":"string","description":"Cleaned and structured markdown content of this page."},"html":{"type":"string","description":"Cleaned and structured html content of the page. Available for DOCX file types (that were not auto-converted to PDFs). Only included if the `html` query parameter is set to true in the endpoint request.\n"}},"required":["pageNumber"],"title":"FileContentsPagesItems"},"FileContentsSheetsItems":{"type":"object","properties":{"sheetName":{"type":"string","description":"The name of the sheet."},"rawText":{"type":"string","description":"The raw text content of the sheet."}},"required":["sheetName"],"title":"FileContentsSheetsItems"},"FileContents":{"type":"object","properties":{"rawText":{"type":"string","description":"The raw text content of the file. This is included for all file types if the `rawText` query parameter is set to true in the endpoint request.\n"},"markdown":{"type":"string","description":"Cleaned and structured markdown content of the entire file. Available for PDF and IMG file types. Only included if the `markdown` query parameter is set to true in the endpoint request.\n"},"pages":{"type":"array","items":{"$ref":"#/components/schemas/FileContentsPagesItems"}},"sheets":{"type":"array","items":{"$ref":"#/components/schemas/FileContentsSheetsItems"}}},"title":"FileContents"},"FileMetadataParentSplit":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the split."},"type":{"type":"string","description":"The type of the split."},"identifier":{"type":"string","description":"The identifier of the split."},"startPage":{"type":"integer","description":"The start page of the split."},"endPage":{"type":"integer","description":"The end page of the split."}},"required":["id","type","identifier","startPage","endPage"],"description":"The split metadata details. Only included if this file is a derivative of another file, for instance if it was created via a Splitter in a workflow.","title":"FileMetadataParentSplit"},"FileMetadata":{"type":"object","properties":{"pageCount":{"type":"number","format":"double","description":"The number of pages in the file. This is only set for PDF/DOCX files."},"parentSplit":{"$ref":"#/components/schemas/FileMetadataParentSplit","description":"The split metadata details. Only included if this file is a derivative of another file, for instance if it was created via a Splitter in a workflow."}},"title":"FileMetadata"},"FileCredits":{"type":"object","properties":{"credits":{"type":"number","format":"double","description":"The number of credits consumed specifically for parsing this file."}},"required":["credits"],"description":"These are usage credits for parsing the file. \n\nThis field will not be returned for files processed before October 7, 2025, or for customers on legacy billing systems.\n\nFor more details on how credits work, see our [Credits Guide](https://docs.extend.ai/2025-04-21/product/general/how-credits-work).\n","title":"FileCredits"},"File":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be \"file\".\n"},"id":{"type":"string","description":"Extend's internal ID for the file. It will always start with `\"file_\"`.\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"name":{"type":"string","description":"The name of the file\n\nExample: `\"Invoices.pdf\"`\n"},"type":{"$ref":"#/components/schemas/FileType","description":"The type of the file"},"presignedUrl":{"type":"string","description":"A presigned URL to download the file. Expires after 15 minutes."},"parentFileId":{"type":"string","description":"The ID of the parent file. Only included if this file is a derivative of another file, for instance if it was created via a Splitter in a workflow.\n"},"contents":{"$ref":"#/components/schemas/FileContents"},"metadata":{"$ref":"#/components/schemas/FileMetadata"},"createdAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the file was created. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"updatedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the file was last updated. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"},"usage":{"$ref":"#/components/schemas/FileCredits"}},"required":["object","id","name","metadata","createdAt","updatedAt"],"title":"File"},"ProcessorRunMergedProcessorsItems":{"type":"object","properties":{"processorId":{"type":"string","description":"The ID of the merged processor.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"processorVersionId":{"type":"string","description":"The ID of the specific processor version used.\n"},"processorName":{"type":"string","description":"The name of the merged processor.\n\nExample: `\"Invoice Line Items Processor\"`\n"}},"required":["processorId","processorVersionId","processorName"],"title":"ProcessorRunMergedProcessorsItems"},"DocumentProcessorRunCredits":{"type":"object","properties":{"credits":{"type":"number","format":"double","description":"The number of credits consumed specifically for document processing in this processor run. This does not include file parsing credits."}},"required":["credits"],"description":"These are usage credits for document processing (extraction, classification, or splitting). File parsing credits are tracked separately and can be retrieved from the [Get File](https://docs.extend.ai/2025-04-21/developers/api-reference/file-endpoints/get-file) endpoint.\n\nThis field will not be returned for processor runs created before October 7, 2025, or for customers on legacy billing systems.\n\nFor more details on how credits work, see our [Credits Guide](https://docs.extend.ai/2025-04-21/product/general/how-credits-work).\n","title":"DocumentProcessorRunCredits"},"ProcessorRun":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"document_processor_run\"`.\n"},"id":{"type":"string","description":"The unique identifier for this processor run.\n\nExample: `\"dpr_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"processorId":{"type":"string","description":"The ID of the processor used for this run.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"processorVersionId":{"type":"string","description":"The ID of the specific processor version used.\n"},"processorName":{"type":"string","description":"The name of the processor.\n\nExample: `\"Invoice Processor\"`\n"},"status":{"$ref":"#/components/schemas/ProcessorStatus"},"output":{"$ref":"#/components/schemas/ProcessorOutput","description":"The final output, either reviewed or initial.\n\nConforms to the shape of output types and depends on the processor type and configuration shape.\n"},"failureReason":{"type":"string","description":"If the run failed, indicates the reason for failure.\n"},"failureMessage":{"type":"string","description":"If the run failed, provides a detailed message about the failure.\n"},"metadata":{"$ref":"#/components/schemas/JsonObject","description":"Any metadata that was provided when creating the processor run."},"reviewed":{"type":"boolean","description":"Indicates whether the run has been reviewed."},"edited":{"type":"boolean","description":"Indicates whether the run results have been edited."},"edits":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ExtractionOutputEdits"}},"type":{"$ref":"#/components/schemas/ProcessorRunType","description":"The type of processor:\n* `\"CLASSIFY\"` - Classifies documents into categories\n* `\"EXTRACT\"` - Extracts structured data from documents\n* `\"SPLITTER\"` - Splits documents into multiple parts\n"},"config":{"$ref":"#/components/schemas/ProcessorRunConfig","description":"The configuration used for this processor run. The type of configuration will match the processor type."},"initialOutput":{"$ref":"#/components/schemas/ProcessorOutput","description":"The initial output from the processor run. The type of output will match the processor type."},"reviewedOutput":{"$ref":"#/components/schemas/ProcessorOutput","description":"The output after review, if any."},"files":{"type":"array","items":{"$ref":"#/components/schemas/File"},"description":"Details of the processed files.\n\nIf this was a file generated from a splitter processor, this will be the sub file.\n\nSee the File object for more details.\n"},"mergedProcessors":{"type":"array","items":{"$ref":"#/components/schemas/ProcessorRunMergedProcessorsItems"},"description":"An array of processors that were merged to create this output. Will be an empty array unless this output was the result of a MergeExtraction step in a workflow.\n"},"url":{"type":"string","description":"The URL to view the processor run.\n"},"usage":{"$ref":"#/components/schemas/DocumentProcessorRunCredits"}},"required":["object","id","processorId","processorVersionId","processorName","status","output","reviewed","edited","edits","type","config","files","mergedProcessors","url"],"title":"ProcessorRun"},"processorRun_create_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"processorRun":{"$ref":"#/components/schemas/ProcessorRun"}},"required":["success","processorRun"],"title":"processorRun_create_Response_200"},"Error":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string","description":"Error message"}},"title":"Error"},"RunProcessorRequestTooManyRequestsError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"title":"RunProcessorRequestTooManyRequestsError"},"processorRun_get_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"processorRun":{"$ref":"#/components/schemas/ProcessorRun"}},"required":["success","processorRun"],"title":"processorRun_get_Response_200"},"ProcessorType":{"type":"string","enum":["EXTRACT","CLASSIFY","SPLITTER"],"description":"The type of processor:\n* `\"EXTRACT\"` - Extracts structured data from documents\n* `\"CLASSIFY\"` - Classifies documents into categories\n* `\"SPLITTER\"` - Splits documents into multiple parts\n","title":"ProcessorType"},"ProcessorRunsGetParametersSource":{"type":"string","enum":["ADMIN","BATCH_PROCESSOR_RUN","PLAYGROUND","WORKFLOW_CONFIGURATION","WORKFLOW_RUN","STUDIO","API"],"title":"ProcessorRunsGetParametersSource"},"SortByEnum":{"type":"string","enum":["updatedAt","createdAt"],"default":"updatedAt","title":"SortByEnum"},"SortDirEnum":{"type":"string","enum":["asc","desc"],"default":"desc","title":"SortDirEnum"},"NextPageToken":{"type":"string","description":"The token used to fetch the page of results from a previous request. We use cursor based pagination and will return a `nextPageToken` in the response if there are more results.\n\nNote that if other parameters are changed in subsequent requests, you may receive inconsistent data.\n\nexample: `\"xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ=\"`\n","title":"NextPageToken"},"MaxPageSize":{"type":"integer","default":10,"description":"The maximum number of results to return in the response. You may receive less than this number if there are fewer results than the maximum.","title":"MaxPageSize"},"ProcessorRunSummaryType":{"type":"string","enum":["EXTRACT","SPLITTER","CLASSIFY"],"description":"The type of processor that was run:\n* `\"EXTRACT\"` - Extraction processor\n* `\"SPLITTER\"` - Splitting processor\n* `\"CLASSIFY\"` - Classification processor\n","title":"ProcessorRunSummaryType"},"ProcessorRunSummary":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the processor run.\n\nExample: `\"dpr_Zk9mNP12Qw4-yTv8BdR3H\"`\n"},"status":{"$ref":"#/components/schemas/ProcessorStatus"},"processorId":{"type":"string","description":"The ID of the processor that was run. Will always start with \"dp_\".\n\nExample: `\"dp_BMdfq_yWM3sT-ZzvCnA3f\"`\n"},"processorName":{"type":"string","description":"The name of the processor that was run.\n\nExample: `\"Invoice Extractor\"`\n"},"processorVersionId":{"type":"string","description":"The ID of the processor version that was run. Will always start with \"dpv_\".\n\nExample: `\"dpv_Zk9mNP12Qw4-yTv8BdR3H\"`\n"},"type":{"$ref":"#/components/schemas/ProcessorRunSummaryType","description":"The type of processor that was run:\n* `\"EXTRACT\"` - Extraction processor\n* `\"SPLITTER\"` - Splitting processor\n* `\"CLASSIFY\"` - Classification processor\n"},"createdAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the processor run was created. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:29:55Z\"`\n"},"updatedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the processor run was last updated. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"},"usage":{"$ref":"#/components/schemas/DocumentProcessorRunCredits"}},"required":["id","status","processorId","processorName","processorVersionId","createdAt","updatedAt"],"title":"ProcessorRunSummary"},"processorRun_list_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"processorRuns":{"type":"array","items":{"$ref":"#/components/schemas/ProcessorRunSummary"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"}},"required":["success","processorRuns"],"title":"processorRun_list_Response_200"},"processorRun_cancel_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"processorRun":{"$ref":"#/components/schemas/ProcessorRun"}},"required":["success","processorRun"],"title":"processorRun_cancel_Response_200"},"processorRun_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"documentProcessorRunId":{"type":"string","description":"The ID of the deleted processor run"},"message":{"type":"string","description":"Confirmation message"}},"required":["success","documentProcessorRunId","message"],"title":"processorRun_delete_Response_200"},"ExtendError":{"type":"object","properties":{"code":{"type":"string","description":"Error code identifying the type of error"},"message":{"type":"string","description":"Human-readable error message"},"requestId":{"type":"string","description":"Unique request identifier for support purposes"},"retryable":{"type":"boolean","description":"Whether the request can be retried"}},"required":["code","message","requestId","retryable"],"title":"ExtendError"},"BatchProcessorRunMetrics":{"type":"object","properties":{"numFiles":{"type":"number","format":"double","description":"The total number of files processed in this batch run"},"numPages":{"type":"number","format":"double","description":"The total number of pages processed in this batch run"}},"title":"BatchProcessorRunMetrics"},"BatchProcessorRunStatus":{"type":"string","enum":["PENDING","PROCESSING","PROCESSED","FAILED"],"description":"The current status of the batch processor run:\n* `\"PENDING\"` - The batch processor run is waiting to start\n* `\"PROCESSING\"` - The batch processor run is in progress\n* `\"PROCESSED\"` - The batch processor run completed successfully\n* `\"FAILED\"` - The batch processor run encountered an error\n","title":"BatchProcessorRunStatus"},"BatchProcessorRunSource":{"type":"string","enum":["EVAL_SET","PLAYGROUND","STUDIO"],"description":"The source of the batch processor run:\n* `\"EVAL_SET\"` - The batch processor run was made from an evaluation set. The `sourceId` will be the ID of the evaluation set (e.g., `\"ev_1234\"`)\n* `\"PLAYGROUND\"` - The batch processor run was made from the playground. The `sourceId` will not be set\n* `\"STUDIO\"` - The batch processor run was made for a processor in Studio. The `sourceId` will be the ID of the processor (e.g., `\"dp_1234\"`)\n","title":"BatchProcessorRunSource"},"BatchProcessorRunOptions":{"type":"object","properties":{"fuzzyMatchFields":{"type":"array","items":{"type":"string"},"description":"The fields that were fuzzy matched."},"excludeFields":{"type":"array","items":{"type":"string"},"description":"The fields that were excluded from the run."}},"description":"The options for the batch processor run.","title":"BatchProcessorRunOptions"},"BatchProcessorRun":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"batch_processor_run\"`.\n"},"id":{"type":"string","description":"The unique identifier for this batch processor run.\n\nExample: `\"batch_processor_run_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"processorId":{"type":"string","description":"The ID of the processor used for this run.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"processorVersionId":{"type":"string","description":"The ID of the specific processor version used.\n\nExample: `\"dpv_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"processorName":{"type":"string","description":"The name of the processor.\n\nExample: `\"Invoice Processor\"`\n"},"metrics":{"$ref":"#/components/schemas/BatchProcessorRunMetrics"},"status":{"$ref":"#/components/schemas/BatchProcessorRunStatus","description":"The current status of the batch processor run:\n* `\"PENDING\"` - The batch processor run is waiting to start\n* `\"PROCESSING\"` - The batch processor run is in progress\n* `\"PROCESSED\"` - The batch processor run completed successfully\n* `\"FAILED\"` - The batch processor run encountered an error\n"},"source":{"$ref":"#/components/schemas/BatchProcessorRunSource","description":"The source of the batch processor run:\n* `\"EVAL_SET\"` - The batch processor run was made from an evaluation set. The `sourceId` will be the ID of the evaluation set (e.g., `\"ev_1234\"`)\n* `\"PLAYGROUND\"` - The batch processor run was made from the playground. The `sourceId` will not be set\n* `\"STUDIO\"` - The batch processor run was made for a processor in Studio. The `sourceId` will be the ID of the processor (e.g., `\"dp_1234\"`)\n"},"sourceId":{"type":"string","description":"The ID of the source of the batch processor run. See the `source` field for more details.\nExample: `\"ev_1234\"` for EVAL_SET source, `\"dp_1234\"` for STUDIO source\n"},"runCount":{"type":"integer","description":"The number of runs that were made."},"options":{"$ref":"#/components/schemas/BatchProcessorRunOptions","description":"The options for the batch processor run."},"createdAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the batch processor run was created. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"updatedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the batch processor run was last updated. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"}},"required":["object","id","processorId","processorVersionId","processorName","metrics","status","source","runCount","options","createdAt","updatedAt"],"title":"BatchProcessorRun"},"batchProcessorRun_get_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"batchProcessorRun":{"$ref":"#/components/schemas/BatchProcessorRun"}},"required":["success","batchProcessorRun"],"title":"batchProcessorRun_get_Response_200"},"ProcessorsGetParametersSortBy":{"type":"string","enum":["createdAt","updatedAt"],"default":"updatedAt","title":"ProcessorsGetParametersSortBy"},"ProcessorsGetParametersSortDir":{"type":"string","enum":["asc","desc"],"default":"desc","title":"ProcessorsGetParametersSortDir"},"ListProcessorsProcessorObject":{"type":"string","enum":["document_processor"],"description":"The type of response. In this case, it will always be `\"document_processor\"`.\n","title":"ListProcessorsProcessorObject"},"ListProcessorsProcessorVersion":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this version of the document processor.\n\nExample: `\"dpv_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"version":{"type":"string","description":"The version number or identifier for this processor version.\n\nExample: `\"3\"`\n"}},"required":["id","version"],"title":"ListProcessorsProcessorVersion"},"ListProcessorsProcessor":{"type":"object","properties":{"object":{"$ref":"#/components/schemas/ListProcessorsProcessorObject","description":"The type of response. In this case, it will always be `\"document_processor\"`.\n"},"id":{"type":"string","description":"The ID of the processor.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"name":{"type":"string","description":"The name of the processor.\n\nExample: `\"Invoice Processor\"`\n"},"type":{"$ref":"#/components/schemas/ProcessorType"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ListProcessorsProcessorVersion"},"description":"Array of all versions for this processor"},"createdAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the processor was created. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"updatedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the processor was last updated. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"}},"required":["object","id","name","type","versions","createdAt","updatedAt"],"title":"ListProcessorsProcessor"},"ListProcessorsResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the request was successful"},"warning":{"type":["string","null"],"description":"Optional warning message"},"processors":{"type":"array","items":{"$ref":"#/components/schemas/ListProcessorsProcessor"},"description":"Array of processors"},"nextPageToken":{"type":["string","null"],"description":"Token for retrieving the next page of results. Will be null if there are no more results."}},"required":["success","processors"],"title":"ListProcessorsResponse"},"ProcessorsPostRequestBodyContentApplicationJsonSchemaConfig":{"oneOf":[{"$ref":"#/components/schemas/ClassificationConfig"},{"$ref":"#/components/schemas/ExtractionConfig"},{"$ref":"#/components/schemas/SplitterConfig"}],"description":"The configuration for the processor. The type of configuration must match the processor type. One of `cloneProcessorId` or `config` must be provided.","title":"ProcessorsPostRequestBodyContentApplicationJsonSchemaConfig"},"ProcessorVersionConfig":{"oneOf":[{"$ref":"#/components/schemas/ClassificationConfig"},{"$ref":"#/components/schemas/ExtractionConfig"},{"$ref":"#/components/schemas/SplitterConfig"}],"description":"The configuration settings for this version of the document processor. The structure of this object will vary depending on the processor type.\n\nSee the configuration section in the \"Guides\" tab, for yout specific processor type, for more details on the configuration settings.\n","title":"ProcessorVersionConfig"},"ProcessorVersion":{"type":"object","properties":{"object":{"type":"string","description":"The type of the object. In this case, it will always be `\"document_processor_version\"`.\n"},"id":{"type":"string","description":"The unique identifier for this version of the document processor.\n\nExample: `\"dpv_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"processorId":{"type":"string","description":"The ID of the parent document processor.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"processorName":{"type":"string","description":"The name of the parent document processor.\n\nExample: `\"Invoice Processor\"`\n"},"processorType":{"$ref":"#/components/schemas/ProcessorType"},"description":{"type":"string","description":"An optional description of this version of the document processor.\n\nExample: `\"Updated extraction fields for new invoice format\"`\n"},"version":{"type":"string","description":"The version number or identifier for this specific version of the document processor. The draft version will have version=\"draft\".\n\nExamples: `\"1.0\"`, `\"2.1\"`, `\"draft\"`\n"},"config":{"$ref":"#/components/schemas/ProcessorVersionConfig","description":"The configuration settings for this version of the document processor. The structure of this object will vary depending on the processor type.\n\nSee the configuration section in the \"Guides\" tab, for yout specific processor type, for more details on the configuration settings.\n"},"createdAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which this version of the document processor was created. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"updatedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which this version of the document processor was last updated. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"}},"required":["object","id","processorId","processorType","version","config","createdAt","updatedAt"],"title":"ProcessorVersion"},"Processor":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"document_processor\"`.\n"},"id":{"type":"string","description":"The ID of the processor.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"name":{"type":"string","description":"The name of the processor.\n\nExample: `\"Invoice Processor\"`\n"},"type":{"$ref":"#/components/schemas/ProcessorType"},"createdAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the processor was created. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"updatedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the processor was last updated. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"},"draftVersion":{"$ref":"#/components/schemas/ProcessorVersion"}},"required":["object","id","name","type","createdAt","updatedAt","draftVersion"],"title":"Processor"},"processor_create_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"processor":{"$ref":"#/components/schemas/Processor"}},"required":["success","processor"],"title":"processor_create_Response_200"},"ProcessorsIdPostRequestBodyContentApplicationJsonSchemaConfig":{"oneOf":[{"$ref":"#/components/schemas/ClassificationConfig"},{"$ref":"#/components/schemas/ExtractionConfig"},{"$ref":"#/components/schemas/SplitterConfig"}],"description":"The new configuration for the processor. The type of configuration must match the processor type:\n* For classification processors, use `ClassificationConfig`\n* For extraction processors, use `ExtractionConfig`\n* For splitter processors, use `SplitterConfig`\n","title":"ProcessorsIdPostRequestBodyContentApplicationJsonSchemaConfig"},"processor_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"processor":{"$ref":"#/components/schemas/Processor"}},"required":["success","processor"],"title":"processor_update_Response_200"},"ProcessorsIdPublishPostRequestBodyContentApplicationJsonSchemaReleaseType":{"type":"string","enum":["major","minor"],"description":"The type of release for this version. The two options are \"major\" and \"minor\", which will increment the version number accordingly.","title":"ProcessorsIdPublishPostRequestBodyContentApplicationJsonSchemaReleaseType"},"ProcessorsIdPublishPostRequestBodyContentApplicationJsonSchemaConfig":{"oneOf":[{"$ref":"#/components/schemas/ClassificationConfig"},{"$ref":"#/components/schemas/ExtractionConfig"},{"$ref":"#/components/schemas/SplitterConfig"}],"description":"The configuration for this version of the processor. The type of configuration must match the processor type.","title":"ProcessorsIdPublishPostRequestBodyContentApplicationJsonSchemaConfig"},"processorVersion_create_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"processorVersion":{"$ref":"#/components/schemas/ProcessorVersion"}},"required":["success","processorVersion"],"title":"processorVersion_create_Response_200"},"processorVersion_get_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"version":{"$ref":"#/components/schemas/ProcessorVersion","description":"A ProcessorVersion object representing the requested version of the processor."}},"required":["success","version"],"title":"processorVersion_get_Response_200"},"processorVersion_list_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ProcessorVersion"},"description":"An array of ProcessorVersion objects representing all versions of the specified processor."}},"required":["success","versions"],"title":"processorVersion_list_Response_200"},"ParsePostParametersResponseType":{"type":"string","enum":["json","url"],"title":"ParsePostParametersResponseType"},"ParsePostRequestBodyContentApplicationJsonSchemaFile":{"type":"object","properties":{"fileName":{"type":"string","description":"The name of the file. If not set, the file name is taken from the url."},"fileUrl":{"type":"string","description":"A URL to download the file. For production use cases, we recommend using presigned URLs with a 5-15 minute expiration time. One of `fileUrl` or `fileId` must be provided."},"fileId":{"type":"string","description":"If you already have an Extend file id (for instance from running a workflow or a previous [file upload](https://docs.extend.ai/2025-04-21/developers/api-reference/file-endpoints/upload-file)) then you can use that file id when running the parse endpoint so that it leverage any cached data that might be available. The file id will start with \"file_\". One of `fileUrl` or `fileId` must be provided.\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"}},"description":"A file object containing either a URL or a fileId.","title":"ParsePostRequestBodyContentApplicationJsonSchemaFile"},"ParserRunObject":{"type":"string","enum":["parser_run"],"description":"The type of object. Will always be `\"parser_run\"`.","title":"ParserRunObject"},"ChunkType":{"type":"string","enum":["page","document","section"],"description":"The type of chunk.","title":"ChunkType"},"ChunkMetadataPageRange":{"type":"object","properties":{"start":{"type":"integer","description":"The starting page number (inclusive)."},"end":{"type":"integer","description":"The ending page number (inclusive)."}},"required":["start","end"],"description":"The page range this chunk covers. Often will just be a partial page, in which cases `start` and `end` will be the same.\n","title":"ChunkMetadataPageRange"},"ChunkMetadata":{"type":"object","properties":{"pageRange":{"$ref":"#/components/schemas/ChunkMetadataPageRange","description":"The page range this chunk covers. Often will just be a partial page, in which cases `start` and `end` will be the same.\n"}},"required":["pageRange"],"description":"Metadata about the chunk.","title":"ChunkMetadata"},"BlockType":{"type":"string","enum":["text","heading","section_heading","table","figure","table_head","table_cell","key_value","header","footer"],"description":"The type of block:\n* `\"text\"` - Regular text content\n* `\"heading\"` - Section or document headings \n* `\"section_heading\"` - Subsection headings\n* `\"table\"` - Tabular data with rows and columns\n* `\"table_head\"` - Table header cells\n* `\"table_cell\"` - Table body cells\n* `\"figure\"` - Images, charts, diagrams, or logos\n* `\"key_value\"` - Key-value pair content (e.g., form field labels and values)\n* `\"header\"` - Page header content\n* `\"footer\"` - Page footer content\n","title":"BlockType"},"TableDetailsType":{"type":"string","enum":["table_details"],"description":"Indicates this is a table details object","title":"TableDetailsType"},"TableDetails":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/TableDetailsType","description":"Indicates this is a table details object"},"rowCount":{"type":"integer","description":"The number of rows in the table"},"columnCount":{"type":"integer","description":"The number of columns in the table"}},"required":["type","rowCount","columnCount"],"description":"Details for table blocks","title":"TableDetails"},"TableCellDetailsType":{"type":"string","enum":["table_cell_details"],"description":"Indicates this is a table cell details object","title":"TableCellDetailsType"},"TableCellDetails":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/TableCellDetailsType","description":"Indicates this is a table cell details object"},"rowIndex":{"type":"integer"},"columnIndex":{"type":"integer"}},"required":["type","rowIndex","columnIndex"],"description":"Details for table cell blocks","title":"TableCellDetails"},"FigureDetailsType":{"type":"string","enum":["figure_details"],"description":"Indicates this is a figure details object","title":"FigureDetailsType"},"FigureDetailsFigureType":{"type":"string","enum":["other","chart","image","diagram","logo"],"description":"The refined type of figure - only set when figure classification and summarization is enabled. Possible values:\n\n* `image`: A photographic image\n* `chart`: A data chart or graph\n* `diagram`: A schematic or diagram\n* `logo`: A company or brand logo\n* `other`: Any other type of figure\n","title":"FigureDetailsFigureType"},"FigureDetails":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/FigureDetailsType","description":"Indicates this is a figure details object"},"imageUrl":{"type":"string","description":"URL to the clipped/segmented figure image. Only set if the option `figureImageClippingEnabled` in the input is `true`, which it is by default."},"figureType":{"$ref":"#/components/schemas/FigureDetailsFigureType","description":"The refined type of figure - only set when figure classification and summarization is enabled. Possible values:\n\n* `image`: A photographic image\n* `chart`: A data chart or graph\n* `diagram`: A schematic or diagram\n* `logo`: A company or brand logo\n* `other`: Any other type of figure\n"}},"required":["type"],"description":"Details for figure blocks","title":"FigureDetails"},"KeyValueDetailsType":{"type":"string","enum":["key_value_details"],"description":"Indicates this is a key-value details object","title":"KeyValueDetailsType"},"KeyValueDetails":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/KeyValueDetailsType","description":"Indicates this is a key-value details object"}},"required":["type"],"description":"Details for key-value pair blocks","title":"KeyValueDetails"},"EmptyBlockDetails":{"type":"object","properties":{},"description":"An empty object","title":"EmptyBlockDetails"},"BlockDetails":{"oneOf":[{"$ref":"#/components/schemas/TableDetails"},{"$ref":"#/components/schemas/TableCellDetails"},{"$ref":"#/components/schemas/FigureDetails"},{"$ref":"#/components/schemas/KeyValueDetails"},{"$ref":"#/components/schemas/EmptyBlockDetails"}],"description":"Additional details specific to the block type. The schema depends on the block type.\n","title":"BlockDetails"},"BlockMetadataPage":{"type":"object","properties":{"number":{"type":"integer","description":"The page number where this block appears."},"width":{"type":"number","format":"double","description":"The width of the page in points."},"height":{"type":"number","format":"double","description":"The height of the page in points."}},"required":["number"],"description":"Information about the page this block appears on.","title":"BlockMetadataPage"},"BlockMetadataSheet":{"type":"object","properties":{"index":{"type":"integer","description":"The zero-based index of the sheet in the original workbook."},"name":{"type":"string","description":"The name of the sheet in the original workbook."}},"required":["index","name"],"description":"Spreadsheet sheet metadata. Present for blocks parsed from spreadsheet files, such as Excel workbooks.","title":"BlockMetadataSheet"},"BlockMetadata":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/BlockMetadataPage","description":"Information about the page this block appears on."},"sheet":{"$ref":"#/components/schemas/BlockMetadataSheet","description":"Spreadsheet sheet metadata. Present for blocks parsed from spreadsheet files, such as Excel workbooks."}},"description":"Metadata about the block.","title":"BlockMetadata"},"BlockPolygonItems":{"type":"object","properties":{"x":{"type":"number","format":"double"},"y":{"type":"number","format":"double"}},"required":["x","y"],"title":"BlockPolygonItems"},"BlockBoundingBox":{"type":"object","properties":{"left":{"type":["number","null"],"format":"double"},"right":{"type":["number","null"],"format":"double"},"top":{"type":["number","null"],"format":"double"},"bottom":{"type":["number","null"],"format":"double"}},"required":["left","right","top","bottom"],"description":"A simplified bounding box for the block.","title":"BlockBoundingBox"},"Block":{"type":"object","properties":{"object":{"type":"string","description":"The type of object. In this case, it will always be `\"block\"`.\n"},"id":{"type":"string","description":"A unique identifier for the block, deterministically generated as a hash of the block content."},"parentBlockId":{"type":"string","description":"The ID of the parent block. For example, for a table cell block, this would be the ID of the parent table block. Only set if this is a child block."},"type":{"$ref":"#/components/schemas/BlockType","description":"The type of block:\n* `\"text\"` - Regular text content\n* `\"heading\"` - Section or document headings \n* `\"section_heading\"` - Subsection headings\n* `\"table\"` - Tabular data with rows and columns\n* `\"table_head\"` - Table header cells\n* `\"table_cell\"` - Table body cells\n* `\"figure\"` - Images, charts, diagrams, or logos\n* `\"key_value\"` - Key-value pair content (e.g., form field labels and values)\n* `\"header\"` - Page header content\n* `\"footer\"` - Page footer content\n"},"content":{"type":"string","description":"The textual content of the block formatted based on the target format."},"details":{"$ref":"#/components/schemas/BlockDetails","description":"Additional details specific to the block type. The schema depends on the block type.\n"},"metadata":{"$ref":"#/components/schemas/BlockMetadata","description":"Metadata about the block."},"polygon":{"type":"array","items":{"$ref":"#/components/schemas/BlockPolygonItems"},"description":"An array of points defining the polygon that bounds the block."},"boundingBox":{"$ref":"#/components/schemas/BlockBoundingBox","description":"A simplified bounding box for the block."},"children":{"type":"array","items":{"$ref":"#/components/schemas/Block"},"description":"An array of child blocks. For example, a table block may contain table cell blocks as children when `cellBlocksEnabled` is set to true."}},"required":["object","id","type","content","details","metadata","polygon","boundingBox"],"title":"Block"},"Chunk":{"type":"object","properties":{"object":{"type":"string","description":"The type of object. In this case, it will always be `\"chunk\"`.\n"},"type":{"$ref":"#/components/schemas/ChunkType","description":"The type of chunk."},"content":{"type":"string","description":"The parsed content of the chunk."},"metadata":{"$ref":"#/components/schemas/ChunkMetadata","description":"Metadata about the chunk."},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/Block"},"description":"An array of block objects that make up the chunk. A Block represents a distinct content element within a document, such as a paragraph of text, a heading, a table, or a figure. Blocks are the fundamental units that make up chunks in parsed documents.\n"}},"required":["object","type","content","metadata","blocks"],"title":"Chunk"},"ParserRunOcrWordsItemsBoundingBox":{"type":"object","properties":{"left":{"type":"number","format":"double","description":"The left coordinate of the bounding box."},"right":{"type":"number","format":"double","description":"The right coordinate of the bounding box."},"top":{"type":"number","format":"double","description":"The top coordinate of the bounding box."},"bottom":{"type":"number","format":"double","description":"The bottom coordinate of the bounding box."}},"required":["left","right","top","bottom"],"description":"The bounding box coordinates of the word.","title":"ParserRunOcrWordsItemsBoundingBox"},"ParserRunOcrWordsItems":{"type":"object","properties":{"content":{"type":"string","description":"The text content of the word."},"boundingBox":{"$ref":"#/components/schemas/ParserRunOcrWordsItemsBoundingBox","description":"The bounding box coordinates of the word."},"confidence":{"type":"number","format":"double","description":"The confidence score of the OCR detection for this word, between 0 and 1."},"pageNumber":{"type":"number","format":"double","description":"The page number where the word was detected."}},"required":["content","boundingBox","confidence","pageNumber"],"title":"ParserRunOcrWordsItems"},"ParserRunOcr":{"type":"object","properties":{"words":{"type":"array","items":{"$ref":"#/components/schemas/ParserRunOcrWordsItems"},"description":"An array of individual words detected by OCR."}},"description":"Raw OCR data from the parsing process. Only included when `returnOcr` is configured in the parse config's advanced options.","title":"ParserRunOcr"},"ParserRunStatusEnum":{"type":"string","enum":["PROCESSED","FAILED"],"description":"The status of the parser run:\n* `\"PROCESSED\"` - The file was successfully processed\n* `\"FAILED\"` - The processing failed (see failureReason for details)\n","title":"ParserRunStatusEnum"},"ParserRunMetrics":{"type":"object","properties":{"processingTimeMs":{"type":"number","format":"double","description":"The time taken to process the document in milliseconds."},"pageCount":{"type":"number","format":"double","description":"The number of pages in the document."}},"required":["processingTimeMs","pageCount"],"description":"Metrics about the parsing process.","title":"ParserRunMetrics"},"ParserRunCredits":{"type":"object","properties":{"credits":{"type":"number","format":"double","description":"The number of credits consumed for parsing in this parser run."}},"required":["credits"],"description":"These are usage credits for parser runs.\n\nThis field will not be returned for parser runs created before October 7, 2025, or for customers on legacy billing systems.\n\nFor more details on how credits work, see our [Credits Guide](https://docs.extend.ai/2025-04-21/product/general/how-credits-work).\n","title":"ParserRunCredits"},"ParserRun":{"type":"object","properties":{"object":{"$ref":"#/components/schemas/ParserRunObject","description":"The type of object. Will always be `\"parser_run\"`."},"id":{"type":"string","description":"A unique identifier for the parser run. Will always start with `\"parser_run_\"`\n\nExample: `\"parser_run_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"fileId":{"type":"string","description":"The identifier of the file that was parsed. This can be used as a parameter to other Extend endpoints, such as processor runs."},"chunks":{"type":"array","items":{"$ref":"#/components/schemas/Chunk"},"description":"An array of chunks that were parsed from the file."},"ocr":{"$ref":"#/components/schemas/ParserRunOcr","description":"Raw OCR data from the parsing process. Only included when `returnOcr` is configured in the parse config's advanced options."},"status":{"$ref":"#/components/schemas/ParserRunStatusEnum","description":"The status of the parser run:\n* `\"PROCESSED\"` - The file was successfully processed\n* `\"FAILED\"` - The processing failed (see failureReason for details)\n"},"failureReason":{"type":"string","description":"The reason for failure if status is \"FAILED\"."},"metrics":{"$ref":"#/components/schemas/ParserRunMetrics","description":"Metrics about the parsing process."},"config":{"$ref":"#/components/schemas/ParseConfig","description":"The configuration used for the parsing process, including any default values that were applied."},"usage":{"$ref":"#/components/schemas/ParserRunCredits"}},"required":["object","id","fileId","chunks","status","metrics","config"],"description":"Full parser run object with complete parsing results","title":"ParserRun"},"ParseAsyncPostRequestBodyContentApplicationJsonSchemaFile":{"type":"object","properties":{"fileName":{"type":"string","description":"The name of the file. If not set, the file name is taken from the url."},"fileUrl":{"type":"string","description":"A URL to download the file. For production use cases, we recommend using presigned URLs with a 5-15 minute expiration time. One of `fileUrl` or `fileId` must be provided."},"fileId":{"type":"string","description":"If you already have an Extend file id (for instance from running a workflow or a previous [file upload](https://docs.extend.ai/2025-04-21/developers/api-reference/file-endpoints/upload-file)) then you can use that file id when running the parse endpoint so that it leverage any cached data that might be available. The file id will start with \"file_\". One of `fileUrl` or `fileId` must be provided.\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"}},"description":"A file object containing either a URL or a fileId.","title":"ParseAsyncPostRequestBodyContentApplicationJsonSchemaFile"},"ParserRunStatusObject":{"type":"string","enum":["parser_run_status"],"description":"The type of object. Will always be `\"parser_run_status\"`.","title":"ParserRunStatusObject"},"ParserRunStatusStatus":{"type":"string","enum":["PROCESSING","PROCESSED","FAILED"],"description":"The status of the parser run.","title":"ParserRunStatusStatus"},"ParserRunStatus":{"type":"object","properties":{"object":{"$ref":"#/components/schemas/ParserRunStatusObject","description":"The type of object. Will always be `\"parser_run_status\"`."},"id":{"type":"string","description":"A unique identifier for the parser run. Will always start with `\"parser_run_\"`\n\nExample: `\"parser_run_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"status":{"$ref":"#/components/schemas/ParserRunStatusStatus","description":"The status of the parser run."},"failureReason":{"type":"string","description":"The reason for failure if status is \"FAILED\"."}},"required":["object","id","status"],"description":"Minimal parser run status object without parser results.","title":"ParserRunStatus"},"ParserRunsIdGetParametersResponseType":{"type":"string","enum":["json","url"],"title":"ParserRunsIdGetParametersResponseType"},"ParserRunsIdGetResponsesContentApplicationJsonSchemaParserRun":{"oneOf":[{"$ref":"#/components/schemas/ParserRunStatus"},{"$ref":"#/components/schemas/ParserRun"}],"title":"ParserRunsIdGetResponsesContentApplicationJsonSchemaParserRun"},"parserRun_get_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"warning":{"type":"string","description":"Warning message about missing API version header if applicable"},"parserRun":{"$ref":"#/components/schemas/ParserRunsIdGetResponsesContentApplicationJsonSchemaParserRun"}},"required":["success","parserRun"],"title":"parserRun_get_Response_200"},"parserRun_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"parserRunId":{"type":"string","description":"The ID of the deleted parser run"},"message":{"type":"string","description":"Confirmation message"}},"required":["success","parserRunId","message"],"title":"parserRun_delete_Response_200"},"ProvidedJsonOutput":{"type":"object","properties":{"value":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["value"],"description":"The output from a JSON Schema processor","title":"ProvidedJsonOutput"},"ProvidedExtractionFieldResultType":{"type":"string","enum":["string","number","currency","boolean","date","array","enum","object","signature"],"description":"The type of the extraction field result","title":"ProvidedExtractionFieldResultType"},"ProvidedExtractionFieldResult":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this field"},"value":{"description":"The extracted value. More details can be found [here](https://docs.extend.ai/2025-04-21/product/legacy/output-type-legacy#extraction-output-type-fields-array)."},"type":{"$ref":"#/components/schemas/ProvidedExtractionFieldResultType","description":"The type of the extraction field result"},"confidence":{"type":"number","format":"double","default":1,"description":"A value between 0 and 1 indicating confidence in the extraction. Will be set to 1 if not provided."},"page":{"type":["number","null"],"format":"double","description":"The page number where this field was extracted from"}},"required":["id","value"],"title":"ProvidedExtractionFieldResult"},"ProvidedFieldsArrayOutput":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProvidedExtractionFieldResult"},"description":"A mapping of field names to their extracted values","title":"ProvidedFieldsArrayOutput"},"ProvidedExtractionOutput":{"oneOf":[{"$ref":"#/components/schemas/ProvidedJsonOutput"},{"$ref":"#/components/schemas/ProvidedFieldsArrayOutput"}],"title":"ProvidedExtractionOutput"},"ProvidedClassifierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this classification"},"type":{"type":"string","description":"The type of classification"},"confidence":{"type":"number","format":"double","default":1,"description":"A value between 0 and 1 indicating the model's confidence in the classification, where 1 represents maximum confidence"}},"required":["id","type"],"title":"ProvidedClassifierOutput"},"ProvidedSplitterOutputSplitsItems":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for this split"},"classificationId":{"type":"string","description":"ID of the classification type (set in the processor config)"},"type":{"type":"string","description":"The type of the split document (set in the processor config), corresponds to the classificationId"},"observation":{"type":"string","description":"Explanation of the results"},"identifier":{"type":"string","description":"Identifier for the split document (e.g. invoice number)"},"startPage":{"type":"integer","description":"The start page of the split document"},"endPage":{"type":"integer","description":"The end page of the split document"}},"required":["id","classificationId","type","startPage","endPage"],"title":"ProvidedSplitterOutputSplitsItems"},"ProvidedSplitterOutput":{"type":"object","properties":{"splits":{"type":"array","items":{"$ref":"#/components/schemas/ProvidedSplitterOutputSplitsItems"}}},"required":["splits"],"title":"ProvidedSplitterOutput"},"ProvidedProcessorOutput":{"oneOf":[{"$ref":"#/components/schemas/ProvidedExtractionOutput"},{"$ref":"#/components/schemas/ProvidedClassifierOutput"},{"$ref":"#/components/schemas/ProvidedSplitterOutput"}],"title":"ProvidedProcessorOutput"},"WorkflowRunFileInputOutputsItems":{"type":"object","properties":{"processorId":{"type":"string","description":"The ID of the processor that the output is associated with.\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"output":{"$ref":"#/components/schemas/ProvidedProcessorOutput","description":"The output that is being overridden. The structure will depend on the processor type. More details can be found on the \"output type\" page for the corresponding processor, in the guides section.\n"}},"required":["processorId","output"],"title":"WorkflowRunFileInputOutputsItems"},"WorkflowRunFileInput":{"type":"object","properties":{"fileName":{"type":"string","description":"The name of the file to be processed. If not provided, the file name will be inferred from the URL. It is highly recommended to include this parameter for legibility."},"fileUrl":{"type":"string","description":"A URL where the file can be downloaded from. If you use presigned URLs, we recommend an expiration time of 5-15 minutes. One of a `fileUrl` or `fileId` must be provided.\n"},"fileId":{"type":"string","description":"Extend's internal ID for the file. It will always start with \"file_\". One of a `fileUrl` or `fileId` must be provided. You can view a file ID from the Extend UI, for instance from running a parser or from a previous file creation. If you provide a `fileId`, any parsed data will be reused.\n\nExample: `\"file_Zk9mNP12Qw4yTv8BdR3H\"`\n"},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRunFileInputOutputsItems"},"description":"Predetermined outputs that can be used to override the outputs that are generated. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known.\n"}},"description":"A file object that can be specified using either a URL or an existing file ID for workflow runs.\n","title":"WorkflowRunFileInput"},"WorkflowStatus":{"type":"string","enum":["PENDING","PROCESSING","NEEDS_REVIEW","REJECTED","PROCESSED","FAILED","CANCELLED","CANCELLING"],"description":"The status of a workflow run:\n* `\"PENDING\"` - The workflow run is waiting to be processed\n* `\"PROCESSING\"` - The workflow run is currently processing\n* `\"NEEDS_REVIEW\"` - The workflow run requires manual review\n* `\"REJECTED\"` - The workflow run was rejected during review\n* `\"PROCESSED\"` - The workflow run completed successfully\n* `\"FAILED\"` - The workflow run encountered an error\n* `\"CANCELLED\"` - The workflow run was cancelled\n* `\"CANCELLING\"` - The workflow run is being cancelled\n","title":"WorkflowStatus"},"StepRunStatus":{"type":"string","enum":["PENDING","PROCESSING","PROCESSED","FAILED","CANCELLED"],"description":"The status of the workflow step run:\n* `\"PENDING\"` - The step run is waiting to be executed\n* `\"PROCESSING\"` - The step run is currently executing\n* `\"PROCESSED\"` - The step run completed successfully\n* `\"FAILED\"` - The step run encountered an error\n* `\"CANCELLED\"` - The step run was cancelled\n","title":"StepRunStatus"},"StepRunStepType":{"type":"string","enum":["EXTERNAL_DATA_VALIDATION","RULE_VALIDATION"],"description":"The type of workflow step:\n* `\"EXTERNAL_DATA_VALIDATION\"` - Validates data against an external source\n* `\"RULE_VALIDATION\"` - Validates data against defined rules\n","title":"StepRunStepType"},"StepRunStep":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"workflow_step\"`.\n"},"id":{"type":"string","description":"The ID of the workflow step.\n\nExample: `\"step_xKm9pNv3qWsY_jL2tR5Dh\"`\n"},"name":{"type":"string","description":"The name of the workflow step.\n\nExample: `\"Validate Invoice Total\"`\n"},"type":{"$ref":"#/components/schemas/StepRunStepType","description":"The type of workflow step:\n* `\"EXTERNAL_DATA_VALIDATION\"` - Validates data against an external source\n* `\"RULE_VALIDATION\"` - Validates data against defined rules\n"}},"required":["object","id","name","type"],"title":"StepRunStep"},"StepRunOutputRulesItemsFailureReason":{"type":"string","enum":["RULE_FAILED","PARSE_ERROR","VALUE_ERROR"],"description":"If the validation rule is not valid, then this describes why the rule failed.\n* `\"RULE_FAILED\"` - The formula evaluated to `false` or `null`\n* `\"PARSE_ERROR\"` - The formula could not be parsed\n* `\"VALUE_ERROR\"` - An error occurred while evaluating the formula\n","title":"StepRunOutputRulesItemsFailureReason"},"StepRunOutputRulesItems":{"type":"object","properties":{"name":{"type":"string","description":"The name of the validation rule."},"valid":{"type":"boolean","description":"Indicates whether this validation rule passed or not. This field will be `true` only if the formula evaluates to `true`. If the rule's formula is array valued, then this field will only be `true` if the formula evaluates to `true` for every item in the array.\n"},"validArray":{"type":"array","items":{"type":"string"},"description":"Only present if the validation rule's formula is array valued. This field contains the formula's evaluated result for every item in the array.\n"},"failureReason":{"$ref":"#/components/schemas/StepRunOutputRulesItemsFailureReason","description":"If the validation rule is not valid, then this describes why the rule failed.\n* `\"RULE_FAILED\"` - The formula evaluated to `false` or `null`\n* `\"PARSE_ERROR\"` - The formula could not be parsed\n* `\"VALUE_ERROR\"` - An error occurred while evaluating the formula\n"},"error":{"type":"string","description":"If the `failureReason` is `PARSE_ERROR` or `VALUE_ERROR`, then this field contains the error's details.\n"}},"required":["name","valid"],"title":"StepRunOutputRulesItems"},"StepRunOutput":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/StepRunOutputRulesItems"}}},"description":"The output of the WorkflowStepRun. The shape of the output depends on the type of the WorkflowStep in the `step` field:\n* For `\"EXTERNAL_DATA_VALIDATION\"` steps - The output will be the same object that was returned by the external endpoint configured for this step\n* For `\"RULE_VALIDATION\"` steps - See the below shape:\n","title":"StepRunOutput"},"StepRun":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"workflow_step_run\"`.\n"},"id":{"type":"string","description":"The ID of the workflow step run.\n\nExample: `\"workflow_step_run_xKm9pNv3qWsY_jL2tR5Dh\"`\n"},"status":{"$ref":"#/components/schemas/StepRunStatus","description":"The status of the workflow step run:\n* `\"PENDING\"` - The step run is waiting to be executed\n* `\"PROCESSING\"` - The step run is currently executing\n* `\"PROCESSED\"` - The step run completed successfully\n* `\"FAILED\"` - The step run encountered an error\n* `\"CANCELLED\"` - The step run was cancelled\n"},"step":{"$ref":"#/components/schemas/StepRunStep"},"output":{"$ref":"#/components/schemas/StepRunOutput","description":"The output of the WorkflowStepRun. The shape of the output depends on the type of the WorkflowStep in the `step` field:\n* For `\"EXTERNAL_DATA_VALIDATION\"` steps - The output will be the same object that was returned by the external endpoint configured for this step\n* For `\"RULE_VALIDATION\"` steps - See the below shape:\n"}},"required":["object","id","status","step"],"title":"StepRun"},"Workflow":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"workflow\"`.\n"},"id":{"type":"string","description":"The ID of the workflow.\n\nExample: `\"workflow_BMlfq_yWM3sT-ZzvCnA3f\"`\n"},"version":{"type":"string","description":"The version of the workflow.\n\nExamples: `\"3\"`, `\"draft\"`\n"},"name":{"type":"string","description":"The name of the workflow.\n\nExample: `\"Invoice Processing\"`\n"}},"required":["object","id","version","name"],"title":"Workflow"},"WorkflowRunCredits":{"type":"object","properties":{"credits":{"type":"number","format":"double","description":"The number of credits consumed for processing in this workflow run."}},"required":["credits"],"description":"These are usage credits for workflow runs.\n\nThis field will not be returned for workflow runs created before October 7, 2025, or for customers on legacy billing systems.\n\nFor more details on how credits work, see our [Credits Guide](https://docs.extend.ai/2025-04-21/product/general/how-credits-work).\n","title":"WorkflowRunCredits"},"WorkflowRun":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"workflow_run\"`.\n"},"id":{"type":"string","description":"The ID of the workflow run.\n\nExample: `\"workflow_run_xKm9pNv3qWsY_jL2tR5Dh\"`\n"},"name":{"type":"string","description":"The name of the workflow run.\n\nExample: `\"myFirstFile.pdf\"`\n"},"url":{"type":"string","description":"A URL to view this workflow run in the Extend UI.\n\nExample: `\"https://dashboard.extend.ai/workflows/workflow_Bk9mNp2qWs5_xL8vR4tYh?workflowRunId=workflow_run_Zj3nMx7ZPd9f4c2WQ_kAg\"`\n"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"metadata":{"$ref":"#/components/schemas/JsonObject","description":"The metadata that was passed in when running the Workflow.\n"},"batchId":{"type":"string","description":"The batch ID of the WorkflowRun. If this WorkflowRun was created as part of a batch of files, all runs in that batch will have the same batch ID.\n\nExample: `\"batch_7Ws31-F5\"`\n"},"files":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"failureReason":{"type":"string","description":"The reason why the workflow run failed. Will only be included if the workflow run status is \"FAILED\".\n"},"failureMessage":{"type":"string","description":"A more detailed message about the failure. Will only be included if the workflow run status is \"FAILED\".\n"},"initialRunAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow run was created. Will follow the RFC 3339 format.\n\nExample: `\"2025-04-28T17:01:39.285Z\"`\n"},"reviewedBy":{"type":"string","description":"The email address of the person who reviewed the workflow run. Will not be included if the workflow run has not been reviewed.\n\nExample: `\"jane.doe@example.com\"`\n"},"reviewed":{"type":"boolean","description":"Whether the workflow run has been reviewed.\n"},"rejectionNote":{"type":"string","description":"A note that is added if a workflow run is rejected.\n\nExample: `\"Invalid invoice format\"`\n"},"reviewedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow run was reviewed. Will follow the RFC 3339 format. Will not be included if the workflow run has not been reviewed.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"},"startTime":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow run started executing. This will always be after the `initialRunAt` time. Will follow the RFC 3339 format. Will not be included if the workflow run has not started executing.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"endTime":{"type":"string","format":"date-time","description":"The time (in UTC) that the workflow finished executing. Will follow the RFC 3339 format. Will not be included if the workflow run has not finished executing.\n\nExample: `\"2024-03-21T15:35:00Z\"`\n"},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/ProcessorRun"}},"stepRuns":{"type":"array","items":{"$ref":"#/components/schemas/StepRun"},"description":"An array of WorkflowStepRun objects. Each WorkflowStepRun represents a single run of a WorkflowStep and contains details about the step and the run's output.\n\nNote: This field currently supports External Data Validation and Rule Validation step types. Document processor run outputs are included in the outputs field.\n"},"workflow":{"$ref":"#/components/schemas/Workflow"},"usage":{"$ref":"#/components/schemas/WorkflowRunCredits"}},"required":["object","id","name","url","status","metadata","files","initialRunAt","reviewed","outputs","stepRuns","workflow"],"title":"WorkflowRun"},"workflowRun_create_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"workflowRuns":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRun"},"description":"An array of WorkflowRun objects, with each WorkflowRun corresponding to a single File that was passed in."}},"required":["success","workflowRuns"],"title":"workflowRun_create_Response_200"},"workflowRun_get_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"workflowRun":{"$ref":"#/components/schemas/WorkflowRun"}},"required":["success","workflowRun"],"title":"workflowRun_get_Response_200"},"WorkflowRunSummary":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the workflow run.\n\nExample: `\"workflow_run_Zk9mNP12Qw4-yTv8BdR3H\"`\n"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"initialRunAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow was initially created. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"reviewedByUser":{"type":"string","description":"The user of the person who reviewed the workflow run. Will not be included if the workflow run has not been reviewed.\n\nExample: `\"jane.doe@example.com\"`\n"},"reviewedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow run was reviewed. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"},"startTime":{"type":"string","format":"date-time","description":"The start time (in UTC) that the workflow actually started executing. This occurs after the `initialRunAt` time. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"endTime":{"type":"string","format":"date-time","description":"The end time (in UTC) that the workflow finished. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:35:00Z\"`\n"},"workflowId":{"type":"string","description":"The ID of the workflow that was run. Will always start with \"workflow\".\n\nExample: `\"workflow_BMdfq_yWM3sT-ZzvCnA3f\"`\n"},"workflowName":{"type":"string","description":"The name of the workflow that was run.\n\nExample: `\"Invoice Processing\"`\n"},"workflowVersionId":{"type":"string","description":"The ID of the workflow version that was run. Will always start with \"workflow_version\".\n\nExample: `\"workflow_version_Zk9mNP12Qw4-yTv8BdR3H\"`\n"},"batchId":{"type":"string","description":"The batch ID of the WorkflowRun. If that WorkflowRun was created from a batch of files, all runs in that batch will have the same batch ID.\n\nExample: `\"batch_7Ws31-F5\"`\n"},"rejectionNote":{"type":"string","description":"The note that was added when the workflow run was rejected.\n\nExample: `\"Invalid invoice format\"`\n"},"createdAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow run was created. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:29:55Z\"`\n"},"updatedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow run was last updated. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"},"usage":{"$ref":"#/components/schemas/WorkflowRunCredits"}},"required":["id","status","workflowId","workflowName","workflowVersionId","createdAt","updatedAt"],"title":"WorkflowRunSummary"},"workflowRun_list_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"workflowRuns":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRunSummary"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"}},"required":["success","workflowRuns"],"title":"workflowRun_list_Response_200"},"workflowRun_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"workflowRun":{"$ref":"#/components/schemas/WorkflowRun"}},"required":["success","workflowRun"],"title":"workflowRun_update_Response_200"},"WorkflowRunsWorkflowRunIdCancelPostResponsesContentApplicationJsonSchemaWorkflowRun":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"workflow_run\"`.\n"},"id":{"type":"string","description":"The ID of the workflow run.\n\nExample: `\"workflow_run_xKm9pNv3qWsY_jL2tR5Dh\"`\n"},"name":{"type":"string","description":"The name of the workflow run.\n\nExample: `\"myFirstFile.pdf\"`\n"},"url":{"type":"string","description":"A URL to view this workflow run in the Extend UI.\n\nExample: `\"https://dashboard.extend.ai/workflows/workflow_Bk9mNp2qWs5_xL8vR4tYh?workflowRunId=workflow_run_Zj3nMx7ZPd9f4c2WQ_kAg\"`\n"},"status":{"$ref":"#/components/schemas/WorkflowStatus"},"metadata":{"$ref":"#/components/schemas/JsonObject","description":"The metadata that was passed in when running the Workflow.\n"},"batchId":{"type":"string","description":"The batch ID of the WorkflowRun. If this WorkflowRun was created as part of a batch of files, all runs in that batch will have the same batch ID.\n\nExample: `\"batch_7Ws31-F5\"`\n"},"files":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"failureReason":{"type":"string","description":"The reason why the workflow run failed. Will only be included if the workflow run status is \"FAILED\".\n"},"failureMessage":{"type":"string","description":"A more detailed message about the failure. Will only be included if the workflow run status is \"FAILED\".\n"},"initialRunAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow run was created. Will follow the RFC 3339 format.\n\nExample: `\"2025-04-28T17:01:39.285Z\"`\n"},"reviewedBy":{"type":"string","description":"The email address of the person who reviewed the workflow run. Will not be included if the workflow run has not been reviewed.\n\nExample: `\"jane.doe@example.com\"`\n"},"reviewed":{"type":"boolean","description":"Whether the workflow run has been reviewed.\n"},"rejectionNote":{"type":"string","description":"A note that is added if a workflow run is rejected.\n\nExample: `\"Invalid invoice format\"`\n"},"reviewedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow run was reviewed. Will follow the RFC 3339 format. Will not be included if the workflow run has not been reviewed.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"},"startTime":{"type":"string","format":"date-time","description":"The time (in UTC) at which the workflow run started executing. This will always be after the `initialRunAt` time. Will follow the RFC 3339 format. Will not be included if the workflow run has not started executing.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"endTime":{"type":"string","format":"date-time","description":"The time (in UTC) that the workflow finished executing. Will follow the RFC 3339 format. Will not be included if the workflow run has not finished executing.\n\nExample: `\"2024-03-21T15:35:00Z\"`\n"},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/ProcessorRun"}},"stepRuns":{"type":"array","items":{"$ref":"#/components/schemas/StepRun"},"description":"An array of WorkflowStepRun objects. Each WorkflowStepRun represents a single run of a WorkflowStep and contains details about the step and the run's output.\n\nNote: This field currently supports External Data Validation and Rule Validation step types. Document processor run outputs are included in the outputs field.\n"},"workflow":{"$ref":"#/components/schemas/Workflow"},"usage":{"$ref":"#/components/schemas/WorkflowRunCredits"}},"required":["object","id","name","url","status","metadata","files","initialRunAt","reviewed","outputs","stepRuns","workflow"],"title":"WorkflowRunsWorkflowRunIdCancelPostResponsesContentApplicationJsonSchemaWorkflowRun"},"workflowRun_cancel_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"workflowRun":{"$ref":"#/components/schemas/WorkflowRunsWorkflowRunIdCancelPostResponsesContentApplicationJsonSchemaWorkflowRun"}},"required":["success","workflowRun"],"title":"workflowRun_cancel_Response_200"},"workflowRun_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"workflowRunId":{"type":"string","description":"The ID of the deleted workflow run"},"message":{"type":"string","description":"Confirmation message"}},"required":["success","workflowRunId","message"],"title":"workflowRun_delete_Response_200"},"workflow_create_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"workflow":{"$ref":"#/components/schemas/Workflow"}},"required":["success","workflow"],"title":"workflow_create_Response_200"},"BatchWorkflowRunFileInput":{"type":"object","properties":{"fileName":{"type":"string","description":"The name to associate with the file. If not provided when using `fileUrl`, the name may be inferred from the URL. This param is only for your reference, and will be rendered in our dashboard, it is not used by the workflow."},"fileUrl":{"type":"string","description":"A URL where the file can be downloaded from. If you use presigned URLs, we suggest a slightly longer expiration time, ideally 30 minutes for a worst case scenario. One of a `fileUrl` or `fileId` must be provided."},"fileId":{"type":"string","description":"Extend's internal ID for the file. It will always start with `file_`. One of a `fileUrl` or `fileId` must be provided. You can view a file ID from the Extend UI, for instance from running a parser or from a previous file creation. If you provide a `fileId`, any parsed data will be reused.\n\nExample: `\"file_Zk9mNP12Qw4yTv8BdR3H\"`\n"}},"description":"Input file for batch workflow runs.","title":"BatchWorkflowRunFileInput"},"WorkflowRunsBatchPostRequestBodyContentApplicationJsonSchemaInputsItemsSecrets":{"type":"object","properties":{},"description":"An optional object containing secrets to be used by processors within the workflow for this specific run.","title":"WorkflowRunsBatchPostRequestBodyContentApplicationJsonSchemaInputsItemsSecrets"},"WorkflowRunsBatchPostRequestBodyContentApplicationJsonSchemaInputsItems":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/BatchWorkflowRunFileInput","description":"The file to be processed. Either `file` or `rawText` must be provided for each input."},"rawText":{"type":"string","description":"A string containing raw text data to be processed. This will be treated as a `.txt` file by the workflow. Use the `file` parameter for structured data or specific file types. Either `file` or `rawText` must be provided for each input."},"metadata":{"$ref":"#/components/schemas/JsonObject","description":"An optional object containing arbitrary key-value pairs to associate with this specific workflow run. This metadata will be included in webhook payloads and responses when fetching the workflow run details."},"secrets":{"$ref":"#/components/schemas/WorkflowRunsBatchPostRequestBodyContentApplicationJsonSchemaInputsItemsSecrets","description":"An optional object containing secrets to be used by processors within the workflow for this specific run."}},"title":"WorkflowRunsBatchPostRequestBodyContentApplicationJsonSchemaInputsItems"},"batchWorkflowRun_create_Response_200":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates whether the batch request was successfully accepted and queued. `true` signifies success."},"batchId":{"type":"string","description":"A unique identifier for the submitted batch. This ID can be used to correlate the workflow runs created by this request. You can find this `batchId` associated with individual runs when listing workflow runs or in webhook payloads."}},"required":["success","batchId"],"title":"batchWorkflowRun_create_Response_200"},"workflowRunOutput_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"workflowRun":{"$ref":"#/components/schemas/WorkflowRun"}},"required":["success","workflowRun"],"title":"workflowRunOutput_update_Response_200"},"file_upload_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"file":{"$ref":"#/components/schemas/File"}},"required":["success","file"],"title":"file_upload_Response_200"},"FilesUploadPostResponsesContentApplicationJsonSchemaCode":{"type":"string","enum":["FILE_TYPE_NOT_SUPPORTED","FILE_SIZE_TOO_LARGE","CORRUPT_FILE","PASSWORD_PROTECTED_FILE"],"title":"FilesUploadPostResponsesContentApplicationJsonSchemaCode"},"UploadFileRequestBadRequestError":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string","description":"Error message"},"code":{"$ref":"#/components/schemas/FilesUploadPostResponsesContentApplicationJsonSchemaCode"}},"title":"UploadFileRequestBadRequestError"},"file_get_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"file":{"$ref":"#/components/schemas/File"}},"required":["success","file"],"title":"file_get_Response_200"},"file_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"fileId":{"type":"string","description":"The ID of the deleted file"},"message":{"type":"string","description":"Confirmation message"}},"required":["success","fileId","message"],"title":"file_delete_Response_200"},"file_list_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"files":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"}},"required":["success","files"],"title":"file_list_Response_200"},"createFile_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"file":{"$ref":"#/components/schemas/File"}},"title":"createFile_Response_200"},"EditPostRequestBodyContentApplicationJsonSchemaFile":{"type":"object","properties":{"fileName":{"type":"string","description":"The name of the file. If not set, the file name is taken from the url."},"fileUrl":{"type":"string","description":"A URL to download the file. For production use cases, we recommend using presigned URLs with a 5-15 minute expiration time. One of `fileUrl` or `fileId` must be provided."},"fileId":{"type":"string","description":"If you already have an Extend file id (for instance from running a workflow or a previous file upload) then you can use that file id when running the edit endpoint. The file id will start with \"file_\". One of `fileUrl` or `fileId` must be provided.\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"}},"description":"A file object containing either a URL or a fileId.","title":"EditPostRequestBodyContentApplicationJsonSchemaFile"},"EditRootJsonSchemaType":{"type":"string","enum":["object"],"description":"Must be \"object\" for the root schema","title":"EditRootJsonSchemaType"},"EditJsonSchemaExtendEditFieldType":{"type":"string","enum":["text","checkbox","radio","dropdown","optionList","signature","table","unknown"],"description":"The PDF field type to edit. Allowed values depend on the schema type:\n* `[\"string\", \"null\"]` → `text`, `signature`\n* `[\"number\", \"null\"]` → `text`\n* `[\"integer\", \"null\"]` → `text`\n* `[\"boolean\", \"null\"]` → `checkbox`, `radio`\n* `\"array\"` → `text`, `table`\n* `\"object\"` → `signature`\n* enum fields (no type) → `radio`, `optionList`, `dropdown`\n","title":"EditJsonSchemaExtendEditFieldType"},"EditBoundingBox":{"type":"object","properties":{"left":{"type":"number","format":"double","description":"The left coordinate of the bounding box (pixels)"},"top":{"type":"number","format":"double","description":"The top coordinate of the bounding box (pixels)"},"right":{"type":"number","format":"double","description":"The right coordinate of the bounding box (pixels)"},"bottom":{"type":"number","format":"double","description":"The bottom coordinate of the bounding box (pixels)"}},"required":["left","top","right","bottom"],"description":"Bounding box coordinates for the field location in the PDF (pixel coordinates)","title":"EditBoundingBox"},"EditTextOptions":{"type":"object","properties":{"fontSize":{"type":"number","format":"double","description":"Font size in points"},"fontColor":{"type":"array","items":{"type":"number","format":"double"},"description":"RGB color values (0-255) for text color"},"font":{"type":"string","description":"Font family name"},"combing":{"type":"boolean","description":"Whether this is a combed field (like SSN fields with individual character boxes)"},"maxLength":{"type":"integer","description":"Maximum number of characters allowed"}},"description":"Text styling options for text fields","title":"EditTextOptions"},"EditJsonSchemaExtendEditImage":{"type":"object","properties":{"image_url":{"type":"string","description":"URL of the image to place in the signature field."}},"required":["image_url"],"description":"Image fill for signature fields. Only PNG and JPEG image URLs are supported.","title":"EditJsonSchemaExtendEditImage"},"EditObjectJsonSchemaType":{"type":"string","enum":["object"],"description":"Must be \"object\" for object schemas","title":"EditObjectJsonSchemaType"},"EditObjectJsonSchemaExtendEditFieldType":{"type":"string","enum":["signature"],"description":"The PDF field type. For object schemas, must be \"signature\".","title":"EditObjectJsonSchemaExtendEditFieldType"},"EditObjectJSONSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/EditObjectJsonSchemaType","description":"Must be \"object\" for object schemas"},"description":{"type":"string","description":"Description of the field"},"extend_edit:field_type":{"$ref":"#/components/schemas/EditObjectJsonSchemaExtendEditFieldType","description":"The PDF field type. For object schemas, must be \"signature\"."},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EditJSONSchema"},"description":"Nested properties. Each property follows the EditJSONSchema structure."},"required":{"type":"array","items":{"type":"string"},"description":"List of required property names"},"additionalProperties":{"type":"boolean","description":"Whether additional properties are allowed"}},"description":"Schema definition for an object field in a PDF edit schema. Used for signature fields and as items schema for arrays/tables.\n","title":"EditObjectJSONSchema"},"EditJSONSchema":{"type":"object","properties":{"type":{"description":"The JSON schema type of the field. Can be:\n* A string: \"array\" or \"object\"\n* A nullable tuple array: [\"string\", \"null\"], [\"number\", \"null\"], [\"integer\", \"null\"], [\"boolean\", \"null\"]\n* Omitted for enum fields (use enum property instead)\n"},"description":{"type":"string","description":"Description of the field"},"extend_edit:field_type":{"$ref":"#/components/schemas/EditJsonSchemaExtendEditFieldType","description":"The PDF field type to edit. Allowed values depend on the schema type:\n* `[\"string\", \"null\"]` → `text`, `signature`\n* `[\"number\", \"null\"]` → `text`\n* `[\"integer\", \"null\"]` → `text`\n* `[\"boolean\", \"null\"]` → `checkbox`, `radio`\n* `\"array\"` → `text`, `table`\n* `\"object\"` → `signature`\n* enum fields (no type) → `radio`, `optionList`, `dropdown`\n"},"extend_edit:bbox":{"$ref":"#/components/schemas/EditBoundingBox"},"extend_edit:bboxes":{"type":"array","items":{"$ref":"#/components/schemas/EditBoundingBox"},"description":"Array of bounding boxes for radio enums. Enum at index i corresponds to bbox at index i."},"extend_edit:page_index":{"type":"integer","description":"Zero-based page index where the field should be placed"},"extend_edit:text_edit_options":{"$ref":"#/components/schemas/EditTextOptions"},"extend_edit:column_width":{"type":"number","format":"double","description":"Width of the column as a percentage (for table fields)"},"extend_edit:value":{"description":"The value to fill into this field. Can be any type. This will force the value at this field to be filled with this value. If a value is not provided, we will attempt to generate or infer one based on the instructions."},"extend_edit:image":{"$ref":"#/components/schemas/EditJsonSchemaExtendEditImage","description":"Image fill for signature fields. Only PNG and JPEG image URLs are supported."},"extend_edit:row_heights":{"type":"array","items":{"type":"number","format":"double"},"description":"Array of row height percentages for array/table fields (e.g. [0.25, 0.50, 0.25])"},"items":{"$ref":"#/components/schemas/EditObjectJSONSchema","description":"Schema for array items (when type is \"array\"). Must be an EditObjectJSONSchema."},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EditJSONSchema"},"description":"Nested properties for object types. Each property follows the EditJSONSchema structure."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for enum/dropdown/radio fields"},"maxItems":{"type":"integer","description":"Maximum number of rows for array/table fields"},"required":{"type":"array","items":{"type":"string"},"description":"List of required property names (for object types)"},"additionalProperties":{"type":"boolean","description":"Whether additional properties are allowed (for object types)"}},"description":"Schema definition for a field to edit in a PDF. This is a union type that supports:\n* `EditStringJSONSchema` - type: [\"string\", \"null\"], field_type: \"text\" | \"signature\"\n* `EditNumberJSONSchema` - type: [\"number\", \"null\"], field_type: \"text\"\n* `EditIntegerJSONSchema` - type: [\"integer\", \"null\"], field_type: \"text\"\n* `EditBooleanJSONSchema` - type: [\"boolean\", \"null\"], field_type: \"checkbox\" | \"radio\"\n* `EditArrayJSONSchema` - type: \"array\", field_type: \"text\" | \"table\"\n* `EditEnumJSONSchema` - has enum property (no type field), field_type: \"radio\" | \"optionList\" | \"dropdown\"\n* `EditObjectJSONSchema` - type: \"object\", field_type: \"signature\"\n\nAll variants share common `extend_edit:*` properties for positioning and styling.\n","title":"EditJSONSchema"},"EditDependentRequired":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Map of field names to additional fields that become required when the key field is present.","title":"EditDependentRequired"},"EditConditionalObjectPropertySchemaType":{"type":"string","enum":["object"],"description":"Must be `object` for nested object conditional schemas.","title":"EditConditionalObjectPropertySchemaType"},"EditConditionalObjectPropertySchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/EditConditionalObjectPropertySchemaType","description":"Must be `object` for nested object conditional schemas."},"description":{"type":"string","description":"Description of the nested object constraint."},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EditConditionalPropertySchema"},"description":"Nested conditional property constraints."},"required":{"type":"array","items":{"type":"string"},"description":"Required nested properties."},"additionalProperties":{"type":"boolean","description":"Whether additional nested properties are allowed."}},"description":"Nested object/row schema used inside conditional array and object constraints.","title":"EditConditionalObjectPropertySchema"},"EditConditionalPropertySchema":{"type":"object","properties":{"type":{"description":"JSON Schema type for the conditional property. Can be a simple type such as `\"object\"` or `\"array\"`,\na nullable tuple like `[\"string\", \"null\"]`, or omitted for enum-only constraints.\n"},"description":{"type":"string","description":"Description of the field constraint."},"enum":{"type":"array","items":{"type":"string"},"description":"Allowed values for enum-based conditional constraints."},"items":{"$ref":"#/components/schemas/EditConditionalObjectPropertySchema","description":"Nested array item schema for conditional array constraints."},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EditConditionalPropertySchema"},"description":"Nested object property constraints."},"required":{"type":"array","items":{"type":"string"},"description":"Required nested object properties."},"additionalProperties":{"type":"boolean","description":"Whether additional nested object properties are allowed."},"const":{"description":"Exact value that the property must match."},"pattern":{"type":"string","description":"Regular expression that string values must match."},"contains":{"$ref":"#/components/schemas/EditConditionalPropertySchema","description":"Conditional schema that at least one array item must satisfy."},"minimum":{"type":"number","format":"double","description":"Inclusive lower bound for numeric values."},"maximum":{"type":"number","format":"double","description":"Inclusive upper bound for numeric values."},"exclusiveMinimum":{"type":"number","format":"double","description":"Exclusive lower bound for numeric values."},"exclusiveMaximum":{"type":"number","format":"double","description":"Exclusive upper bound for numeric values."},"minLength":{"type":"integer","description":"Minimum string length."},"maxLength":{"type":"integer","description":"Maximum string length."},"minItems":{"type":"integer","description":"Minimum number of array items."},"maxItems":{"type":"integer","description":"Maximum number of array items."},"minContains":{"type":"integer","description":"Minimum number of matching items for `contains`."},"maxContains":{"type":"integer","description":"Maximum number of matching items for `contains`."}},"description":"Field-level schema fragment used inside conditional clauses. These condition objects support nested JSON\nSchema structure such as `type`, `enum`, `items`, `properties`, `required`, and `contains`, but do not\nallow any `extend_edit:*` placement or styling keys.\n","title":"EditConditionalPropertySchema"},"EditConditionalClause":{"type":"object","properties":{"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EditConditionalPropertySchema"},"description":"Conditional field constraints keyed by top-level property name."},"required":{"type":"array","items":{"type":"string"},"description":"List of fields that must be present when this clause applies."},"dependentRequired":{"$ref":"#/components/schemas/EditDependentRequired"},"if":{"$ref":"#/components/schemas/EditConditionalClause"},"then":{"$ref":"#/components/schemas/EditConditionalClause"},"else":{"$ref":"#/components/schemas/EditConditionalClause"},"allOf":{"type":"array","items":{"$ref":"#/components/schemas/EditConditionalClause"},"description":"List of nested conditional clauses that must all match."},"oneOf":{"type":"array","items":{"$ref":"#/components/schemas/EditConditionalClause"},"description":"List of nested conditional clauses where exactly one must match."},"anyOf":{"type":"array","items":{"$ref":"#/components/schemas/EditConditionalClause"},"description":"List of nested conditional clauses where at least one must match."},"not":{"$ref":"#/components/schemas/EditConditionalClause"}},"description":"Recursive conditional clause for edit schemas. Use these clauses with root-level `if` / `then` / `else`,\n`dependentRequired`, and logical combinators to model conditional field requirements. Nested clauses are\nsupported up to 8 levels.\n","title":"EditConditionalClause"},"EditRootJSONSchema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/EditRootJsonSchemaType","description":"Must be \"object\" for the root schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EditJSONSchema"},"description":"Map of field names to their schema definitions"},"required":{"type":"array","items":{"type":"string"},"description":"List of required field names"},"additionalProperties":{"type":"boolean","description":"Whether additional properties are allowed"},"dependentRequired":{"$ref":"#/components/schemas/EditDependentRequired"},"if":{"$ref":"#/components/schemas/EditConditionalClause"},"then":{"$ref":"#/components/schemas/EditConditionalClause"},"else":{"$ref":"#/components/schemas/EditConditionalClause"},"allOf":{"type":"array","items":{"$ref":"#/components/schemas/EditConditionalClause"},"description":"List of conditional clauses that must all match."},"oneOf":{"type":"array","items":{"$ref":"#/components/schemas/EditConditionalClause"},"description":"List of conditional clauses where exactly one must match."},"anyOf":{"type":"array","items":{"$ref":"#/components/schemas/EditConditionalClause"},"description":"List of conditional clauses where at least one must match."},"not":{"$ref":"#/components/schemas/EditConditionalClause"}},"required":["type","properties"],"description":"JSON Schema definition for editing PDF documents. The schema defines the structure and placement of fields to edit.\nIt also supports JSON Schema conditional keywords at the root level, including `dependentRequired`,\n`if` / `then` / `else`, and logical combinators such as `allOf`, `oneOf`, `anyOf`, and `not`.\nConditional property constraints do not accept `extend_edit:*` keys, and nested conditional clauses are\nsupported up to 8 levels to match the Studio editor.\n","title":"EditRootJSONSchema"},"EditPostRequestBodyContentApplicationJsonSchemaConfigAdvancedOptions":{"type":"object","properties":{"flattenPdf":{"type":"boolean","description":"Whether to flatten PDF forms after editing (makes form fields non-editable). Defaults to true."},"tableParsingEnabled":{"type":"boolean","description":"Whether to parse tables as arrays."},"radioEnumsEnabled":{"type":"boolean","description":"Whether to model radio fields as enums. This ensures only one radio widget is filled. Defaults to false."},"nativeFieldsOnly":{"type":"boolean","description":"If enabled, only native AcroForm from the PDF will be imported and used in the schema (skips object detection). Defaults to false."}},"description":"Advanced options for the edit operation.","title":"EditPostRequestBodyContentApplicationJsonSchemaConfigAdvancedOptions"},"EditPostRequestBodyContentApplicationJsonSchemaConfig":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/EditRootJSONSchema"},"instructions":{"type":"string","description":"Custom instructions for the edit operation."},"schemaGenerationInstructions":{"type":"string","description":"Additional instructions used when generating a schema from the document."},"advancedOptions":{"$ref":"#/components/schemas/EditPostRequestBodyContentApplicationJsonSchemaConfigAdvancedOptions","description":"Advanced options for the edit operation."}},"description":"Configuration for the edit operation. Field values should be specified using `extend_edit:value` on each field in the schema.","title":"EditPostRequestBodyContentApplicationJsonSchemaConfig"},"EditRunObject":{"type":"string","enum":["edit_run"],"description":"The type of object. Will always be `\"edit_run\"`.","title":"EditRunObject"},"EditRunEditedFile":{"type":"object","properties":{"fileId":{"type":"string","description":"The identifier of the edited output file."},"downloadUrl":{"type":"string","description":"A presigned URL to download the edited file."}},"description":"Information about the edited output file. Only present when status is \"PROCESSED\".","title":"EditRunEditedFile"},"EditRunStatusObject":{"type":"string","enum":["edit_run_status"],"description":"The type of object. Will always be `\"edit_run_status\"`.","title":"EditRunStatusObject"},"EditRunStatusStatus":{"type":"string","enum":["PROCESSING","PROCESSED","FAILED"],"description":"The status of the edit run.","title":"EditRunStatusStatus"},"EditRunStatus":{"type":"object","properties":{"object":{"$ref":"#/components/schemas/EditRunStatusObject","description":"The type of object. Will always be `\"edit_run_status\"`."},"id":{"type":"string","description":"A unique identifier for the edit run. Will always start with `\"edit_run_\"`\n\nExample: `\"edit_run_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"status":{"$ref":"#/components/schemas/EditRunStatusStatus","description":"The status of the edit run."},"failureReason":{"type":"string","description":"The reason for failure if status is \"FAILED\"."}},"required":["object","id","status"],"description":"Minimal edit run status object without edit results.","title":"EditRunStatus"},"EditConfigAdvancedOptions":{"type":"object","properties":{"flattenPdf":{"type":"boolean","description":"Whether to flatten PDF forms after editing (makes form fields non-editable). Defaults to true."},"tableParsingEnabled":{"type":"boolean","description":"Whether to parse tables as arrays."},"radioEnumsEnabled":{"type":"boolean","description":"Whether to model radio fields as enums. This ensures only one radio widget is filled. Defaults to false."},"nativeFieldsOnly":{"type":"boolean","description":"If enabled, only native AcroForm from the PDF will be imported and used in the schema (skips object detection). Defaults to false."}},"description":"Advanced options for the edit operation.","title":"EditConfigAdvancedOptions"},"EditConfig":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/EditRootJSONSchema"},"instructions":{"type":"string","description":"Custom instructions for the edit operation."},"schemaGenerationInstructions":{"type":"string","description":"Additional instructions used when generating a schema from the document."},"advancedOptions":{"$ref":"#/components/schemas/EditConfigAdvancedOptions","description":"Advanced options for the edit operation."}},"description":"Configuration options for the editing process.","title":"EditConfig"},"EditRunMetrics":{"type":"object","properties":{"processingTimeMs":{"type":"number","format":"double","description":"Total processing time in milliseconds"},"fieldCount":{"type":"integer","description":"The number of fields detected in the document."},"pageCount":{"type":"integer","description":"The number of pages in the document."},"fieldFillingTimeMs":{"type":"number","format":"double","description":"The time taken to fill the fields in the document."},"fieldDetectionTimeMs":{"type":"number","format":"double","description":"The time taken to detect the fields in the document."},"fieldAnnotationTimeMs":{"type":"number","format":"double","description":"The time taken to annotate the fields in the document."}},"description":"Metrics about the editing process.","title":"EditRunMetrics"},"EditRunUsage":{"type":"object","properties":{"credits":{"type":"number","format":"double","description":"The number of credits consumed for this edit operation."}},"description":"Usage credits consumed by this edit run.","title":"EditRunUsage"},"EditRun":{"type":"object","properties":{"object":{"$ref":"#/components/schemas/EditRunObject","description":"The type of object. Will always be `\"edit_run\"`."},"id":{"type":"string","description":"A unique identifier for the edit run. Will always start with `\"edit_run_\"`\n\nExample: `\"edit_run_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"fileId":{"type":"string","description":"The identifier of the input file that was edited."},"editedFile":{"$ref":"#/components/schemas/EditRunEditedFile","description":"Information about the edited output file. Only present when status is \"PROCESSED\"."},"status":{"$ref":"#/components/schemas/EditRunStatus"},"failureReason":{"type":"string","description":"The reason for failure if status is \"FAILED\"."},"config":{"$ref":"#/components/schemas/EditConfig","description":"The configuration used for this edit run."},"output":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The extracted/detected field values from the edited document."},"metrics":{"$ref":"#/components/schemas/EditRunMetrics","description":"Metrics about the editing process."},"usage":{"$ref":"#/components/schemas/EditRunUsage","description":"Usage credits consumed by this edit run."}},"required":["object","id","fileId","status","config","metrics"],"description":"Full edit run object with complete editing results","title":"EditRun"},"EditAsyncPostRequestBodyContentApplicationJsonSchemaFile":{"type":"object","properties":{"fileName":{"type":"string","description":"The name of the file. If not set, the file name is taken from the url."},"fileUrl":{"type":"string","description":"A URL to download the file. For production use cases, we recommend using presigned URLs with a 5-15 minute expiration time. One of `fileUrl` or `fileId` must be provided."},"fileId":{"type":"string","description":"If you already have an Extend file id (for instance from running a workflow or a previous file upload) then you can use that file id when running the edit endpoint. The file id will start with \"file_\". One of `fileUrl` or `fileId` must be provided.\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"}},"description":"A file object containing either a URL or a fileId.","title":"EditAsyncPostRequestBodyContentApplicationJsonSchemaFile"},"EditAsyncPostRequestBodyContentApplicationJsonSchemaConfigAdvancedOptions":{"type":"object","properties":{"flattenPdf":{"type":"boolean","description":"Whether to flatten PDF forms after editing (makes form fields non-editable). Defaults to true."},"tableParsingEnabled":{"type":"boolean","description":"Whether to parse tables as arrays."},"radioEnumsEnabled":{"type":"boolean","description":"Whether to model radio fields as enums. This ensures only one radio widget is filled. Defaults to false."},"nativeFieldsOnly":{"type":"boolean","description":"If enabled, only native AcroForm from the PDF will be imported and used in the schema (skips object detection). Defaults to false."}},"description":"Advanced options for the edit operation.","title":"EditAsyncPostRequestBodyContentApplicationJsonSchemaConfigAdvancedOptions"},"EditAsyncPostRequestBodyContentApplicationJsonSchemaConfig":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/EditRootJSONSchema"},"instructions":{"type":"string","description":"Custom instructions for the edit operation."},"schemaGenerationInstructions":{"type":"string","description":"Additional instructions used when generating a schema from the document."},"advancedOptions":{"$ref":"#/components/schemas/EditAsyncPostRequestBodyContentApplicationJsonSchemaConfigAdvancedOptions","description":"Advanced options for the edit operation."}},"description":"Configuration for the edit operation. Field values should be specified using `extend_edit:value` on each field in the schema.","title":"EditAsyncPostRequestBodyContentApplicationJsonSchemaConfig"},"EditSchemasGeneratePostRequestBodyContentApplicationJsonSchemaFile":{"type":"object","properties":{"fileName":{"type":"string","description":"The name of the file. If not set, the file name is taken from the url."},"fileUrl":{"type":"string","description":"A URL to download the file. For production use cases, we recommend using presigned URLs with a 5-15 minute expiration time. One of `fileUrl` or `fileId` must be provided."},"fileId":{"type":"string","description":"If you already have an Extend file id (for instance from running a workflow or a previous file upload) then you can use that file id when generating an edit schema. The file id will start with \"file_\". One of `fileUrl` or `fileId` must be provided.\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"}},"description":"A file object containing either a URL or a fileId.","title":"EditSchemasGeneratePostRequestBodyContentApplicationJsonSchemaFile"},"EditSchemaGenerationConfigAdvancedOptions":{"type":"object","properties":{"tableParsingEnabled":{"type":"boolean","description":"Whether to parse table regions as arrays. Defaults to false."},"radioEnumsEnabled":{"type":"boolean","description":"Whether to model radio fields as enums. This ensures only one radio widget is filled. Defaults to false."},"nativeFieldsOnly":{"type":"boolean","description":"If enabled, only native AcroForm fields from the PDF will be imported and used in the schema. Defaults to false."}},"description":"Advanced options for schema generation.","title":"EditSchemaGenerationConfigAdvancedOptions"},"EditSchemaGenerationConfig":{"type":"object","properties":{"inputSchema":{"$ref":"#/components/schemas/EditRootJSONSchema","description":"Optional existing edit schema to map onto the detected form fields. When provided, the response may include a `mappingResult`\nthat shows which input schema paths matched the generated form fields.\n"},"instructions":{"type":"string","description":"Custom instructions provided for schema generation."},"advancedOptions":{"$ref":"#/components/schemas/EditSchemaGenerationConfigAdvancedOptions","description":"Advanced options for schema generation."}},"description":"Configuration options for edit schema generation.","title":"EditSchemaGenerationConfig"},"EditSchemaGenerationMappingMatch":{"type":"object","properties":{"inputPath":{"type":"string","description":"The path from the provided `inputSchema`."},"formFieldKey":{"type":"string","description":"The detected form field key matched to the input path."}},"required":["inputPath","formFieldKey"],"description":"A successful mapping between an input schema path and a detected form field.","title":"EditSchemaGenerationMappingMatch"},"EditSchemaGenerationMappingResult":{"type":"object","properties":{"matches":{"type":"array","items":{"$ref":"#/components/schemas/EditSchemaGenerationMappingMatch"},"description":"Fields from the input schema that were successfully mapped to detected form fields."},"unmatchedInputPaths":{"type":"array","items":{"type":"string"},"description":"Input schema field paths that could not be matched to the form."},"unusedFormFieldKeys":{"type":"array","items":{"type":"string"},"description":"Detected form field keys that were not used by the input schema mapping."}},"required":["matches","unmatchedInputPaths","unusedFormFieldKeys"],"description":"Mapping information between an input schema and the detected form fields.","title":"EditSchemaGenerationMappingResult"},"EditSchemaGenerationResponse":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/EditRootJSONSchema","description":"The final generated schema after mapping. If no input schema was provided this will be the same as the annotatedSchema."},"annotatedSchema":{"oneOf":[{"$ref":"#/components/schemas/EditRootJSONSchema"},{"type":"null"}],"description":"The original schema that was detected and annotated from the file."},"mappingResult":{"oneOf":[{"$ref":"#/components/schemas/EditSchemaGenerationMappingResult"},{"type":"null"}],"description":"Mapping information between `inputSchema` paths and detected form fields when an input schema was provided."}},"required":["schema","annotatedSchema","mappingResult"],"description":"The generated schema and optional mapping metadata.","title":"EditSchemaGenerationResponse"},"EditRunsIdGetResponsesContentApplicationJsonSchemaEditRun":{"oneOf":[{"$ref":"#/components/schemas/EditRunStatus"},{"$ref":"#/components/schemas/EditRun"}],"title":"EditRunsIdGetResponsesContentApplicationJsonSchemaEditRun"},"edit_get_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"warning":{"type":"string","description":"Warning message about missing API version header if applicable"},"editRun":{"$ref":"#/components/schemas/EditRunsIdGetResponsesContentApplicationJsonSchemaEditRun"}},"required":["success","editRun"],"title":"edit_get_Response_200"},"edit_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"editRunId":{"type":"string","description":"The ID of the deleted edit run"},"message":{"type":"string","description":"Confirmation message"}},"required":["success","editRunId","message"],"title":"edit_delete_Response_200"},"EditTemplateObject":{"type":"string","enum":["edit_template"],"description":"The type of object. Will always be `\"edit_template\"`.","title":"EditTemplateObject"},"EditTemplate":{"type":"object","properties":{"object":{"$ref":"#/components/schemas/EditTemplateObject","description":"The type of object. Will always be `\"edit_template\"`."},"id":{"type":"string","description":"A unique identifier for the edit template.\n\nExample: `\"edt_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"name":{"type":"string","description":"The name of the edit template."},"description":{"type":["string","null"],"description":"The description of the edit template, if one was provided."},"file":{"$ref":"#/components/schemas/File","description":"The source file associated with this edit template."},"config":{"$ref":"#/components/schemas/EditConfig","description":"Default edit configuration saved on the template. Empty when no edit configuration was saved."},"schemaConfig":{"oneOf":[{"$ref":"#/components/schemas/EditSchemaGenerationConfig"},{"type":"null"}],"description":"Optional schema generation configuration saved on the template."},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the edit template was created."},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the edit template was last updated."}},"required":["object","id","name","description","file","config","schemaConfig","createdAt","updatedAt"],"description":"A saved edit template. Edit templates contain a source file, default edit configuration, and optional schema generation configuration that can be reused for edit runs.\n","title":"EditTemplate"},"edit_getTemplate_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"warning":{"type":"string","description":"Warning message about missing API version header if applicable."},"editTemplate":{"$ref":"#/components/schemas/EditTemplate"}},"required":["success","editTemplate"],"title":"edit_getTemplate_Response_200"},"EvaluationSet":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"evaluation_set\"`.\n"},"id":{"type":"string","description":"The ID of the evaluation set.\n\nExample: `\"ev_2LcgeY_mp2T5yPaEuq5Lw\"`\n"},"name":{"type":"string","description":"The name of the evaluation set.\n\nExample: `\"Invoice Processing Test Set\"`\n"},"description":{"type":"string","description":"A description of the evaluation set.\n\nExample: `\"Q4 2023 vendor invoices for accuracy testing\"`\n"},"processorId":{"type":"string","description":"The ID of the processor associated with this evaluation set.\n\nExample: `\"dp_Xj8mK2pL9nR4vT7qY5wZ\"`\n"},"createdAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the evaluation set was created. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T15:30:00Z\"`\n"},"updatedAt":{"type":"string","format":"date-time","description":"The time (in UTC) at which the evaluation set was last updated. Will follow the RFC 3339 format.\n\nExample: `\"2024-03-21T16:45:00Z\"`\n"}},"required":["object","id","name","description","processorId","createdAt","updatedAt"],"description":"The EvaluationSet object represents an evaluation set in Extend. Evaluation sets are collections of files and expected outputs that are used to evaluate the performance of a given processor in Extend.\n","title":"EvaluationSet"},"evaluationSet_get_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"evaluationSet":{"$ref":"#/components/schemas/EvaluationSet"}},"required":["success","evaluationSet"],"title":"evaluationSet_get_Response_200"},"evaluationSet_list_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"evaluationSets":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSet"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"}},"required":["success","evaluationSets"],"title":"evaluationSet_list_Response_200"},"evaluationSet_create_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"evaluationSet":{"$ref":"#/components/schemas/EvaluationSet"}},"required":["success","evaluationSet"],"title":"evaluationSet_create_Response_200"},"EvaluationSetItem":{"type":"object","properties":{"object":{"type":"string","description":"The type of response. In this case, it will always be `\"evaluation_set_item\"`.\n"},"id":{"type":"string","description":"The ID of the evaluation set item.\n\nExample: `\"evi_kR9mNP12Qw4yTv8BdR3H\"`\n"},"evaluationSetId":{"type":"string","description":"The ID of the evaluation set that this item belongs to.\n\nExample: `\"ev_2LcgeY_mp2T5yPaEuq5Lw\"`\n"},"fileId":{"type":"string","description":"Extend's internal ID for the file. It will always start with \"file_\".\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"expectedOutput":{"$ref":"#/components/schemas/ProvidedProcessorOutput","description":"The expected output that will be used to evaluate the processor's performance. This will confirm to the output type schema of the processor."}},"required":["object","id","evaluationSetId","fileId","expectedOutput"],"description":"The EvaluationSetItem object represents an item in an evaluation set in Extend. Items are the individual files and expected outputs that are used to evaluate the performance of a given processor in Extend.\n","title":"EvaluationSetItem"},"evaluationSetItem_list_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"evaluationSetItems":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSetItem"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"}},"required":["success","evaluationSetItems"],"title":"evaluationSetItem_list_Response_200"},"evaluationSetItem_create_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"evaluationSetItem":{"$ref":"#/components/schemas/EvaluationSetItem"}},"required":["success","evaluationSetItem"],"title":"evaluationSetItem_create_Response_200"},"evaluationSetItem_update_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"evaluationSetItem":{"$ref":"#/components/schemas/EvaluationSetItem"}},"required":["success","evaluationSetItem"],"title":"evaluationSetItem_update_Response_200"},"evaluationSetItem_delete_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"evaluationSetItemId":{"type":"string","description":"The ID of the deleted evaluation set item"},"message":{"type":"string","description":"Confirmation message"}},"required":["success","evaluationSetItemId","message"],"title":"evaluationSetItem_delete_Response_200"},"EvaluationSetItemsBulkPostRequestBodyContentApplicationJsonSchemaItemsItems":{"type":"object","properties":{"fileId":{"type":"string","description":"Extend's internal ID for the file. It will always start with \"file_\".\n\nExample: `\"file_xK9mLPqRtN3vS8wF5hB2cQ\"`\n"},"expectedOutput":{"$ref":"#/components/schemas/ProvidedProcessorOutput","description":"The expected output of the processor when run against the file"}},"required":["fileId","expectedOutput"],"title":"EvaluationSetItemsBulkPostRequestBodyContentApplicationJsonSchemaItemsItems"},"evaluationSetItem_createBatch_Response_200":{"type":"object","properties":{"success":{"type":"boolean"},"evaluationSetItems":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationSetItem"}}},"required":["success","evaluationSetItems"],"title":"evaluationSetItem_createBatch_Response_200"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}