{"openapi":"3.1.0","info":{"title":"Ragie API","version":"1.0.0"},"servers":[{"url":"https://api.ragie.ai"}],"paths":{"/documents":{"post":{"tags":["documents"],"summary":"Create Document","description":"On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`.","operationId":"CreateDocument","security":[{"auth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateDocumentParams"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-usage-example":true,"x-speakeasy-name-override":"create"},"get":{"tags":["documents"],"summary":"List Documents","description":"List all documents sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page.","operationId":"ListDocuments","security":[{"auth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.","examples":[{"department":{"$in":["sales","marketing"]}}],"title":"Filter"},"description":"The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"list","x-speakeasy-max-method-params":0,"x-speakeasy-pagination":{"type":"cursor","inputs":[{"name":"cursor","type":"cursor","in":"parameters"}],"outputs":{"nextCursor":"$.pagination.next_cursor"}}}},"/documents/raw":{"post":{"tags":["documents"],"summary":"Create Document Raw","description":"Ingest a document as raw text. On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`.","operationId":"CreateDocumentRaw","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentRawParams"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"auth":[]}],"x-speakeasy-name-override":"createRaw"}},"/documents/url":{"post":{"tags":["documents"],"summary":"Create Document From Url","description":"Ingest a document from a publicly accessible URL. On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. PDF files over 2000 pages are not supported. Other static document files over 10000 pages are not supported.","operationId":"CreateDocumentFromUrl","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentFromUrlParams"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"auth":[]}]}},"/documents/{document_id}":{"get":{"tags":["documents"],"summary":"Get Document","operationId":"GetDocument","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGet"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"get"},"delete":{"tags":["documents"],"summary":"Delete Document","operationId":"DeleteDocument","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"async","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, performs document deletion asynchronously","examples":[false],"default":false,"title":"Async"},"description":"If true, performs document deletion asynchronously"},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDelete"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDelete"}}},"description":"Accepted"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"delete"}},"/documents/{document_id}/file":{"put":{"tags":["documents"],"summary":"Update Document File","operationId":"UpdateDocumentFile","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateDocumentFileParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentFileUpdate"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"updateFile"}},"/documents/{document_id}/raw":{"put":{"tags":["documents"],"summary":"Update Document Raw","operationId":"UpdateDocumentRaw","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentRawParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRawUpdate"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"updateRaw"}},"/documents/{document_id}/url":{"put":{"tags":["documents"],"summary":"Update Document Url","description":"Updates a document from a publicly accessible URL. On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. PDF files over 2000 pages are not supported. Other static document files over 10000 pages are not supported.","operationId":"UpdateDocumentFromUrl","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocumentFromUrlParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUrlUpdate"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"updateDocumentFromUrl"}},"/documents/{document_id}/metadata":{"patch":{"tags":["documents"],"summary":"Patch Document Metadata","operationId":"PatchDocumentMetadata","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchDocumentMetadataParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentMetadataUpdate"},{"$ref":"#/components/schemas/AsyncDocumentMetadataUpdate"}],"title":"Response Patchdocumentmetadata"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"patchMetadata"}},"/documents/{document_id}/chunks":{"get":{"tags":["documents"],"summary":"Get Document Chunks","description":"List all document chunks sorted by index in ascending order. May be limited to a range of chunk indices with the `start_index` and `end_index` parameters. Documents created prior to 9/18/2024, which have not been updated since, have chunks which do not include an index and their index will be returned as -1. They will be sorted by their ID instead. Updating the document using the `Update Document File` or `Update Document Raw` endpoint will regenerate document chunks, including their index. Results are paginated with a max limit of 100. When more chunks are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page.","operationId":"GetDocumentChunks","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"start_index","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The inclusive starting index of the chunk range to list. If omitted and `end_index` is present effectively limits results to at most one chunk matching `end_index`. If both `start_index` and `end_index` are omitted, results are not limited by index.","examples":[3],"title":"Start Index"},"description":"The inclusive starting index of the chunk range to list. If omitted and `end_index` is present effectively limits results to at most one chunk matching `end_index`. If both `start_index` and `end_index` are omitted, results are not limited by index."},{"name":"end_index","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The inclusive ending index of the chunk range to list. If omitted and `start_index` is present effectively limits results to at most one chunk matching `start_index`. If both `start_index` and `end_index` are omitted, results are not limited by index.","examples":[5],"title":"End Index"},"description":"The inclusive ending index of the chunk range to list. If omitted and `start_index` is present effectively limits results to at most one chunk matching `start_index`. If both `start_index` and `end_index` are omitted, results are not limited by index."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentChunkList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"getChunks"}},"/documents/{document_id}/chunks/{chunk_id}":{"get":{"tags":["documents"],"summary":"Get Document Chunk","description":"Gets a document chunk by its document and chunk ID.","operationId":"GetDocumentChunk","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"chunk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the chunk.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Chunk Id"},"description":"The ID of the chunk."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentChunkDetail"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"getChunk"}},"/documents/{document_id}/chunks/{chunk_id}/content":{"get":{"tags":["documents"],"summary":"Get Document Chunk Content","description":"Returns the content of a document chunk in the requested format. Can be used to stream media of the content for audio/video documents.","operationId":"GetDocumentChunkContent","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"chunk_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the chunk.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Chunk Id"},"description":"The ID of the chunk."},{"name":"media_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["text/plain","audio/mpeg","video/mp4","image/webp","image/heic","image/bmp","image/png","image/jpeg","image/tiff"],"type":"string"},{"type":"null"}],"description":"The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the chunk's document type.","examples":["text/plain","audio/mpeg","video/mp4"],"title":"Media Type"},"description":"The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the chunk's document type."},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download.","default":false,"title":"Download"},"description":"Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."},{"name":"range","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range"}}],"responses":{"200":{"description":"Returns the source content of the document chunk.","content":{"application/json":{"schema":{}},"application/octet-stream":{},"audio/mpeg":{},"text/plain":{}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"getChunkContent"}},"/documents/{document_id}/content":{"get":{"tags":["documents"],"summary":"Get Document Content","description":"Get the content of a document. The `media_type` parameter can be used to request the content in a different format. When requesting as `application/json` additional metadata about the document will be included. If the original document contained content such as images or other non-textual media, this response will include a text description of that media instead of the original file data. Using mime types such as `audio/mpeg` or `video/mp4` will stream the file in a format that can be provided to an audio video player.","operationId":"GetDocumentContent","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"media_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["text/plain","audio/mpeg","video/mp4","image/webp","image/heic","image/bmp","image/png","image/jpeg","image/tiff"],"type":"string"},{"const":"application/json","type":"string"},{"type":"null"}],"description":"The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the document's type.","examples":["text/plain","audio/mpeg","video/mp4"],"title":"Media Type"},"description":"The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the document's type."},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download.","default":false,"title":"Download"},"description":"Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."},{"name":"range","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentWithContent"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"getContent"}},"/documents/{document_id}/source":{"get":{"tags":["documents"],"summary":"Get Document Source","description":"Get the source file of a document. The source file is the original file that was uploaded to create the document. If the document was created from a URL, the source file will be the content of the URL. If the document was created by a connection, the source file will vary based on the type of the connection. For example, a Google Drive connection will return the file that was synced from the Google Drive, while a SalesForce connection would return a JSON file of the data synced from SalesForce.","operationId":"GetDocumentSource","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Return a file in binary format","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"getSource"}},"/retrievals":{"post":{"tags":["retrievals"],"summary":"Retrieve","operationId":"Retrieve","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveParams"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Retrieval"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"auth":[]}],"x-speakeasy-name-override":"retrieve"}},"/documents/{document_id}/summary":{"get":{"tags":["documents"],"summary":"Get Document Summary","description":"Get a LLM generated summary of the document. The summary is created when the document is first created or updated. Documents of types ['xls', 'xlsx', 'csv', 'json'] are not supported for summarization. Documents greater than 1M in token length are not supported. This feature is in beta and may change in the future.","operationId":"GetDocumentSummary","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSummary"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"getSummary"}},"/instructions":{"get":{"tags":["entities"],"summary":"List Instructions","description":"List all instructions.","operationId":"ListInstructions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Instruction"},"type":"array","title":"Response Listinstructions"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"security":[{"auth":[]}],"x-speakeasy-name-override":"listInstructions"},"post":{"tags":["entities"],"summary":"Create Instruction","description":"Create a new instruction. Instructions are applied to documents as they are created or updated. The results of the instruction are stored as structured data in the schema defined by the `entity_schema` parameter. The `prompt` parameter is a natural language instruction which will be applied to documents. This feature is in beta and may change in the future.","operationId":"CreateInstruction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstructionParams"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Instruction"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"auth":[]}],"x-speakeasy-name-override":"createInstruction"}},"/instructions/{instruction_id}":{"put":{"tags":["entities"],"summary":"Update Instruction","operationId":"UpdateInstruction","deprecated":true,"security":[{"auth":[]}],"parameters":[{"name":"instruction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the instruction.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Instruction Id"},"description":"The ID of the instruction."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInstructionParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Instruction"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"updateInstructionLegacy","x-speakeasy-ignore":true},"patch":{"tags":["entities"],"summary":"Patch Instruction","operationId":"PatchInstruction","security":[{"auth":[]}],"parameters":[{"name":"instruction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the instruction.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Instruction Id"},"description":"The ID of the instruction."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchInstructionParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Instruction"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"updateInstruction"},"delete":{"tags":["entities"],"summary":"Delete Instruction","description":"Delete an instruction. This will delete the instruction and all entities generated by it. This operation is irreversible.","operationId":"DeleteInstruction","security":[{"auth":[]}],"parameters":[{"name":"instruction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the instruction.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Instruction Id"},"description":"The ID of the instruction."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Deleteinstruction"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"deleteInstruction"}},"/instructions/{instruction_id}/entities":{"get":{"tags":["entities"],"summary":"Get Instruction Extracted Entities","operationId":"ListEntitiesByInstruction","security":[{"auth":[]}],"parameters":[{"name":"instruction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the instruction.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Instruction Id"},"description":"The ID of the instruction."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"listByInstruction","x-speakeasy-max-method-params":2,"x-speakeasy-pagination":{"type":"cursor","inputs":[{"name":"cursor","type":"cursor","in":"parameters"}],"outputs":{"nextCursor":"$.pagination.next_cursor"}}}},"/instructions/{instruction_id}/entity-extraction-logs":{"get":{"tags":["entities"],"summary":"Get Instruction Entity Extraction Logs","description":"List entity extraction logs for an instruction. Results are attempt-level and include both successful and unsuccessful extraction outcomes. Results are sorted by created_at in descending order and paginated. Historical extraction attempts before 2026-03-06 are unavailable in this endpoint.","operationId":"ListInstructionEntityExtractionLogs","security":[{"auth":[]}],"parameters":[{"name":"instruction_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The ID of the instruction.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Instruction Id"},"description":"The ID of the instruction."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"},{"name":"document_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"description":"Optional document IDs to filter extraction logs to.","title":"Document Ids"},"description":"Optional document IDs to filter extraction logs to."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["extracted","not_found","error"],"type":"string"},{"type":"null"}],"description":"Optional extraction status filter. Supported values are `extracted`, `not_found`, and `error`.","title":"Status"},"description":"Optional extraction status filter. Supported values are `extracted`, `not_found`, and `error`."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Optional ISO 8601 timestamp. Includes only logs with `created_at >= created_after`.","title":"Created After"},"description":"Optional ISO 8601 timestamp. Includes only logs with `created_at >= created_after`."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Optional ISO 8601 timestamp. Includes only logs with `created_at < created_before`.","title":"Created Before"},"description":"Optional ISO 8601 timestamp. Includes only logs with `created_at < created_before`."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructionEntityExtractionLogList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"listExtractionLogs","x-speakeasy-max-method-params":2,"x-speakeasy-pagination":{"type":"cursor","inputs":[{"name":"cursor","type":"cursor","in":"parameters"}],"outputs":{"nextCursor":"$.pagination.next_cursor"}}}},"/documents/{document_id}/entities":{"get":{"tags":["entities"],"summary":"Get Document Extracted Entities","operationId":"ListEntitiesByDocument","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"The id of the document.","examples":["00000000-0000-0000-0000-000000000000"],"title":"Document Id"},"description":"The id of the document."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"listByDocument","x-speakeasy-max-method-params":2,"x-speakeasy-pagination":{"type":"cursor","inputs":[{"name":"cursor","type":"cursor","in":"parameters"}],"outputs":{"nextCursor":"$.pagination.next_cursor"}}}},"/connection":{"post":{"tags":["connections","beta","enterprise"],"summary":"Create Connection","description":"Create a connection. This is only for non-oauth connections such as S3 compatible connections, Freshdesk, and Zendesk.","operationId":"CreateConnection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateConnection"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"auth":[]}],"x-speakeasy-usage-example":true,"x-speakeasy-group":"connections"}},"/connections":{"get":{"tags":["connections"],"summary":"List Connections","description":"List all connections sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page.","operationId":"list_connections_connections_get","security":[{"auth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.","examples":[{"department":{"$in":["sales","marketing"]}}],"title":"Filter"},"description":"The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples."},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, the request will be scoped to the default partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, the request will be scoped to the default partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"type":"cursor","inputs":[{"name":"cursor","type":"cursor","in":"parameters"}],"outputs":{"nextCursor":"$.pagination.next_cursor"}}}},"/connections/oauth":{"post":{"tags":["connections"],"summary":"Create Oauth Redirect Url","description":"Creates a redirect url to redirect the user to when initializing an embedded connector.","operationId":"create_oauth_redirect_url_connections_oauth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthUrlCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthUrlResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"auth":[]}],"x-speakeasy-name-override":"createOAuthRedirectUrl"}},"/connections/source-type":{"get":{"tags":["connections"],"summary":"List Connection Source Types","description":"List available connection source types like 'google_drive' and 'notion' along with their metadata","operationId":"list_connection_source_types_connections_source_type_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConnectorSourceTypeInfo"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"security":[{"auth":[]}],"x-speakeasy-name-override":"list_connection_source_types"}},"/connections/{connection_id}/enabled":{"put":{"tags":["connections"],"summary":"Set Connection Enabled","description":"Enable or disable the connection. A disabled connection won't sync.","operationId":"set_connection_enabled_connections__connection_id__enabled_put","security":[{"auth":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetConnectionEnabledPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"set_enabled"}},"/connections/{connection_id}":{"put":{"tags":["connections"],"summary":"Update Connection","description":"Updates a connections metadata or mode. These changes will be seen after the next sync.","operationId":"update_connection_connections__connection_id__put","security":[{"auth":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionBase"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"update"},"get":{"tags":["connections"],"summary":"Get Connection","description":"Get a connection.","operationId":"get_connection_connections__connection_id__get","security":[{"auth":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"get"}},"/connections/{connection_id}/stats":{"get":{"tags":["connections"],"summary":"Get Connection Stats","description":"Lists connection stats: total documents active documents, total active pages.","operationId":"get_connection_stats_connections__connection_id__stats_get","security":[{"auth":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionStats"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"get_stats"}},"/connections/{connection_id}/limit":{"put":{"tags":["connections"],"summary":"Set Connection Limits","description":"Sets limits on a connection. Limits can be set on the total number of pages a connection can sync. When the limit is reached, the connection will be disabled. Limit may be removed by setting it to `null`.","operationId":"set_connection_limits_connections__connection_id__limit_put","security":[{"auth":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionLimitParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"set_limits"}},"/connections/{connection_id}/delete":{"post":{"tags":["connections"],"summary":"Delete Connection","description":"Schedules a connection to be deleted. You can choose to keep the files from the connection or delete them all. If you keep the files, they will no longer be associated to the connection. Deleting can take some time, so you will still see files for a bit after this is called.","operationId":"delete_connection_connections__connection_id__delete_post","security":[{"auth":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteConnectionPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Connection Connections  Connection Id  Delete Post"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"delete"}},"/connections/{connection_id}/sync":{"post":{"tags":["connections"],"summary":"Sync Connection","description":"Schedules a connector to sync as soon as possible.","operationId":"SyncConnection","security":[{"auth":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOK"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"sync"}},"/webhook_endpoints":{"get":{"tags":["webhook_endpoints"],"summary":"List Webhook Endpoints","description":"List all webhook endpoints sorted by created_at in descending order. Results are paginated with a max limit of 100. When more endpoints are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page.","operationId":"ListWebhookEndpoints","security":[{"auth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"type":"cursor","inputs":[{"name":"cursor","type":"cursor","in":"parameters"}],"outputs":{"nextCursor":"$.pagination.next_cursor"}}},"post":{"tags":["webhook_endpoints"],"summary":"Create Webhook Endpoint","description":"Create a webhook endpoint to receive notifications about document status updates, connection sync progress, partition limits, and other tenant events.","operationId":"CreateWebhookEndpoint","security":[{"auth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"create"}},"/webhook_endpoints/{endpoint_id}":{"get":{"tags":["webhook_endpoints"],"summary":"Get Webhook Endpoint","description":"Get a webhook endpoint by its id.","operationId":"GetWebhookEndpoint","security":[{"auth":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"get"},"patch":{"tags":["webhook_endpoints"],"summary":"Update Webhook Endpoint","description":"Update a webhook endpoint's name, URL, or active status. Use this to rotate endpoints or temporarily disable delivery without deleting the endpoint.","operationId":"UpdateWebhookEndpoint","security":[{"auth":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"update"},"delete":{"tags":["webhook_endpoints"],"summary":"Delete Webhook Endpoint","description":"Delete a webhook endpoint to stop delivering webhook notifications to its URL.","operationId":"DeleteWebhookEndpoint","security":[{"auth":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOK"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"delete"}},"/partitions":{"get":{"tags":["partitions"],"summary":"List Partitions","description":"List all partitions sorted by name in ascending order. Results are paginated with a max limit of 100. When more partitions are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page.","operationId":"list_partitions_partitions_get","security":[{"auth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartitionList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"list","x-speakeasy-pagination":{"type":"cursor","inputs":[{"name":"cursor","type":"cursor","in":"parameters"}],"outputs":{"nextCursor":"$.pagination.next_cursor"}}},"post":{"tags":["partitions"],"summary":"Create Partition","description":"Create a new partition. Partitions are used to scope documents, connections, and instructions. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition may also be created by creating a document in it. Limits for a partition may optionally be defined when creating.","operationId":"create_partition_partitions_post","security":[{"auth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartitionParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Partition"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"create"}},"/partitions/{partition_id}":{"get":{"tags":["partitions"],"summary":"Get Partition","description":"Get a partition by its ID. Includes usage information such as the number of documents and pages hosted and processed. The partition's limits are also included.","operationId":"get_partition_partitions__partition_id__get","security":[{"auth":[]}],"parameters":[{"name":"partition_id","in":"path","required":true,"schema":{"type":"string","title":"Partition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartitionDetail"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"get"},"patch":{"tags":["partitions"],"summary":"Update Partition","description":"Updates a partition. This includes the partition's description and metadata schema.","operationId":"update_partition_partitions__partition_id__patch","security":[{"auth":[]}],"parameters":[{"name":"partition_id","in":"path","required":true,"schema":{"type":"string","title":"Partition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartitionParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartitionDetail"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"update"},"delete":{"tags":["partitions"],"summary":"Delete Partition","description":"Deletes a partition and all of its associated data. This includes connections, documents, and partition specific instructions. This operation is irreversible.","operationId":"delete_partition_partitions__partition_id__delete","security":[{"auth":[]}],"parameters":[{"name":"partition_id","in":"path","required":true,"schema":{"type":"string","title":"Partition Id"}},{"name":"async","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If true, performs partition deletion asynchronously.","examples":["true","false"],"default":false,"title":"Async"},"description":"If true, performs partition deletion asynchronously."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOK"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOK"}}},"description":"Accepted"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"delete"}},"/partitions/{partition_id}/limits":{"put":{"tags":["partitions"],"summary":"Set Partition Limits","description":"Sets limits on a partition. Limits can be set on the total number of pages a partition can host and process. When the limit is reached, the partition will be disabled. A limit may be removed by setting it to `null`.","operationId":"set_partition_limits_partitions__partition_id__limits_put","security":[{"auth":[]}],"parameters":[{"name":"partition_id","in":"path","required":true,"schema":{"type":"string","title":"Partition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartitionLimitParams"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartitionDetail"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"set_limits"}},"/authenticators":{"post":{"tags":["authenticators","beta","enterprise"],"summary":"Create Authenticator","description":"Create White labeled connector credentials","operationId":"CreateAuthenticator","security":[{"auth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/OAuthCredentials"},{"$ref":"#/components/schemas/CreateGoogleAuthenticator"}],"discriminator":{"propertyName":"provider","mapping":{"atlassian":"#/components/schemas/OAuthCredentials","dropbox":"#/components/schemas/OAuthCredentials","microsoft":"#/components/schemas/OAuthCredentials","salesforce":"#/components/schemas/OAuthCredentials","slack":"#/components/schemas/OAuthCredentials","hubspot":"#/components/schemas/OAuthCredentials","google":"#/components/schemas/CreateGoogleAuthenticator"}},"title":"Payload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseGetAuthenticator"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-usage-example":true,"x-speakeasy-name-override":"create","x-speakeasy-group":"authenticators"},"get":{"tags":["authenticators","beta","enterprise"],"summary":"List Authenticators","description":"List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page.","operationId":"ListAuthenticators","security":[{"auth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticatorList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"list","x-speakeasy-group":"authenticators","x-speakeasy-max-method-params":0,"x-speakeasy-pagination":{"type":"cursor","inputs":[{"name":"cursor","type":"cursor","in":"parameters"}],"outputs":{"nextCursor":"$.pagination.next_cursor"}}}},"/authenticators/{authenticator_id}/connection":{"post":{"tags":["authenticators","beta","enterprise"],"summary":"Create Authenticator Connection","description":"Create a connector for a given authenticator. This requires credentials dependent on the provider. For google drive it is a refresh token.","operationId":"CreateAuthenticatorConnection","security":[{"auth":[]}],"parameters":[{"name":"authenticator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Authenticator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuthenticatorConnection"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-usage-example":true,"x-speakeasy-group":"authenticators"}},"/authenticators/{authenticator_id}":{"delete":{"tags":["authenticators","beta","enterprise"],"summary":"Delete Authenticator","description":"Delete an authenticator. This requires all connections created by that authenticator to be deleted first.","operationId":"DeleteAuthenticatorConnection","security":[{"auth":[]}],"parameters":[{"name":"authenticator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Authenticator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOK"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-group":"authenticators"}},"/responses":{"post":{"tags":["responses"],"summary":"Create Response","description":"Create a response. This will generate an LLM or agentic response. At this time the only supported model is `deep-search`. Responses may be streamed or returned synchronously. The `retrieve` tool is currently the only supported tool, more tools will be added in the future. A single partition may be provided in the retrieve tool. If omitted the `default` partition is used.","operationId":"create_response_responses_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"auth":[]}],"x-speakeasy-name-override":"create"}},"/responses/{response_id}":{"get":{"tags":["responses"],"summary":"Get Response","description":"Get a response by its ID. This will return the response and its status. If the response is still in progress, the status will be `in_progress`. If the response is completed, the status will be `completed`. If the response is failed, the status will be `failed`.","operationId":"get_response_responses__response_id__get","security":[{"auth":[]}],"parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Response Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"get"}},"/documents/{document_id}/elements":{"get":{"tags":["elements"],"summary":"List Elements For Document","description":"List the latest elements for a document. The results are sorted by index in ascending order. Results are paginated with a max limit of 100. When more elements are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page","operationId":"list_elements","security":[{"auth":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An opaque cursor for pagination","title":"Cursor"},"description":"An opaque cursor for pagination"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"The number of items per page (must be greater than 0 and less than or equal to 100)","default":10,"title":"Page Size"},"description":"The number of items per page (must be greater than 0 and less than or equal to 100)"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/DocumentElementType"}},{"type":"null"}],"title":"Type"}},{"name":"index_start","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Index Start"}},{"name":"index_end","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Index End"}},{"name":"partition","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.","examples":["acme_customer_id"],"title":"Partition"},"description":"An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDocumentElements"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"list"}},"/elements/{element_id}":{"get":{"tags":["elements"],"summary":"Get Element For Document","description":"Returns an element for a specific id","operationId":"get_element","security":[{"auth":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiDocumentElement"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Payment Required"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"get"}}},"webhooks":{"event":{"post":{"summary":"Event","description":"When events occur in Ragie such as a document being processed, we'll send this data to URLs that you can register in app. Learn more about webhooks in our docs: https://docs.ragie.ai/docs/webhooks.","operationId":"eventevent_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentUpdateWebhook"},{"$ref":"#/components/schemas/DocumentDeleteWebhook"},{"$ref":"#/components/schemas/EntityExtractedWebhook"},{"$ref":"#/components/schemas/ConnectionSyncStartedWebhook"},{"$ref":"#/components/schemas/ConnectionSyncProgressWebhook"},{"$ref":"#/components/schemas/ConnectionSyncFinishedWebhook"},{"$ref":"#/components/schemas/ConnectionLimitExceededWebhook"},{"$ref":"#/components/schemas/PartitionLimitExceededWebhook"},{"$ref":"#/components/schemas/PartitionLimitResetWebhook"}],"title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccessTokenCredentials":{"properties":{"access_token":{"type":"string","title":"Access Token"}},"type":"object","required":["access_token"],"title":"AccessTokenCredentials"},"Answer":{"properties":{"text":{"type":"string","title":"Text","description":"An answer to a question."},"evidence":{"items":{"type":"string"},"type":"array","title":"Evidence","description":"The evidence used to derive the answer."}},"type":"object","required":["text"],"title":"Answer"},"AnswerStep":{"properties":{"type":{"type":"string","const":"answer","title":"Type","default":"answer"},"think":{"type":"string","title":"Think"},"current_question":{"type":"string","title":"Current Question"},"errored":{"type":"boolean","title":"Errored","default":false},"other_resolved_question_ids":{"items":{"type":"string"},"type":"array","title":"Other Resolved Question Ids","description":"A list of question ids that are no longer relevant to the current answer referenced by their IDs."},"answer":{"$ref":"#/components/schemas/Answer"}},"type":"object","required":["think","current_question","answer"],"title":"AnswerStep"},"ApiDocumentElement":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"index":{"type":"integer","title":"Index"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"type":{"$ref":"#/components/schemas/DocumentElementType"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown"},"location":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/BoundingBoxLocation"},{"$ref":"#/components/schemas/SpreadsheetLocation"},{"$ref":"#/components/schemas/CharacterIndexLocation"},{"$ref":"#/components/schemas/DurationLocation"}],"discriminator":{"propertyName":"location_type","mapping":{"bounding_box":"#/components/schemas/BoundingBoxLocation","character_index":"#/components/schemas/CharacterIndexLocation","duration":"#/components/schemas/DurationLocation","spreadsheet":"#/components/schemas/SpreadsheetLocation"}}},{"type":"null"}],"title":"Location"},"data":{"$ref":"#/components/schemas/ApiElement"}},"type":"object","required":["id","created_at","index","metadata","type","text","markdown","data"],"title":"ApiDocumentElement"},"ApiElement":{"anyOf":[{"$ref":"#/components/schemas/Text"},{"$ref":"#/components/schemas/Header"},{"$ref":"#/components/schemas/SubHeader"},{"$ref":"#/components/schemas/Footer"},{"$ref":"#/components/schemas/Title"},{"$ref":"#/components/schemas/SectionHeader"},{"$ref":"#/components/schemas/FigureCaption"},{"$ref":"#/components/schemas/Address"},{"$ref":"#/components/schemas/Author"},{"$ref":"#/components/schemas/EmailAddress"},{"$ref":"#/components/schemas/CalendarDate"},{"$ref":"#/components/schemas/Formula"},{"$ref":"#/components/schemas/Json"},{"$ref":"#/components/schemas/Quote"},{"$ref":"#/components/schemas/Comment"},{"$ref":"#/components/schemas/UnorderedList"},{"$ref":"#/components/schemas/OrderedList"},{"$ref":"#/components/schemas/DefinitionList"},{"$ref":"#/components/schemas/Table"},{"$ref":"#/components/schemas/Figure"},{"$ref":"#/components/schemas/Stamp"},{"$ref":"#/components/schemas/Logo"},{"$ref":"#/components/schemas/Watermark"},{"$ref":"#/components/schemas/Barcode"},{"$ref":"#/components/schemas/QRCode"},{"$ref":"#/components/schemas/Signature"},{"$ref":"#/components/schemas/KeyValue"},{"$ref":"#/components/schemas/FormField"},{"$ref":"#/components/schemas/Code"},{"$ref":"#/components/schemas/Bibliography"},{"$ref":"#/components/schemas/TableOfContents"},{"$ref":"#/components/schemas/Footnote"},{"$ref":"#/components/schemas/Time"},{"$ref":"#/components/schemas/Button"},{"$ref":"#/components/schemas/Video"},{"$ref":"#/components/schemas/AudioTranscriptionSegment"},{"$ref":"#/components/schemas/Caption"},{"$ref":"#/components/schemas/Image"},{"$ref":"#/components/schemas/ListItem"},{"$ref":"#/components/schemas/NarrativeText"},{"$ref":"#/components/schemas/PageBreak"},{"$ref":"#/components/schemas/UncategorizedText"},{"$ref":"#/components/schemas/VideoSegment"}]},"AsyncDocumentMetadataUpdate":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"AsyncDocumentMetadataUpdate"},"AudioModalityData":{"properties":{"type":{"type":"string","const":"audio","title":"Type","default":"audio"},"word_timestamps":{"items":{"$ref":"#/components/schemas/WordTimestamp"},"type":"array","title":"Word Timestamps","default":[]}},"type":"object","title":"AudioModalityData"},"AudioTranscriptionSegment":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"modality_data":{"items":{"$ref":"#/components/schemas/WordModality"},"type":"array","title":"Modality Data","description":"A list of information per word that shows the word, start time, and end time"}},"type":"object","required":["modality_data"],"title":"AudioTranscriptionSegment"},"AuthenticatorConfluenceConnection":{"properties":{"provider":{"type":"string","const":"confluence","title":"Provider"},"data":{"items":{"$ref":"#/components/schemas/ConfluenceData"},"type":"array","title":"Data"},"credentials":{"$ref":"#/components/schemas/OAuthRefreshTokenCredentials"}},"type":"object","required":["provider","data","credentials"],"title":"AuthenticatorConfluenceConnection"},"AuthenticatorDropboxConnection":{"properties":{"provider":{"type":"string","const":"dropbox","title":"Provider"},"data":{"$ref":"#/components/schemas/FolderData"},"email":{"type":"string","title":"Email","description":"The email of the Dropbox account this is for"},"credentials":{"$ref":"#/components/schemas/OAuthRefreshTokenCredentials"}},"type":"object","required":["provider","data","email","credentials"],"title":"AuthenticatorDropboxConnection"},"AuthenticatorGmailConnection":{"properties":{"provider":{"type":"string","const":"gmail","title":"Provider"},"data":{"$ref":"#/components/schemas/GmailData"},"email":{"type":"string","title":"Email","description":"The email of the Google Drive account this is for"},"credentials":{"$ref":"#/components/schemas/OAuthRefreshTokenCredentials"}},"type":"object","required":["provider","data","email","credentials"],"title":"AuthenticatorGmailConnection"},"AuthenticatorGoogleDriveConnection":{"properties":{"provider":{"type":"string","const":"google_drive","title":"Provider"},"data":{"items":{"$ref":"#/components/schemas/GoogleFolderData"},"type":"array","title":"Data"},"email":{"type":"string","title":"Email","description":"The email of the Google Drive account this is for"},"credentials":{"$ref":"#/components/schemas/OAuthRefreshTokenCredentials"}},"type":"object","required":["provider","data","email","credentials"],"title":"AuthenticatorGoogleDriveConnection"},"AuthenticatorHubspotConnection":{"properties":{"provider":{"type":"string","const":"hubspot","title":"Provider"},"data":{"$ref":"#/components/schemas/HubspotData"},"hub_id":{"type":"string","title":"Hub Id"},"hub_domain":{"type":"string","title":"Hub Domain"},"credentials":{"$ref":"#/components/schemas/OAuthRefreshTokenCredentials"}},"type":"object","required":["provider","data","hub_id","hub_domain","credentials"],"title":"AuthenticatorHubspotConnection"},"AuthenticatorJiraConnection":{"properties":{"provider":{"type":"string","const":"jira","title":"Provider"},"credentials":{"$ref":"#/components/schemas/OAuthRefreshTokenCredentials"}},"type":"object","required":["provider","credentials"],"title":"AuthenticatorJiraConnection"},"AuthenticatorList":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"authenticators":{"items":{"$ref":"#/components/schemas/BaseGetAuthenticator"},"type":"array","title":"Authenticators"}},"type":"object","required":["pagination","authenticators"],"title":"AuthenticatorList"},"AuthenticatorNotionConnection":{"properties":{"provider":{"type":"string","const":"notion","title":"Provider"},"workspace_id":{"type":"string","title":"Workspace Id"},"workspace_name":{"type":"string","title":"Workspace Name"},"user_email":{"type":"string","title":"User Email","description":"The email of the Notion account this is for"},"credentials":{"$ref":"#/components/schemas/AccessTokenCredentials"}},"type":"object","required":["provider","workspace_id","workspace_name","user_email","credentials"],"title":"AuthenticatorNotionConnection"},"AuthenticatorOnedriveConnection":{"properties":{"provider":{"type":"string","const":"onedrive","title":"Provider"},"data":{"$ref":"#/components/schemas/OnedriveData"},"user_email":{"type":"string","title":"User Email","description":"The email of the Onedrive account this is for"},"credentials":{"$ref":"#/components/schemas/OAuthRefreshTokenCredentials"}},"type":"object","required":["provider","data","user_email","credentials"],"title":"AuthenticatorOnedriveConnection"},"AuthenticatorSalesforceConnection":{"properties":{"provider":{"type":"string","const":"salesforce","title":"Provider"},"user_email":{"type":"string","title":"User Email","description":"The email of the Salesforce account this is for"},"url":{"type":"string","title":"Url","description":"The url of your Salesforce instance, where you go to login."},"credentials":{"$ref":"#/components/schemas/OAuthRefreshTokenCredentials"}},"type":"object","required":["provider","user_email","url","credentials"],"title":"AuthenticatorSalesforceConnection"},"AuthenticatorSharepointConnection":{"properties":{"provider":{"type":"string","const":"sharepoint","title":"Provider"},"data":{"$ref":"#/components/schemas/SharepointData"},"user_email":{"type":"string","title":"User Email","description":"The email of the Sharepoint account this is for"},"credentials":{"$ref":"#/components/schemas/OAuthRefreshTokenCredentials"}},"type":"object","required":["provider","data","user_email","credentials"],"title":"AuthenticatorSharepointConnection"},"AuthenticatorSlackConnection":{"properties":{"provider":{"type":"string","const":"slack","title":"Provider"},"data":{"$ref":"#/components/schemas/SlackData"},"user_email":{"type":"string","title":"User Email","description":"The email of the Slack account this is for"},"credentials":{"$ref":"#/components/schemas/AccessTokenCredentials"}},"type":"object","required":["provider","data","user_email","credentials"],"title":"AuthenticatorSlackConnection"},"BackblazeCredentials":{"properties":{"key_id":{"type":"string","title":"Key Id"},"application_key":{"type":"string","title":"Application Key"},"region":{"type":"string","title":"Region"},"endpoint":{"type":"string","title":"Endpoint"}},"type":"object","required":["key_id","application_key","region","endpoint"],"title":"BackblazeCredentials"},"BaseGetAuthenticator":{"properties":{"provider":{"type":"string","title":"Provider"},"name":{"type":"string","title":"Name","description":"The unique name of your authenticator, used to identify it and distinguish it from others. This name must be unique. Attempting to reuse the same name will result in an error."},"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["provider","name","id"],"title":"BaseGetAuthenticator"},"Body_CreateDocument":{"properties":{"mode":{"type":"string","title":"Mode","description":"Partition strategy for the document.\nDifferent strategies exist for textual, audio and video file types and you can set the strategy you want for \neach file type, or just for textual types.\n\nFor textual documents the options are `'hi_res'` or `'fast'`.\nWhen set to `'hi_res'`, images and tables will be extracted from the document.\n`'fast'` will only extract text.\n`'fast'` may be up to 20x faster than `'hi_res'`.\n`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.\nImages will always be processed in `hi_res`.\nIf `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.\n\nFor audio files, the options are true or false. True if you want to process audio, false otherwise.        \n\nFor video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.\n`'audio_only'` will extract just the audio part of the video.\n`'video_only'` will similarly just extract the video part, ignoring audio.\n`'audio_video'` will extract both audio and video.\n\nTo process all media types at the highest quality, use `'all'`.\n\nWhen you specify audio or video stategies, the format must be a JSON object. In this case,\ntextual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. \nSee examples below.\n\nExamples\n\nTextual documents only\n    \"fast\"\n\nVideo documents only\n{\n    \"video\": \"audio_video\"\n}\n\nSpecify multiple document types\n{\n    \"static\": \"hi_res\",\n    \"audio\": true,\n    \"video\": \"video_only\"\n}\n\nSpecify only textual or audio document types\n{\n    \"static\": \"fast\",\n    \"audio\": true\n}\n\nHighest quality processing for all media types\n    \"all\"\n\nAgentic OCR\n    \"agentic_ocr\"\n    Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai.","default":"fast"},"metadata":{"type":"string","title":"Metadata","description":"Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.","default":"{}"},"file":{"type":"string","format":"binary","title":"File","description":"The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml`\nImages: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic`\nDocuments: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported. Other static document files over 10000 pages are not supported."},"external_id":{"type":"string","title":"External Id","description":"An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found."},"partition":{"type":"string","title":"Partition","description":"An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`.  A partition is created any time a document is created."},"name":{"type":"string","title":"Name","description":"An optional name for the document. If set, the document will have this name. Otherwise it will default to the file's name."},"workflow":{"$ref":"#/components/schemas/DocumentWorkflow","title":"Workflow","description":"An optional stage to stop processing the document. If set to \"parse\" processing will stop once elements have been extracted. Setting it to \"index\" or leaving it blank will go through the full pipeline."}},"type":"object","required":["file"],"title":"Body_CreateDocument"},"Body_UpdateDocumentFile":{"properties":{"mode":{"type":"string","title":"Mode","description":"Partition strategy for the document.\nDifferent strategies exist for textual, audio and video file types and you can set the strategy you want for \neach file type, or just for textual types.\n\nFor textual documents the options are `'hi_res'` or `'fast'`.\nWhen set to `'hi_res'`, images and tables will be extracted from the document.\n`'fast'` will only extract text.\n`'fast'` may be up to 20x faster than `'hi_res'`.\n`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.\nImages will always be processed in `hi_res`.\nIf `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.\n\nFor audio files, the options are true or false. True if you want to process audio, false otherwise.        \n\nFor video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.\n`'audio_only'` will extract just the audio part of the video.\n`'video_only'` will similarly just extract the video part, ignoring audio.\n`'audio_video'` will extract both audio and video.\n\nTo process all media types at the highest quality, use `'all'`.\n\nWhen you specify audio or video stategies, the format must be a JSON object. In this case,\ntextual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. \nSee examples below.\n\nExamples\n\nTextual documents only\n    \"fast\"\n\nVideo documents only\n{\n    \"video\": \"audio_video\"\n}\n\nSpecify multiple document types\n{\n    \"static\": \"hi_res\",\n    \"audio\": true,\n    \"video\": \"video_only\"\n}\n\nSpecify only textual or audio document types\n{\n    \"static\": \"fast\",\n    \"audio\": true\n}\n\nHighest quality processing for all media types\n    \"all\"\n\nAgentic OCR\n    \"agentic_ocr\"\n    Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai.","default":"fast"},"file":{"type":"string","format":"binary","title":"File","description":"The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml`\nImages: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic`\nDocuments: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported. Other static document files over 10000 pages are not supported."}},"type":"object","required":["file"],"title":"Body_UpdateDocumentFile"},"BoundingBoxLocation":{"properties":{"location_type":{"type":"string","const":"bounding_box","title":"Location Type","default":"bounding_box"},"left":{"type":"number","title":"Left","description":"Left coordinate (0.0 to 1.0)"},"top":{"type":"number","title":"Top","description":"Top coordinate (0.0 to 1.0)"},"width":{"type":"number","title":"Width","description":"Width of the element (0.0 to 1.0)"},"height":{"type":"number","title":"Height","description":"Height of the element (0.0 to 1.0)"},"page_number":{"type":"integer","title":"Page Number","description":"Page number"}},"type":"object","required":["left","top","width","height","page_number"],"title":"BoundingBoxLocation","description":"Location within a paginated document using normalized coordinates."},"BucketData":{"properties":{"bucket":{"type":"string","title":"Bucket"},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"import_file_metadata":{"type":"boolean","title":"Import File Metadata","default":false}},"type":"object","required":["bucket"],"title":"BucketData"},"Caption":{"properties":{"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Caption"},"CharacterIndexLocation":{"properties":{"location_type":{"type":"string","const":"character_index","title":"Location Type","default":"character_index"},"start_char_index":{"type":"integer","title":"Start Char Index","description":"Start character index (inclusive)"},"end_char_index":{"type":"integer","title":"End Char Index","description":"End character index (exclusive)"}},"type":"object","required":["start_char_index","end_char_index"],"title":"CharacterIndexLocation","description":"Location within linear text using zero-based character offsets."},"ChunkMetadata":{"properties":{},"additionalProperties":true,"type":"object","title":"ChunkMetadata"},"CodeInterpreterEvidence":{"properties":{"type":{"type":"string","const":"code_interpreter","title":"Type","default":"code_interpreter"},"text":{"type":"string","title":"Text"},"code":{"type":"string","title":"Code","description":"The code that was executed."},"code_issue":{"type":"string","title":"Code Issue","description":"The issue that the code was written to solve."},"code_result":{"type":"string","title":"Code Result","description":"The result of the code that was executed."}},"type":"object","required":["text","code","code_issue","code_result"],"title":"CodeInterpreterEvidence"},"CodeInterpreterOutput":{"properties":{"id":{"type":"string","title":"Id","description":"The unique ID of the code interpreter tool call."},"code":{"type":"string","title":"Code","description":"The code executed by the code interpreter."},"container_id":{"type":"string","title":"Container Id","description":"The ID of the container used to run the code."},"outputs":{"items":{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},"type":"array","title":"Outputs","description":"The outputs generated by the code interpreter, such as logs or images."},"type":{"type":"string","const":"code_interpreter_output","title":"Type","default":"code_interpreter_output"},"status":{"type":"string","enum":["in_progress","interpreting","completed","incomplete","failed"],"title":"Status","default":"completed"}},"type":"object","required":["id","code","container_id","outputs"],"title":"CodeInterpreterOutput"},"CodeInterpreterOutputLogs":{"properties":{"logs":{"type":"string","title":"Logs","description":"The logs output from the code interpreter."},"type":{"type":"string","const":"logs","title":"Type","default":"logs"}},"type":"object","required":["logs"],"title":"CodeInterpreterOutputLogs"},"CodeStep":{"properties":{"type":{"type":"string","const":"code","title":"Type","default":"code"},"think":{"type":"string","title":"Think"},"current_question":{"type":"string","title":"Current Question"},"errored":{"type":"boolean","title":"Errored","default":false},"code_issue":{"type":"string","title":"Code Issue","description":"The natural language description of the code issue you need to solve."},"code":{"type":"string","title":"Code","description":"The code you generated to solve the code issue.","default":""},"code_result":{"type":"string","title":"Code Result","description":"The result of the code you generated after executing it.","default":""}},"type":"object","required":["think","current_question","code_issue"],"title":"CodeStep"},"ConfluenceData":{"properties":{"resource_id":{"type":"string","title":"Resource Id"},"space_id":{"type":"integer","title":"Space Id"},"space_key":{"type":"string","title":"Space Key"},"space_name":{"type":"string","title":"Space Name"}},"type":"object","required":["resource_id","space_id","space_key","space_name"],"title":"ConfluenceData"},"Connection":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata"},"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"source":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source"},"enabled":{"type":"boolean","title":"Enabled"},"disabled_by_system_reason":{"anyOf":[{"type":"string","enum":["connection_over_total_page_limit","authentication_failed","tenant_account_disabled"]},{"type":"null"}],"title":"Disabled By System Reason"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"syncing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Syncing"},"partition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition"},"page_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Limit"},"sync_filter":{"$ref":"#/components/schemas/SyncFilter"},"disabled_by_system":{"type":"boolean","title":"Disabled By System","readOnly":true}},"type":"object","required":["id","created_at","updated_at","metadata","type","name","source","enabled","disabled_by_system_reason","page_limit","sync_filter","disabled_by_system"],"title":"Connection"},"ConnectionBase":{"properties":{"partition_strategy":{"anyOf":[{"type":"string","enum":["hi_res","fast","agentic_ocr"]},{"$ref":"#/components/schemas/MediaModeParam"}],"title":"Partition Strategy"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata","description":"Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.","default":{}},"sync_filter":{"$ref":"#/components/schemas/SyncFilter"},"page_limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page Limit","description":"The maximum number of pages a connection will sync. The connection will be disabled after this limit is reached. Some in process documents may continue processing. Remove the limit by setting to `null`.","examples":[1000]}},"type":"object","required":["partition_strategy"],"title":"ConnectionBase"},"ConnectionLimitExceededWebhook":{"properties":{"nonce":{"type":"string","title":"Nonce"},"type":{"type":"string","const":"connection_limit_exceeded","title":"Type"},"payload":{"$ref":"#/components/schemas/ConnectionLimitExceededWebhookPayload"}},"type":"object","required":["nonce","type","payload"],"title":"ConnectionLimitExceededWebhook"},"ConnectionLimitExceededWebhookPayload":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"partition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition"},"connection_metadata":{"additionalProperties":true,"type":"object","title":"Connection Metadata"},"limit_type":{"type":"string","const":"page_limit","title":"Limit Type"}},"type":"object","required":["connection_id","partition","connection_metadata","limit_type"],"title":"ConnectionLimitExceededWebhookPayload"},"ConnectionLimitParams":{"properties":{"page_limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page Limit","description":"The maximum number of pages a connection will sync. The connection will be disabled after this limit is reached. Some in process documents may continue processing. Remove the limit by setting to `null`.","examples":[1000]}},"type":"object","title":"ConnectionLimitParams"},"ConnectionList":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"connections":{"items":{"$ref":"#/components/schemas/Connection"},"type":"array","title":"Connections"}},"type":"object","required":["pagination","connections"],"title":"ConnectionList"},"ConnectionStats":{"properties":{"document_count":{"type":"integer","title":"Document Count"},"page_count":{"type":"number","title":"Page Count"}},"type":"object","required":["document_count","page_count"],"title":"ConnectionStats"},"ConnectionSyncFinishedWebhook":{"properties":{"nonce":{"type":"string","title":"Nonce"},"type":{"type":"string","const":"connection_sync_finished","title":"Type"},"payload":{"$ref":"#/components/schemas/ConnectionSyncFinishedWebhookPayload"}},"type":"object","required":["nonce","type","payload"],"title":"ConnectionSyncFinishedWebhook"},"ConnectionSyncFinishedWebhookPayload":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"sync_id":{"type":"string","title":"Sync Id"},"partition":{"type":"string","title":"Partition"},"connection_metadata":{"additionalProperties":true,"type":"object","title":"Connection Metadata"}},"type":"object","required":["connection_id","sync_id","partition","connection_metadata"],"title":"ConnectionSyncFinishedWebhookPayload"},"ConnectionSyncProgressWebhook":{"properties":{"nonce":{"type":"string","title":"Nonce"},"type":{"type":"string","const":"connection_sync_progress","title":"Type"},"payload":{"$ref":"#/components/schemas/ConnectionSyncProgressWebhookPayload"}},"type":"object","required":["nonce","type","payload"],"title":"ConnectionSyncProgressWebhook"},"ConnectionSyncProgressWebhookPayload":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"sync_id":{"type":"string","title":"Sync Id"},"partition":{"type":"string","title":"Partition"},"connection_metadata":{"additionalProperties":true,"type":"object","title":"Connection Metadata"},"create_count":{"type":"integer","title":"Create Count"},"created_count":{"type":"integer","title":"Created Count"},"update_content_count":{"type":"integer","title":"Update Content Count"},"updated_content_count":{"type":"integer","title":"Updated Content Count"},"update_metadata_count":{"type":"integer","title":"Update Metadata Count"},"updated_metadata_count":{"type":"integer","title":"Updated Metadata Count"},"delete_count":{"type":"integer","title":"Delete Count"},"deleted_count":{"type":"integer","title":"Deleted Count"},"errored_count":{"type":"integer","title":"Errored Count"},"paused_insufficient_credits_count":{"type":"integer","title":"Paused Insufficient Credits Count"}},"type":"object","required":["connection_id","sync_id","partition","connection_metadata","create_count","created_count","update_content_count","updated_content_count","update_metadata_count","updated_metadata_count","delete_count","deleted_count","errored_count","paused_insufficient_credits_count"],"title":"ConnectionSyncProgressWebhookPayload"},"ConnectionSyncStartedWebhook":{"properties":{"nonce":{"type":"string","title":"Nonce"},"type":{"type":"string","const":"connection_sync_started","title":"Type"},"payload":{"$ref":"#/components/schemas/ConnectionSyncStartedWebhookPayload"}},"type":"object","required":["nonce","type","payload"],"title":"ConnectionSyncStartedWebhook"},"ConnectionSyncStartedWebhookPayload":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"sync_id":{"type":"string","title":"Sync Id"},"partition":{"type":"string","title":"Partition"},"connection_metadata":{"additionalProperties":true,"type":"object","title":"Connection Metadata"},"create_count":{"type":"integer","title":"Create Count"},"update_content_count":{"type":"integer","title":"Update Content Count"},"update_metadata_count":{"type":"integer","title":"Update Metadata Count"},"delete_count":{"type":"integer","title":"Delete Count"}},"type":"object","required":["connection_id","sync_id","partition","connection_metadata","create_count","update_content_count","update_metadata_count","delete_count"],"title":"ConnectionSyncStartedWebhookPayload"},"ConnectorSource":{"type":"string","enum":["backblaze","confluence","dropbox","freshdesk","onedrive","google_drive","gmail","intercom","notion","salesforce","sharepoint","jira","slack","s3","gcs","hubspot","webcrawler","zendesk"],"title":"ConnectorSource"},"ConnectorSourceTypeInfo":{"properties":{"source_type":{"$ref":"#/components/schemas/ConnectorSource"},"display_name":{"type":"string","title":"Display Name"},"icon_url":{"type":"string","title":"Icon Url"},"docs_url":{"type":"string","title":"Docs Url"}},"type":"object","required":["source_type","display_name","icon_url","docs_url"],"title":"ConnectorSourceTypeInfo"},"CreateAuthenticatorConnection":{"properties":{"partition_strategy":{"$ref":"#/components/schemas/MediaModeParam"},"partition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition"},"page_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Limit","examples":[null,100]},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","examples":[null]},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata","description":"Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.","default":{}},"workflow":{"anyOf":[{"$ref":"#/components/schemas/DocumentWorkflow"},{"type":"null"}]},"sync_filter":{"$ref":"#/components/schemas/SyncFilter"},"connection":{"oneOf":[{"$ref":"#/components/schemas/AuthenticatorConfluenceConnection"},{"$ref":"#/components/schemas/AuthenticatorDropboxConnection"},{"$ref":"#/components/schemas/AuthenticatorGoogleDriveConnection"},{"$ref":"#/components/schemas/AuthenticatorGmailConnection"},{"$ref":"#/components/schemas/AuthenticatorHubspotConnection"},{"$ref":"#/components/schemas/AuthenticatorJiraConnection"},{"$ref":"#/components/schemas/AuthenticatorNotionConnection"},{"$ref":"#/components/schemas/AuthenticatorOnedriveConnection"},{"$ref":"#/components/schemas/AuthenticatorSalesforceConnection"},{"$ref":"#/components/schemas/AuthenticatorSharepointConnection"},{"$ref":"#/components/schemas/AuthenticatorSlackConnection"}],"title":"Connection","discriminator":{"propertyName":"provider","mapping":{"confluence":"#/components/schemas/AuthenticatorConfluenceConnection","dropbox":"#/components/schemas/AuthenticatorDropboxConnection","gmail":"#/components/schemas/AuthenticatorGmailConnection","google_drive":"#/components/schemas/AuthenticatorGoogleDriveConnection","hubspot":"#/components/schemas/AuthenticatorHubspotConnection","jira":"#/components/schemas/AuthenticatorJiraConnection","notion":"#/components/schemas/AuthenticatorNotionConnection","onedrive":"#/components/schemas/AuthenticatorOnedriveConnection","salesforce":"#/components/schemas/AuthenticatorSalesforceConnection","sharepoint":"#/components/schemas/AuthenticatorSharepointConnection","slack":"#/components/schemas/AuthenticatorSlackConnection"}}}},"type":"object","required":["partition_strategy","connection"],"title":"CreateAuthenticatorConnection"},"CreateDocumentFromUrlParams":{"properties":{"name":{"type":"string","title":"Name"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata","description":"Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.","default":{}},"mode":{"anyOf":[{"type":"string","enum":["hi_res","fast","agentic_ocr"]},{"$ref":"#/components/schemas/MediaModeParam"}],"title":"Mode","description":"Partition strategy for the document.\nDifferent strategies exist for textual, audio and video file types and you can set the strategy you want for \neach file type, or just for textual types.\n\nFor textual documents the options are `'hi_res'` or `'fast'`.\nWhen set to `'hi_res'`, images and tables will be extracted from the document.\n`'fast'` will only extract text.\n`'fast'` may be up to 20x faster than `'hi_res'`.\n`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.\nImages will always be processed in `hi_res`.\nIf `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.\n\nFor audio files, the options are true or false. True if you want to process audio, false otherwise.        \n\nFor video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.\n`'audio_only'` will extract just the audio part of the video.\n`'video_only'` will similarly just extract the video part, ignoring audio.\n`'audio_video'` will extract both audio and video.\n\nTo process all media types at the highest quality, use `'all'`.\n\nWhen you specify audio or video stategies, the format must be a JSON object. In this case,\ntextual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. \nSee examples below.\n\nExamples\n\nTextual documents only\n    \"fast\"\n\nVideo documents only\n{\n    \"video\": \"audio_video\"\n}\n\nSpecify multiple document types\n{\n    \"static\": \"hi_res\",\n    \"audio\": true,\n    \"video\": \"video_only\"\n}\n\nSpecify only textual or audio document types\n{\n    \"static\": \"fast\",\n    \"audio\": true\n}\n\nHighest quality processing for all media types\n    \"all\"\n\nAgentic OCR\n    \"agentic_ocr\"\n    Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai.","default":"fast"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found."},"partition":{"type":"string","title":"Partition","description":"An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`.  A partition is created any time a document is created.","examples":[null]},"workflow":{"$ref":"#/components/schemas/DocumentWorkflow","title":"Workflow","description":"An optional stage to stop processing the document. If set to \"parse\" processing will stop once elements have been extracted. Setting it to \"index\" or leaving it blank will go through the full pipeline."},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"Url of the file to download. Must be publicly accessible and HTTP or HTTPS scheme."}},"type":"object","required":["url"],"title":"CreateDocumentFromUrlParams"},"CreateDocumentRawParams":{"properties":{"name":{"type":"string","title":"Name","description":"An optional name for the document. If set, the document will have this name. Otherwise it will default to the current timestamp."},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata","description":"Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.","default":{}},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found."},"partition":{"type":"string","title":"Partition","description":"An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`.  A partition is created any time a document is created.","examples":[null]},"workflow":{"$ref":"#/components/schemas/DocumentWorkflow","title":"Workflow","description":"An optional stage to stop processing the document. If set to \"parse\" processing will stop once elements have been extracted. Setting it to \"index\" or leaving it blank will go through the full pipeline."},"data":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"minLength":1,"title":"Data","description":"Document data in a text or JSON format."}},"type":"object","required":["data"],"title":"CreateDocumentRawParams"},"CreateGoogleAuthenticator":{"properties":{"provider":{"type":"string","const":"google","title":"Provider"},"name":{"type":"string","title":"Name","description":"The unique name of your authenticator, used to identify it and distinguish it from others. This name must be unique. Attempting to reuse the same name will result in an error."},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"project_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Number"}},"type":"object","required":["provider","name","client_id","client_secret"],"title":"CreateGoogleAuthenticator"},"CreateInstructionParams":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the instruction. Must be unique.","examples":["Find all pizzas"]},"active":{"type":"boolean","title":"Active","description":"Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.","default":true,"examples":[true]},"scope":{"type":"string","enum":["document","chunk"],"title":"Scope","description":"The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.","default":"chunk","examples":["document"]},"prompt":{"type":"string","title":"Prompt","description":"A natural language instruction which will be applied to documents as they are created and updated. The results of the `instruction_prompt` will be stored as an `entity` in the schema defined by the `entity_schema` parameter.","examples":["Find all pizzas described in the text."]},"context_template":{"type":"string","title":"Context Template","description":"An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`.","examples":["Document: {{document.name}} {{document.metadata.key_foo}}"]},"entity_schema":{"$ref":"#/components/schemas/EntitySchema","description":"The JSON schema definition of the entity generated by an instruction. The schema must define an `object` at its root. If the instruction is expected to generate multiple items, the root object should have a key which defines an array of the expected items. An instruction which generates multiple emails may be expressed as `{\"type\": \"object\", \"properties\": {\"emails\": { \"type\": \"array\", \"items\": { \"type\": \"string\"}}}}`. Simple values may be expressed as an object with a single key. For example, a summary instruction may generate a single string value. The schema might be `{\"type\": \"object\", \"properties\": { \"summary\": { \"type\": \"string\"}}}`.","examples":[{"additionalProperties":false,"properties":{"size":{"enum":["small","medium","large"],"type":"string"},"crust":{"enum":["thin","thick","stuffed"],"type":"string"},"sauce":{"enum":["tomato","alfredo","pesto"],"type":"string"},"cheese":{"enum":["mozzarella","cheddar","parmesan","vegan"],"type":"string"},"toppings":{"items":{"enum":["pepperoni","mushrooms","onions","sausage","bacon","extra cheese","black olives","green peppers","pineapple","spinach"],"type":"string"},"type":"array"},"extraInstructions":{"type":"string"}},"required":["size","crust","sauce","cheese"],"title":"Pizza","type":"object"}],"additional_properties":true},"filter":{"additionalProperties":true,"type":"object","title":"Filter","description":"An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter.  The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.","examples":[{"toppings":{"$in":["pizza","mushrooms"]}}]},"partition":{"type":"string","title":"Partition","description":"An optional partition identifier. Instructions can be scoped to a partition. An instruction that defines a partition will only be executed for documents in that partition.","examples":[null]}},"type":"object","required":["name","prompt","entity_schema"],"title":"CreateInstructionParams"},"CreatePartitionParams":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the partition. Automatic description generation can be enabled in the web dashboard."},"pages_hosted_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Pages Hosted Limit Monthly","description":"Monthly limit of hosted pages added in the current month in the partition.","examples":[1000]},"pages_processed_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Pages Processed Limit Monthly","description":"Monthly limit, in pages, for processed documents in the partition.","examples":[1000]},"pages_hosted_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Pages Hosted Limit Max","description":"Maximum limit, in pages, for hosted documents in the partition.","examples":[1000]},"pages_processed_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Pages Processed Limit Max","description":"Maximum limit, in pages, for processed documents in the partition.","examples":[1000]},"audio_processed_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Audio Processed Limit Monthly","description":"Monthly limit, in minutes, for audio processing in the partition.","examples":[60]},"audio_processed_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Audio Processed Limit Max","description":"Maximum limit, in minutes, for audio processing in the partition.","examples":[60]},"video_processed_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Video Processed Limit Monthly","description":"Monthly limit, in minutes, for video processing in the partition.","examples":[60]},"video_processed_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Video Processed Limit Max","description":"Maximum limit, in minutes, for video processing in the partition.","examples":[60]},"media_streamed_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Media Streamed Limit Monthly","description":"Monthly limit, in MBs, for media streamed from the partition.","examples":[1024]},"media_streamed_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Media Streamed Limit Max","description":"Maximum limit, in MBs, for media streamed from the partition.","examples":[1024]},"media_hosted_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Media Hosted Limit Monthly","description":"Monthly limit, in MBs, for media hosted in the partition.","examples":[1024]},"media_hosted_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Media Hosted Limit Max","description":"Maximum limit, in MBs, for media hosted in the partition.","examples":[1024]},"metadata_schema":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"}]},"type":"object"},{"type":"null"}],"title":"Metadata Schema","description":"Metadata schema for the partition. This is an optional subset of the metadata of documents in the partition, defined as JSON Schema, that can be used in filter generatation. Providing detailed descriptions of the fields in the schema can be helpful for LLMs generating filters dynamically."}},"type":"object","required":["name"],"title":"CreatePartitionParams"},"CreateWebhookEndpointPayload":{"properties":{"name":{"type":"string","title":"Name"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"partition_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition Pattern"}},"type":"object","required":["name","url"],"title":"CreateWebhookEndpointPayload"},"DeleteConnectionPayload":{"properties":{"keep_files":{"type":"boolean","title":"Keep Files"}},"type":"object","required":["keep_files"],"title":"DeleteConnectionPayload"},"Document":{"properties":{"status":{"type":"string","title":"Status"},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"name":{"type":"string","title":"Name"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata"},"partition":{"type":"string","title":"Partition"},"chunk_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Count"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"page_count":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Page Count"}},"type":"object","required":["status","id","created_at","updated_at","name","metadata","partition"],"title":"Document"},"DocumentChunk":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"index":{"type":"integer","title":"Index","default":-1},"text":{"type":"string","title":"Text"},"metadata":{"$ref":"#/components/schemas/ChunkMetadata","default":{}},"links":{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object","title":"Links"}},"type":"object","required":["id","text","links"],"title":"DocumentChunk"},"DocumentChunkDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"index":{"type":"integer","title":"Index","default":-1},"text":{"type":"string","title":"Text"},"metadata":{"$ref":"#/components/schemas/ChunkMetadata","default":{}},"links":{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object","title":"Links"},"modality_data":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AudioModalityData"},{"$ref":"#/components/schemas/VideoModalityData"}],"discriminator":{"propertyName":"type","mapping":{"audio":"#/components/schemas/AudioModalityData","video":"#/components/schemas/VideoModalityData"}}},{"type":"null"}],"title":"Modality Data","description":"Additional data specific to the modality of the chunk's source file, such as word level timestamps for chunks extracted from audio files."}},"type":"object","required":["id","text","links"],"title":"DocumentChunkDetail"},"DocumentChunkList":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"chunks":{"items":{"$ref":"#/components/schemas/DocumentChunk"},"type":"array","title":"Chunks"}},"type":"object","required":["pagination","chunks"],"title":"DocumentChunkList"},"DocumentDelete":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"DocumentDelete"},"DocumentDeleteWebhook":{"properties":{"nonce":{"type":"string","title":"Nonce"},"type":{"type":"string","const":"document_deleted","title":"Type"},"payload":{"$ref":"#/components/schemas/DocumentDeleteWebhookPayload"}},"type":"object","required":["nonce","type","payload"],"title":"DocumentDeleteWebhook"},"DocumentDeleteWebhookPayload":{"properties":{"document_id":{"type":"string","title":"Document Id"},"partition":{"type":"string","title":"Partition"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"name":{"type":"string","title":"Name"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"},"sync_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Id"}},"type":"object","required":["document_id","partition","metadata","external_id","name","connection_id","sync_id"],"title":"DocumentDeleteWebhookPayload"},"DocumentElementType":{"type":"string","enum":["Caption","Title","Text","UncategorizedText","NarrativeText","Image","FigureCaption","TableCaption","ListItem","Address","EmailAddress","PageBreak","Formula","Table","Header","Footer","Json","AudioTranscriptionSegment","VideoSegment","SubHeader","SectionHeader","Author","CalendarDate","Quote","Comment","UnorderedList","OrderedList","DefinitionList","Figure","Stamp","Logo","Watermark","Barcode","QrCode","Signature","KeyValue","FormField","Code","Bibliography","TableOfContents","Footnote","Time","Button","Video"],"title":"DocumentElementType"},"DocumentFileUpdate":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"DocumentFileUpdate"},"DocumentGet":{"properties":{"status":{"type":"string","title":"Status"},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"name":{"type":"string","title":"Name"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata"},"partition":{"type":"string","title":"Partition"},"chunk_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Count"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"page_count":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Page Count"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["status","id","created_at","updated_at","name","metadata","partition","errors"],"title":"DocumentGet"},"DocumentList":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"documents":{"items":{"$ref":"#/components/schemas/Document"},"type":"array","title":"Documents"}},"type":"object","required":["pagination","documents"],"title":"DocumentList"},"DocumentMetadata":{"properties":{},"additionalProperties":true,"type":"object","title":"DocumentMetadata"},"DocumentMetadataUpdate":{"properties":{"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata","description":"The full document metadata inclusive of the update.","examples":[{"editors":["Alice","Bob"],"title":"declassified report","unchanged_key":"unchanged_value","updated_at":1714491736216}]}},"type":"object","required":["metadata"],"title":"DocumentMetadataUpdate"},"DocumentRawUpdate":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"DocumentRawUpdate"},"DocumentSummary":{"properties":{"document_id":{"type":"string","title":"Document Id"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["document_id","summary"],"title":"DocumentSummary"},"DocumentUpdateWebhook":{"properties":{"nonce":{"type":"string","title":"Nonce"},"type":{"type":"string","const":"document_status_updated","title":"Type"},"payload":{"$ref":"#/components/schemas/DocumentUpdateWebhookPayload"}},"type":"object","required":["nonce","type","payload"],"title":"DocumentUpdateWebhook"},"DocumentUpdateWebhookPayload":{"properties":{"document_id":{"type":"string","title":"Document Id"},"status":{"anyOf":[{"type":"string","const":"ready"},{"type":"string","const":"failed"},{"type":"string","const":"refined"},{"type":"string","const":"indexed"},{"type":"string","const":"keyword_indexed"},{"type":"string","const":"paused_insufficient_credits"}],"title":"Status"},"partition":{"type":"string","title":"Partition"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"name":{"type":"string","title":"Name"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"},"sync_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["document_id","status","partition","metadata","external_id","name","connection_id","sync_id","error"],"title":"DocumentUpdateWebhookPayload"},"DocumentUrlUpdate":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"DocumentUrlUpdate"},"DocumentWithContent":{"properties":{"status":{"type":"string","title":"Status"},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"name":{"type":"string","title":"Name"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata"},"partition":{"type":"string","title":"Partition"},"chunk_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Count"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"page_count":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Page Count"},"content":{"type":"string","title":"Content"}},"type":"object","required":["status","id","created_at","updated_at","name","metadata","partition","content"],"title":"DocumentWithContent"},"DocumentWorkflow":{"type":"string","enum":["parse","index"]},"DurationLocation":{"properties":{"location_type":{"type":"string","const":"duration","title":"Location Type","default":"duration"},"start_time":{"type":"number","title":"Start Time"},"end_time":{"type":"number","title":"End Time"},"duration":{"type":"number","title":"Duration"}},"type":"object","required":["start_time","end_time","duration"],"title":"DurationLocation"},"Entity":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"instruction_id":{"type":"string","format":"uuid","title":"Instruction Id","description":"The ID of the instruction which generated the entity."},"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The ID of the document which the entity was produced from."},"chunk_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chunk Id"},"data":{"$ref":"#/components/schemas/EntityData","description":"The entity data generated by the instruction."},"instruction_schema_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Instruction Schema Version","description":"Instruction entity schema version used to generate this entity."},"instruction_schema_shape_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instruction Schema Shape Fingerprint","description":"Shape-only fingerprint of the instruction entity schema used to generate this entity."}},"type":"object","required":["id","created_at","updated_at","instruction_id","document_id","data"],"title":"Entity"},"EntityData":{"properties":{},"additionalProperties":true,"type":"object","title":"EntityData"},"EntityExtractedWebhook":{"properties":{"nonce":{"type":"string","title":"Nonce"},"type":{"type":"string","const":"entity_extracted","title":"Type"},"payload":{"$ref":"#/components/schemas/EntityExtractedWebhookPayload"}},"type":"object","required":["nonce","type","payload"],"title":"EntityExtractedWebhook"},"EntityExtractedWebhookPayload":{"properties":{"entity_id":{"type":"string","title":"Entity Id"},"document_id":{"type":"string","title":"Document Id"},"instruction_id":{"type":"string","title":"Instruction Id"},"document_metadata":{"additionalProperties":true,"type":"object","title":"Document Metadata"},"document_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document External Id"},"document_name":{"type":"string","title":"Document Name"},"partition":{"type":"string","title":"Partition"},"sync_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["entity_id","document_id","instruction_id","document_metadata","document_external_id","document_name","partition","sync_id","data"],"title":"EntityExtractedWebhookPayload"},"EntityList":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"entities":{"items":{"$ref":"#/components/schemas/Entity"},"type":"array","title":"Entities"}},"type":"object","required":["pagination","entities"],"title":"EntityList"},"EntitySchema":{"additionalProperties":true,"type":"object","title":"EntitySchema"},"ErrorMessage":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"ErrorMessage"},"EvaluatedAnswerStep":{"properties":{"type":{"type":"string","const":"evaluated_answer","title":"Type","default":"evaluated_answer"},"think":{"type":"string","title":"Think"},"current_question":{"type":"string","title":"Current Question"},"errored":{"type":"boolean","title":"Errored","default":false},"answer":{"$ref":"#/components/schemas/Answer"},"other_resolved_question_ids":{"items":{"type":"string"},"type":"array","title":"Other Resolved Question Ids","description":"A list of questions ids that are no longer relevant to the current answer referenced by their IDs."},"eval_passed":{"type":"boolean","title":"Eval Passed"},"eval_reason":{"type":"string","title":"Eval Reason"}},"type":"object","required":["think","current_question","answer","eval_passed","eval_reason"],"title":"EvaluatedAnswerStep"},"FailedStep":{"properties":{"type":{"type":"string","const":"failed","title":"Type","default":"failed"},"think":{"type":"string","title":"Think"},"current_question":{"type":"string","title":"Current Question"},"errored":{"type":"boolean","title":"Errored","default":false}},"type":"object","required":["think","current_question"],"title":"FailedStep"},"FileSearchOutput":{"properties":{"id":{"type":"string","title":"Id"},"queries":{"items":{"type":"string"},"type":"array","title":"Queries","description":"The queries used to search for files."},"status":{"type":"string","enum":["in_progress","searching","incomplete","completed","failed"],"title":"Status","default":"searching"},"type":{"type":"string","const":"file_search_call","title":"Type"},"results":{"items":{"$ref":"#/components/schemas/FileSearchResult"},"type":"array","title":"Results","description":"The results of the file search tool call."}},"type":"object","required":["id","queries","type","results"],"title":"FileSearchOutput"},"FileSearchResult":{"properties":{"file_id":{"type":"string","title":"File Id","description":"The unique ID of the document."},"filename":{"type":"string","title":"Filename","description":"The name of the document."},"score":{"type":"number","title":"Score","description":"The relevance score of the chunk - a value between 0 and 1."},"text":{"type":"string","title":"Text","description":"The text content of the chunk."},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes","description":"The attributes of the chunk."}},"type":"object","required":["file_id","filename","score","text","attributes"],"title":"FileSearchResult"},"FinalAnswer":{"properties":{"text":{"type":"string","title":"Text","description":"The final answer to the question."},"evidence":{"items":{"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterEvidence"},{"$ref":"#/components/schemas/RagieEvidence"}]},"type":"array","title":"Evidence","description":"The evidence used to derive the answer."},"steps":{"items":{"anyOf":[{"$ref":"#/components/schemas/AnswerStep"},{"$ref":"#/components/schemas/SearchStep"},{"$ref":"#/components/schemas/SearchStepWithQueryDetails"},{"$ref":"#/components/schemas/PlanStep"},{"$ref":"#/components/schemas/CodeStep"},{"$ref":"#/components/schemas/SurrenderStep"},{"$ref":"#/components/schemas/EvaluatedAnswerStep"},{"$ref":"#/components/schemas/FailedStep"}]},"type":"array","title":"Steps","description":"The steps that led to the answer."},"usage":{"$ref":"#/components/schemas/agent_hopps__models__models__Usage","description":"The usage of the models."}},"type":"object","required":["text"],"title":"FinalAnswer"},"FolderData":{"properties":{"folder_id":{"type":"string","title":"Folder Id"},"folder_name":{"type":"string","title":"Folder Name"}},"type":"object","required":["folder_id","folder_name"],"title":"FolderData"},"FormOption":{"properties":{"label":{"type":"string","title":"Label","description":"The text label visible next to the checkbox/radio."}},"type":"object","required":["label"],"title":"FormOption"},"FreshdeskCredentials":{"properties":{"domain":{"type":"string","title":"Domain"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["domain","api_key"],"title":"FreshdeskCredentials"},"FreshdeskData":{"properties":{"tickets":{"type":"boolean","title":"Tickets"},"articles":{"type":"boolean","title":"Articles"}},"type":"object","required":["tickets","articles"],"title":"FreshdeskData"},"GmailData":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","title":"GmailData"},"GoogleFolderData":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"mime_type":{"type":"string","title":"Mime Type"}},"type":"object","required":["id","name","mime_type"],"title":"GoogleFolderData"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HubspotData":{"properties":{"companies":{"type":"boolean","title":"Companies"},"contacts":{"type":"boolean","title":"Contacts"},"contact_notes":{"type":"boolean","title":"Contact Notes"},"deals":{"type":"boolean","title":"Deals"},"deal_notes":{"type":"boolean","title":"Deal Notes"},"emails":{"type":"boolean","title":"Emails"},"tasks":{"type":"boolean","title":"Tasks"}},"type":"object","required":["companies","contacts","contact_notes","deals","deal_notes","emails","tasks"],"title":"HubspotData"},"Image":{"properties":{"type":{"type":"string","const":"Image","title":"Type","default":"Image"},"content":{"type":"string","title":"Content","description":"The text visible inside the visual (OCR)"},"description":{"type":"string","title":"Description","description":"A detailed description of what the visual depicts."},"base64_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64 Data","description":"Base64 encoded image data, when available."}},"type":"object","required":["content","description"],"title":"Image"},"InputTokenDetails":{"properties":{"cached_tokens":{"type":"integer","title":"Cached Tokens","default":0}},"type":"object","title":"InputTokenDetails"},"Instruction":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"name":{"type":"string","title":"Name","description":"The name of the instruction. Must be unique.","examples":["Find all pizzas"]},"active":{"type":"boolean","title":"Active","description":"Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.","default":true,"examples":[true]},"scope":{"type":"string","enum":["document","chunk"],"title":"Scope","description":"The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.","default":"chunk","examples":["document"]},"prompt":{"type":"string","title":"Prompt","description":"A natural language instruction which will be applied to documents as they are created and updated. The results of the `instruction_prompt` will be stored as an `entity` in the schema defined by the `entity_schema` parameter.","examples":["Find all pizzas described in the text."]},"context_template":{"type":"string","title":"Context Template","description":"An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`.","examples":["Document: {{document.name}} {{document.metadata.key_foo}}"]},"entity_schema":{"$ref":"#/components/schemas/EntitySchema","description":"The JSON schema definition of the entity generated by an instruction. The schema must define an `object` at its root. If the instruction is expected to generate multiple items, the root object should have a key which defines an array of the expected items. An instruction which generates multiple emails may be expressed as `{\"type\": \"object\", \"properties\": {\"emails\": { \"type\": \"array\", \"items\": { \"type\": \"string\"}}}}`. Simple values may be expressed as an object with a single key. For example, a summary instruction may generate a single string value. The schema might be `{\"type\": \"object\", \"properties\": { \"summary\": { \"type\": \"string\"}}}`.","examples":[{"additionalProperties":false,"properties":{"size":{"enum":["small","medium","large"],"type":"string"},"crust":{"enum":["thin","thick","stuffed"],"type":"string"},"sauce":{"enum":["tomato","alfredo","pesto"],"type":"string"},"cheese":{"enum":["mozzarella","cheddar","parmesan","vegan"],"type":"string"},"toppings":{"items":{"enum":["pepperoni","mushrooms","onions","sausage","bacon","extra cheese","black olives","green peppers","pineapple","spinach"],"type":"string"},"type":"array"},"extraInstructions":{"type":"string"}},"required":["size","crust","sauce","cheese"],"title":"Pizza","type":"object"}],"additional_properties":true},"filter":{"additionalProperties":true,"type":"object","title":"Filter","description":"An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter.  The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.","examples":[{"toppings":{"$in":["pizza","mushrooms"]}}]},"partition":{"type":"string","title":"Partition","description":"An optional partition identifier. Instructions can be scoped to a partition. An instruction that defines a partition will only be executed for documents in that partition.","examples":[null]}},"type":"object","required":["id","created_at","updated_at","name","prompt","entity_schema"],"title":"Instruction"},"InstructionEntityExtractionLog":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"instruction_id":{"type":"string","format":"uuid","title":"Instruction Id","description":"The ID of the instruction which generated the entity."},"document_id":{"type":"string","format":"uuid","title":"Document Id","description":"The ID of the document which the entity was produced from."},"scope":{"type":"string","enum":["document","chunk"],"title":"Scope","description":"Whether extraction was attempted at document scope or chunk scope."},"chunk_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Index","description":"Chunk index when scope is `chunk`; null when scope is `document`."},"status":{"type":"string","enum":["extracted","not_found","error"],"title":"Status","description":"Extraction status for this attempt."},"reason_code":{"anyOf":[{"type":"string","enum":["NO_MATCH","AMBIGUOUS","OUT_OF_SCOPE","SCHEMA_INVALID","MODEL_ERROR"]},{"type":"null"}],"title":"Reason Code","description":"Machine-readable reason code when available. Values: `NO_MATCH`, `AMBIGUOUS`, `OUT_OF_SCOPE`, `SCHEMA_INVALID`, `MODEL_ERROR`."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Optional debug text for this attempt. Usually model-provided; may be system-generated when normalization/parsing fails."},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","description":"Machine-readable extraction error identifiers. Public responses map internal entity-shape validation failures to `unexpected_error`. Common values include `unexpected_error`, `invalid_instruction_schema`, and `empty_completion_content`. Raw provider/runtime error strings may also appear."},"page_count":{"type":"number","title":"Page Count","description":"Input pages for this extraction attempt."}},"type":"object","required":["id","created_at","updated_at","instruction_id","document_id","scope","status","page_count"],"title":"InstructionEntityExtractionLog"},"InstructionEntityExtractionLogList":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"logs":{"items":{"$ref":"#/components/schemas/InstructionEntityExtractionLog"},"type":"array","title":"Logs"}},"type":"object","required":["pagination","logs"],"title":"InstructionEntityExtractionLogList"},"IntercomCredentials":{"properties":{"access_token":{"type":"string","title":"Access Token"},"app_name":{"type":"string","title":"App Name"},"user_email":{"type":"string","title":"User Email","description":"The email of the Intercom account this is for"}},"type":"object","required":["access_token","app_name","user_email"],"title":"IntercomCredentials"},"IntercomData":{"properties":{"articles_help_center":{"type":"boolean","title":"Articles Help Center","default":false},"admins":{"type":"boolean","title":"Admins","default":false},"contacts":{"type":"boolean","title":"Contacts","default":false},"conversations":{"type":"boolean","title":"Conversations","default":false},"conversation_attachments":{"type":"boolean","title":"Conversation Attachments","default":false},"conversation_notes":{"type":"boolean","title":"Conversation Notes","default":false},"tickets":{"type":"boolean","title":"Tickets","default":false},"ticket_attachments":{"type":"boolean","title":"Ticket Attachments","default":false},"ticket_comments":{"type":"boolean","title":"Ticket Comments","default":false},"ticket_notes":{"type":"boolean","title":"Ticket Notes","default":false},"filter_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter User Id"}},"type":"object","title":"IntercomData"},"Link":{"properties":{"href":{"type":"string","title":"Href"},"type":{"type":"string","title":"Type"}},"type":"object","required":["href","type"],"title":"Link"},"ListConnectorSourceTypeInfo":{"properties":{"connectors":{"items":{"$ref":"#/components/schemas/ConnectorSourceTypeInfo"},"type":"array","title":"Connectors"}},"type":"object","required":["connectors"],"title":"ListConnectorSourceTypeInfo"},"ListDocumentElements":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"document_elements":{"items":{"$ref":"#/components/schemas/ApiDocumentElement"},"type":"array","title":"Document Elements"}},"type":"object","required":["pagination","document_elements"],"title":"ListDocumentElements"},"ListItem":{"properties":{"type":{"type":"string","const":"ListItem","title":"Type","default":"ListItem"},"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"ListItem"},"MediaModeParam":{"properties":{"static":{"anyOf":[{"type":"string","enum":["hi_res","fast","agentic_ocr"]},{"type":"null"}],"title":"Static"},"audio":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Audio"},"video":{"anyOf":[{"type":"string","enum":["audio_only","video_only","audio_video"]},{"type":"null"}],"title":"Video"}},"type":"object","title":"MediaModeParam"},"MetadataFilter":{"additionalProperties":true,"type":"object","title":"MetadataFilter"},"ModelUsage":{"properties":{"model_name":{"type":"string","title":"Model Name"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"}},"type":"object","required":["model_name","input_tokens","output_tokens"],"title":"ModelUsage"},"NarrativeText":{"properties":{"type":{"type":"string","const":"NarrativeText","title":"Type","default":"NarrativeText"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"NarrativeText"},"OAuthCredentials":{"properties":{"provider":{"type":"string","enum":["atlassian","dropbox","microsoft","salesforce","slack","hubspot"],"title":"Provider"},"name":{"type":"string","title":"Name","description":"The unique name of your authenticator, used to identify it and distinguish it from others. This name must be unique. Attempting to reuse the same name will result in an error."},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},"type":"object","required":["provider","name","client_id","client_secret"],"title":"OAuthCredentials"},"OAuthRefreshTokenCredentials":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"OAuthRefreshTokenCredentials"},"OAuthUrlCreate":{"properties":{"redirect_uri":{"type":"string","title":"Redirect Uri"},"partition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition"},"source_type":{"$ref":"#/components/schemas/ConnectorSource","description":"The type of connector you want to create, such as google_drive, notion, hubspot, etc.","default":"google_drive"},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata","description":"Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.","default":{}},"mode":{"anyOf":[{"type":"string","enum":["hi_res","fast","agentic_ocr"]},{"$ref":"#/components/schemas/MediaModeParam"},{"type":"null"}],"title":"Mode"},"theme":{"anyOf":[{"type":"string","enum":["light","dark","system"]},{"type":"null"}],"title":"Theme","description":"Sets the theme of the Ragie Web UI when the user lands there. Can be light, dark, or system to use whatever the system value is. If omitted, system is used.","default":"system"},"page_limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page Limit","description":"The maximum number of pages a connection will sync. The connection will be disabled after this limit is reached. Some in progress documents may continue processing after the limit is reached. The limit will be enforced at the start of the next document sync. Remove the limit by setting to null.","examples":[1000]},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Optional config per connector","examples":[]},"authenticator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Authenticator Id"},"workflow":{"anyOf":[{"$ref":"#/components/schemas/DocumentWorkflow"},{"type":"null"}]},"sync_filter":{"$ref":"#/components/schemas/SyncFilter"}},"type":"object","required":["redirect_uri"],"title":"OAuthUrlCreate"},"OAuthUrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"OAuthUrlResponse"},"OnedriveData":{"properties":{"drive_id":{"type":"string","title":"Drive Id"},"folder_id":{"type":"string","title":"Folder Id"},"folder_name":{"type":"string","title":"Folder Name"}},"type":"object","required":["drive_id","folder_id","folder_name"],"title":"OnedriveData"},"OutputTokenDetails":{"properties":{"reasoning_tokens":{"type":"integer","title":"Reasoning Tokens","default":0}},"type":"object","title":"OutputTokenDetails"},"PageBreak":{"properties":{"type":{"type":"string","const":"PageBreak","title":"Type","default":"PageBreak"}},"type":"object","title":"PageBreak"},"Pagination":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["total_count"],"title":"Pagination"},"Partition":{"properties":{"name":{"type":"string","title":"Name"},"is_default":{"type":"boolean","title":"Is Default"},"limit_exceeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Limit Exceeded At","description":"Timestamp when the partition exceeded its limits, if applicable.","examples":["2025-06-11T12:00:00Z"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"context_aware":{"type":"boolean","title":"Context Aware"},"metadata_schema":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"}]},"type":"object"},{"type":"null"}],"title":"Metadata Schema"},"limits":{"$ref":"#/components/schemas/PartitionLimits"}},"type":"object","required":["name","is_default","description","context_aware","metadata_schema","limits"],"title":"Partition"},"PartitionDetail":{"properties":{"name":{"type":"string","title":"Name"},"is_default":{"type":"boolean","title":"Is Default"},"limit_exceeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Limit Exceeded At","description":"Timestamp when the partition exceeded its limits, if applicable.","examples":["2025-06-11T12:00:00Z"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"context_aware":{"type":"boolean","title":"Context Aware"},"metadata_schema":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"}]},"type":"object"},{"type":"null"}],"title":"Metadata Schema"},"limits":{"$ref":"#/components/schemas/PartitionLimits"},"stats":{"$ref":"#/components/schemas/PartitionStats"}},"type":"object","required":["name","is_default","description","context_aware","metadata_schema","limits","stats"],"title":"PartitionDetail"},"PartitionLimitExceededWebhook":{"properties":{"nonce":{"type":"string","title":"Nonce"},"type":{"type":"string","const":"partition_limit_exceeded","title":"Type"},"payload":{"$ref":"#/components/schemas/PartitionLimitExceededWebhookPayload"}},"type":"object","required":["nonce","type","payload"],"title":"PartitionLimitExceededWebhook"},"PartitionLimitExceededWebhookPayload":{"properties":{"partition":{"type":"string","title":"Partition"},"limit_type":{"type":"string","enum":["pages_processed_limit_monthly","pages_hosted_limit_monthly","pages_processed_limit_max","pages_hosted_limit_max","video_processed_limit_monthly","video_processed_limit_max","audio_processed_limit_monthly","audio_processed_limit_max","media_streamed_limit_monthly","media_streamed_limit_max","media_hosted_limit_monthly","media_hosted_limit_max"],"title":"Limit Type"}},"type":"object","required":["partition","limit_type"],"title":"PartitionLimitExceededWebhookPayload"},"PartitionLimitParams":{"properties":{"pages_hosted_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Pages Hosted Limit Monthly","description":"Monthly limit of hosted pages added in the current month in the partition.","examples":[1000]},"pages_processed_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Pages Processed Limit Monthly","description":"Monthly limit, in pages, for processed documents in the partition.","examples":[1000]},"pages_hosted_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Pages Hosted Limit Max","description":"Maximum limit, in pages, for hosted documents in the partition.","examples":[1000]},"pages_processed_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Pages Processed Limit Max","description":"Maximum limit, in pages, for processed documents in the partition.","examples":[1000]},"video_processed_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Video Processed Limit Monthly","description":"Monthly limit, in minutes, for video processing in the partition.","examples":[3600]},"video_processed_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Video Processed Limit Max","description":"Maximum limit, in minutes, for video processing in the partition.","examples":[3600]},"audio_processed_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Audio Processed Limit Monthly","description":"Monthly limit, in minutes, for audio processing in the partition.","examples":[3600]},"audio_processed_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Audio Processed Limit Max","description":"Maximum limit, in minutes, for audio processing in the partition.","examples":[3600]},"media_streamed_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Media Streamed Limit Monthly","description":"Monthly limit, in MBs, for media streamed from the partition.","examples":[1024]},"media_streamed_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Media Streamed Limit Max","description":"Maximum limit, in MBs, for media streamed from the partition.","examples":[1024]},"media_hosted_limit_monthly":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Media Hosted Limit Monthly","description":"Monthly limit, in MBs, for media hosted in the partition.","examples":[1024]},"media_hosted_limit_max":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Media Hosted Limit Max","description":"Maximum limit, in MBs, for media hosted in the partition.","examples":[1024]}},"type":"object","title":"PartitionLimitParams"},"PartitionLimitResetWebhook":{"properties":{"nonce":{"type":"string","title":"Nonce"},"type":{"type":"string","const":"partition_limit_reset","title":"Type"},"payload":{"$ref":"#/components/schemas/PartitionLimitResetWebhookPayload"}},"type":"object","required":["nonce","type","payload"],"title":"PartitionLimitResetWebhook"},"PartitionLimitResetWebhookPayload":{"properties":{"partition":{"type":"string","title":"Partition"}},"type":"object","required":["partition"],"title":"PartitionLimitResetWebhookPayload"},"PartitionLimits":{"properties":{"pages_processed_limit_monthly":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pages Processed Limit Monthly","description":"Monthly limit, in pages, for processed documents in the partition.","examples":[1000]},"pages_hosted_limit_monthly":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pages Hosted Limit Monthly","description":"Monthly limit of hosted pages added in the current month in the partition.","examples":[1000]},"pages_processed_limit_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pages Processed Limit Max","description":"Maximum limit, in pages, for processed documents in the partition.","examples":[1000]},"pages_hosted_limit_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Pages Hosted Limit Max","description":"Maximum limit, in pages, for hosted documents in the partition.","examples":[1000]},"video_processed_limit_monthly":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Video Processed Limit Monthly","description":"Monthly limit, in minutes, for video processing in the partition.","examples":[60]},"video_processed_limit_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Video Processed Limit Max","description":"Maximum limit, in minutes, for video processing in the partition.","examples":[60]},"audio_processed_limit_monthly":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Audio Processed Limit Monthly","description":"Monthly limit, in minutes, for audio processing in the partition.","examples":[60]},"audio_processed_limit_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Audio Processed Limit Max","description":"Maximum limit, in minutes, for audio processing in the partition.","examples":[60]},"media_streamed_limit_monthly":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Media Streamed Limit Monthly","description":"Monthly limit, in MBs, for media streamed from the partition.","examples":[1024]},"media_streamed_limit_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Media Streamed Limit Max","description":"Maximum limit, in MBs, for media streamed from the partition.","examples":[1024]},"media_hosted_limit_monthly":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Media Hosted Limit Monthly","description":"Monthly limit, in MBs, for media hosted in the partition.","examples":[1024]},"media_hosted_limit_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Media Hosted Limit Max","description":"Maximum limit, in MBs, for media hosted in the partition.","examples":[1024]}},"type":"object","title":"PartitionLimits"},"PartitionList":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"partitions":{"items":{"$ref":"#/components/schemas/Partition"},"type":"array","title":"Partitions"}},"type":"object","required":["pagination","partitions"],"title":"PartitionList"},"PartitionStats":{"properties":{"pages_processed_monthly":{"type":"number","title":"Pages Processed Monthly","description":"Number of pages processed in the current month in this partition.","examples":[1000.0]},"pages_hosted_monthly":{"type":"number","title":"Pages Hosted Monthly","description":"Number of hosted pages added in the current month in this partition.","examples":[1000.0]},"pages_processed_total":{"type":"number","title":"Pages Processed Total","description":"Total number of pages processed in this partition.","examples":[1000.0]},"pages_hosted_total":{"type":"number","title":"Pages Hosted Total","description":"Total number of hosted pages in this partition.","examples":[1000.0]},"document_count":{"type":"integer","title":"Document Count","description":"Total number of documents, inclusive of all files types, in this partition.","examples":[1000]},"video_processed_monthly":{"type":"number","title":"Video Processed Monthly","description":"Total number of seconds of video processed in the current month in this partition.","examples":[60]},"video_processed_total":{"type":"number","title":"Video Processed Total","description":"Total number of seconds of video processed in this partition.","examples":[60]},"audio_processed_monthly":{"type":"number","title":"Audio Processed Monthly","description":"Total number of seconds of audio processed in the current month in this partition.","examples":[60]},"audio_processed_total":{"type":"number","title":"Audio Processed Total","description":"Total number of seconds of audio processed in this partition.","examples":[60]},"media_streamed_monthly":{"type":"number","title":"Media Streamed Monthly","description":"Total number of MBs streamed in the current month in this partition.","examples":[1024]},"media_streamed_total":{"type":"number","title":"Media Streamed Total","description":"Total number of MBs streamed in this partition.","examples":[1024]},"media_hosted_monthly":{"type":"number","title":"Media Hosted Monthly","description":"Total number of MBs hosted in the current month in this partition.","examples":[1024]},"media_hosted_total":{"type":"number","title":"Media Hosted Total","description":"Total number of MBs hosted in this partition.","examples":[1024]}},"type":"object","required":["pages_processed_monthly","pages_hosted_monthly","pages_processed_total","pages_hosted_total","document_count","video_processed_monthly","video_processed_total","audio_processed_monthly","audio_processed_total","media_streamed_monthly","media_streamed_total","media_hosted_monthly","media_hosted_total"],"title":"PartitionStats"},"PatchDocumentMetadataParams":{"properties":{"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"The metadata to update on the document. Performs a partial update of the document's metadata. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. Keys set to `null` are deleted. 1000 total values are allowed, inclusive of existing metadata. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`. If the document is managed by a connection, this operation will extend a metadata overlay which is applied to the document any time the connection syncs the document.","examples":[{"classified":"null (setting null deletes key from metadata)","editors":["Alice","Bob"],"published":true,"articleCount":42,"title":"declassified report"}]},"async":{"type":"boolean","title":"Async","description":"Whether to run the metadata update asynchronously. If true, the metadata update will be run in the background and the response will be 202. If false, the metadata update will be run synchronously and the response will be 200.","default":false}},"type":"object","required":["metadata"],"title":"PatchDocumentMetadataParams"},"PatchInstructionParams":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the instruction. Must be unique.","examples":["Find all pizzas"]},"active":{"type":"boolean","title":"Active","description":"Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.","examples":[true]},"scope":{"type":"string","enum":["document","chunk"],"title":"Scope","description":"The scope of the instruction. Determines whether the instruction is applied to the entire document or to each chunk of the document. Options are `'document'` or `'chunk'`. Generally `'document'` should be used when analyzing the full document is desired, such as when generating a summary or determining sentiment, and `'chunk'` should be used when a fine grained search over a document is desired.","examples":["document"]},"prompt":{"type":"string","title":"Prompt","description":"A natural language instruction which will be applied to documents as they are created and updated. The results of the `instruction_prompt` will be stored as an `entity` in the schema defined by the `entity_schema` parameter.","examples":["Find all pizzas described in the text."]},"context_template":{"type":"string","title":"Context Template","description":"An optional mustache style template used to prepend document context to the content sent for entity extraction. Available variables include `document.name`, `document.type`, `document.source`, and nested values under `document.metadata`.","examples":["Document: {{document.name}} {{document.metadata.key_foo}}"]},"entity_schema":{"$ref":"#/components/schemas/EntitySchema","title":"Entity Schema","description":"The JSON schema definition of the entity generated by an instruction. The schema must define an `object` at its root. If the instruction is expected to generate multiple items, the root object should have a key which defines an array of the expected items. An instruction which generates multiple emails may be expressed as `{\"type\": \"object\", \"properties\": {\"emails\": { \"type\": \"array\", \"items\": { \"type\": \"string\"}}}}`. Simple values may be expressed as an object with a single key. For example, a summary instruction may generate a single string value. The schema might be `{\"type\": \"object\", \"properties\": { \"summary\": { \"type\": \"string\"}}}`.","examples":[{"additionalProperties":false,"properties":{"size":{"enum":["small","medium","large"],"type":"string"},"crust":{"enum":["thin","thick","stuffed"],"type":"string"},"sauce":{"enum":["tomato","alfredo","pesto"],"type":"string"},"cheese":{"enum":["mozzarella","cheddar","parmesan","vegan"],"type":"string"},"toppings":{"items":{"enum":["pepperoni","mushrooms","onions","sausage","bacon","extra cheese","black olives","green peppers","pineapple","spinach"],"type":"string"},"type":"array"},"extraInstructions":{"type":"string"}},"required":["size","crust","sauce","cheese"],"title":"Pizza","type":"object"}],"additional_properties":true},"filter":{"additionalProperties":true,"type":"object","title":"Filter","description":"An optional metadata filter that is matched against document metadata during update and creation. The instruction will only be applied to documents with metadata matching the filter.  The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.","examples":[{"toppings":{"$in":["pizza","mushrooms"]}}]}},"additionalProperties":false,"type":"object","title":"PatchInstructionParams"},"PlanStep":{"properties":{"type":{"type":"string","const":"plan","title":"Type","default":"plan"},"think":{"type":"string","title":"Think"},"current_question":{"type":"string","title":"Current Question"},"errored":{"type":"boolean","title":"Errored","default":false},"questions_to_answer":{"items":{"type":"string"},"type":"array","title":"Questions To Answer","description":"The questions that need to be answered to answer the original question."}},"type":"object","required":["think","current_question"],"title":"PlanStep"},"PublicBackblazeConnection":{"properties":{"provider":{"type":"string","const":"backblaze","title":"Provider"},"data":{"$ref":"#/components/schemas/BucketData"},"credentials":{"$ref":"#/components/schemas/BackblazeCredentials"}},"type":"object","required":["provider","data","credentials"],"title":"PublicBackblazeConnection"},"PublicCreateConnection":{"properties":{"partition_strategy":{"$ref":"#/components/schemas/MediaModeParam"},"partition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition"},"page_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Limit","examples":[null,100]},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","examples":[null]},"metadata":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"type":"object","title":"Metadata","description":"Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.","default":{}},"workflow":{"anyOf":[{"$ref":"#/components/schemas/DocumentWorkflow"},{"type":"null"}]},"sync_filter":{"$ref":"#/components/schemas/SyncFilter"},"connection":{"oneOf":[{"$ref":"#/components/schemas/PublicBackblazeConnection"},{"$ref":"#/components/schemas/PublicGCSConnection"},{"$ref":"#/components/schemas/PublicFreshdeskConnection"},{"$ref":"#/components/schemas/PublicIntercomConnection"},{"$ref":"#/components/schemas/PublicS3CompatibleConnection"},{"$ref":"#/components/schemas/PublicWebcrawlerConnection"},{"$ref":"#/components/schemas/PublicZendeskConnection"}],"title":"Connection","discriminator":{"propertyName":"provider","mapping":{"backblaze":"#/components/schemas/PublicBackblazeConnection","freshdesk":"#/components/schemas/PublicFreshdeskConnection","gcs":"#/components/schemas/PublicGCSConnection","intercom":"#/components/schemas/PublicIntercomConnection","s3":"#/components/schemas/PublicS3CompatibleConnection","webcrawler":"#/components/schemas/PublicWebcrawlerConnection","zendesk":"#/components/schemas/PublicZendeskConnection"}}}},"type":"object","required":["partition_strategy","connection"],"title":"PublicCreateConnection"},"PublicFreshdeskConnection":{"properties":{"provider":{"type":"string","const":"freshdesk","title":"Provider"},"data":{"$ref":"#/components/schemas/FreshdeskData"},"user_email":{"type":"string","title":"User Email","description":"The email the API key is associated with"},"credentials":{"$ref":"#/components/schemas/FreshdeskCredentials"}},"type":"object","required":["provider","data","user_email","credentials"],"title":"PublicFreshdeskConnection"},"PublicGCSConnection":{"properties":{"provider":{"type":"string","const":"gcs","title":"Provider"},"data":{"$ref":"#/components/schemas/BucketData"},"credentials":{"additionalProperties":true,"type":"object","title":"Credentials"}},"type":"object","required":["provider","data","credentials"],"title":"PublicGCSConnection"},"PublicIntercomConnection":{"properties":{"provider":{"type":"string","const":"intercom","title":"Provider"},"data":{"$ref":"#/components/schemas/IntercomData"},"credentials":{"$ref":"#/components/schemas/IntercomCredentials"}},"type":"object","required":["provider","data","credentials"],"title":"PublicIntercomConnection"},"PublicS3CompatibleConnection":{"properties":{"provider":{"type":"string","const":"s3","title":"Provider"},"data":{"$ref":"#/components/schemas/BucketData"},"credentials":{"$ref":"#/components/schemas/S3CompatibleCredentials"}},"type":"object","required":["provider","data","credentials"],"title":"PublicS3CompatibleConnection"},"PublicWebcrawlerConnection":{"properties":{"provider":{"type":"string","const":"webcrawler","title":"Provider"},"data":{"$ref":"#/components/schemas/WebcrawlerData"},"credentials":{"additionalProperties":true,"type":"object","title":"Credentials","default":{}}},"type":"object","required":["provider","data"],"title":"PublicWebcrawlerConnection"},"PublicZendeskConnection":{"properties":{"provider":{"type":"string","const":"zendesk","title":"Provider"},"data":{"$ref":"#/components/schemas/ZendeskData"},"credentials":{"$ref":"#/components/schemas/ZendeskCredentials"}},"type":"object","required":["provider","data","credentials"],"title":"PublicZendeskConnection"},"QueryDetails":{"properties":{"query":{"type":"string","title":"Query"},"search_effort":{"$ref":"#/components/schemas/SearchEffort"},"metadata_filter":{"additionalProperties":true,"type":"object","title":"Metadata Filter"},"search_results":{"items":{"$ref":"#/components/schemas/RagieEvidence"},"type":"array","title":"Search Results"}},"type":"object","required":["query","search_effort","metadata_filter","search_results"],"title":"QueryDetails"},"RagieEvidence":{"properties":{"type":{"type":"string","const":"ragie","title":"Type","default":"ragie"},"text":{"type":"string","title":"Text"},"id":{"type":"string","title":"Id","description":"The chunk id of the evidence."},"index":{"type":"integer","title":"Index","description":"The index of the chunk in the document."},"document_id":{"type":"string","title":"Document Id","description":"The document id of the document containing the chunk being used as evidence."},"document_name":{"type":"string","title":"Document Name","description":"The name of the document that contains the chunk being used as evidence."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"The metadata of the chunk being used as evidence."},"document_metadata":{"additionalProperties":true,"type":"object","title":"Document Metadata","description":"The metadata of the document that contains the evidence."},"links":{"additionalProperties":{"$ref":"#/components/schemas/SearchResultLink"},"type":"object","title":"Links","description":"The links to the evidence."}},"type":"object","required":["text","id","index","document_id","document_name"],"title":"RagieEvidence"},"Reasoning":{"properties":{"effort":{"type":"string","enum":["low","medium","high"],"title":"Effort"},"summary":{"type":"null","title":"Summary"}},"type":"object","required":["effort"],"title":"Reasoning"},"ReasoningOutput":{"properties":{"id":{"type":"string","title":"Id","description":"The unique ID of the reasoning output."},"summary":{"items":{"$ref":"#/components/schemas/ReasoningSummary"},"type":"array","title":"Summary","description":"The summary of the reasoning."},"type":{"type":"string","const":"reasoning","title":"Type","default":"reasoning"},"content":{"items":{"$ref":"#/components/schemas/ReasoningText"},"type":"array","title":"Content","description":"The content of the reasoning."},"encrypted_content":{"type":"string","title":"Encrypted Content","description":"The encrypted content of the reasoning output."},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Status","default":"completed"}},"type":"object","required":["id","summary","content","encrypted_content"],"title":"ReasoningOutput"},"ReasoningSummary":{"properties":{"summary":{"type":"string","title":"Summary","description":"The summary of the reasoning."},"type":{"type":"string","const":"summary","title":"Type","default":"summary"}},"type":"object","required":["summary"],"title":"ReasoningSummary"},"ReasoningText":{"properties":{"text":{"type":"string","title":"Text","description":"The text of the reasoning."},"type":{"type":"string","const":"reasoning_text","title":"Type","default":"reasoning_text"}},"type":"object","required":["text"],"title":"ReasoningText"},"Request":{"properties":{"input":{"type":"string","title":"Input","description":"The text used to generate the response. Generally a question or a query."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"The instructions inserted in the prompt. For this agent, the instructions are injected during search related steps."},"tools":{"items":{"$ref":"#/components/schemas/Tool"},"type":"array","title":"Tools","description":"The tools available to the agent. Currently the only tool is retrieve. The `default` partition is used by default unless an other partition is specified.","default":[{"type":"retrieve","partitions":["default"]}]},"model":{"type":"string","const":"deep-search","title":"Model","description":"The model to use for the agent. Currently the only model is deep-search.","default":"deep-search"},"reasoning":{"$ref":"#/components/schemas/Reasoning","description":"The reasoning to use for the agent. The default effort level is medium.","default":{"effort":"medium"}},"stream":{"type":"boolean","title":"Stream","description":"Whether to stream the response","default":false}},"type":"object","required":["input"],"title":"Request"},"Response":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"response","title":"Object","default":"response"},"created_at":{"type":"integer","title":"Created At"},"status":{"type":"string","enum":["completed","failed","in_progress","cancelled"],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"incomplete_details":{"type":"null","title":"Incomplete Details"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"max_output_tokens":{"type":"null","title":"Max Output Tokens"},"model":{"type":"string","const":"deep-search","title":"Model","default":"deep-search"},"output":{"items":{"anyOf":[{"$ref":"#/components/schemas/ResponseOutputMessage"},{"$ref":"#/components/schemas/ReasoningOutput"},{"$ref":"#/components/schemas/CodeInterpreterOutput"},{"$ref":"#/components/schemas/FileSearchOutput"}]},"type":"array","title":"Output"},"output_parsed":{"anyOf":[{"$ref":"#/components/schemas/FinalAnswer"},{"type":"null"}]},"tools":{"items":{"$ref":"#/components/schemas/Tool"},"type":"array","title":"Tools"},"reasoning":{"$ref":"#/components/schemas/Reasoning"},"parallel_tool_calls":{"type":"boolean","title":"Parallel Tool Calls","default":false},"store":{"type":"boolean","title":"Store","default":false},"temperature":{"type":"number","title":"Temperature","default":1.0},"previous_response_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Response Id"},"tool_choice":{"type":"string","const":"auto","title":"Tool Choice","default":"auto"},"top_p":{"type":"number","title":"Top P","default":1.0},"truncation":{"type":"string","const":"disabled","title":"Truncation","default":"disabled"},"usage":{"$ref":"#/components/schemas/ragie__api__schema__response__Usage"},"user":{"type":"null","title":"User"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}}},"type":"object","required":["id","created_at","status","output","tools","reasoning","usage"],"title":"Response"},"ResponseContent":{"properties":{"type":{"type":"string","const":"text","title":"Type","default":"text"},"text":{"type":"string","title":"Text"},"annotations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Annotations","default":[]}},"type":"object","required":["text"],"title":"ResponseContent"},"ResponseOK":{"properties":{"message":{"type":"string","title":"Message","default":"ok"}},"type":"object","title":"ResponseOK"},"ResponseOutputMessage":{"properties":{"type":{"type":"string","const":"message","title":"Type","default":"message"},"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"assistant","title":"Role","default":"assistant"},"content":{"items":{"$ref":"#/components/schemas/ResponseContent"},"type":"array","title":"Content"}},"type":"object","required":["id","content"],"title":"ResponseOutputMessage"},"Retrieval":{"properties":{"scored_chunks":{"items":{"$ref":"#/components/schemas/ScoredChunk"},"type":"array","title":"Scored Chunks"}},"type":"object","required":["scored_chunks"],"title":"Retrieval"},"RetrieveParams":{"properties":{"query":{"type":"string","title":"Query","description":"The query to search with when retrieving document chunks.","examples":["What is the best pizza place in SF?"]},"top_k":{"type":"integer","title":"Top K","description":"The maximum number of chunks to return. Defaults to 8.","default":8,"examples":[8]},"filter":{"$ref":"#/components/schemas/MetadataFilter","title":"Filter","description":"The metadata search filter on documents. Returns chunks only from documents which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.","examples":[{"department":{"$in":["sales","marketing"]}}]},"rerank":{"type":"boolean","title":"Rerank","description":"Reranks the chunks for semantic relevancy post cosine similarity. Will be slower but returns a subset of highly relevant chunks. Best for reducing hallucinations and improving accuracy for LLM generation.","default":false,"examples":[true]},"max_chunks_per_document":{"type":"integer","title":"Max Chunks Per Document","description":"Maximum number of chunks to retrieve per document. Use this to increase the number of documents the final chunks are retrieved from. This feature is in beta and may change in the future.","examples":[0]},"partition":{"type":"string","title":"Partition","description":"The partition to scope a retrieval to. If omitted, the retrieval will be scoped to the default partition, which includes any documents that have not been created in a partition.","examples":[null]},"recency_bias":{"type":"boolean","title":"Recency Bias","description":"Enables recency bias which will favor more recent documents vs older documents. https://docs.ragie.ai/docs/retrievals-recency-bias","default":false,"examples":[false]}},"type":"object","required":["query"],"title":"RetrieveParams"},"S3CompatibleCredentials":{"properties":{"access_key_id":{"type":"string","title":"Access Key Id"},"secret_access_key":{"type":"string","title":"Secret Access Key"},"region":{"type":"string","title":"Region"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"}},"type":"object","required":["access_key_id","secret_access_key","region"],"title":"S3CompatibleCredentials"},"ScoredChunk":{"properties":{"text":{"type":"string","title":"Text"},"score":{"type":"number","title":"Score"},"id":{"type":"string","title":"Id"},"index":{"type":"integer","title":"Index"},"metadata":{"$ref":"#/components/schemas/ChunkMetadata","default":{}},"document_id":{"type":"string","title":"Document Id"},"document_name":{"type":"string","title":"Document Name"},"document_metadata":{"$ref":"#/components/schemas/DocumentMetadata"},"links":{"additionalProperties":{"$ref":"#/components/schemas/Link"},"type":"object","title":"Links"}},"type":"object","required":["text","score","id","index","document_id","document_name","document_metadata","links"],"title":"ScoredChunk"},"Search":{"properties":{"search_requests":{"items":{"type":"string"},"type":"array","title":"Search Requests"}},"type":"object","required":["search_requests"],"title":"Search"},"SearchEffort":{"type":"string","enum":["low","medium","high"],"title":"SearchEffort"},"SearchResultLink":{"properties":{"href":{"type":"string","title":"Href"},"type":{"type":"string","title":"Type"}},"type":"object","required":["href","type"],"title":"SearchResultLink"},"SearchStep":{"properties":{"type":{"type":"string","const":"base_search","title":"Type","default":"base_search"},"think":{"type":"string","title":"Think"},"current_question":{"type":"string","title":"Current Question"},"errored":{"type":"boolean","title":"Errored","default":false},"search":{"$ref":"#/components/schemas/Search","description":"The search request to be made."}},"type":"object","required":["think","current_question","search"],"title":"SearchStep"},"SearchStepWithQueryDetails":{"properties":{"type":{"type":"string","const":"search","title":"Type","default":"search"},"think":{"type":"string","title":"Think"},"current_question":{"type":"string","title":"Current Question"},"errored":{"type":"boolean","title":"Errored","default":false},"search":{"$ref":"#/components/schemas/Search","description":"The search request to be made."},"query_details":{"items":{"$ref":"#/components/schemas/QueryDetails"},"type":"array","title":"Query Details"},"search_log":{"type":"string","title":"Search Log","description":"A log of the search results you found.","default":""}},"type":"object","required":["think","current_question","search"],"title":"SearchStepWithQueryDetails"},"SetConnectionEnabledPayload":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"reason":{"anyOf":[{"type":"string","enum":["connection_over_total_page_limit","authentication_failed","tenant_account_disabled"]},{"type":"null"}],"title":"Reason"}},"type":"object","required":["enabled"],"title":"SetConnectionEnabledPayload"},"SharepointData":{"properties":{"site":{"$ref":"#/components/schemas/SharepointSiteData"},"drive":{"anyOf":[{"$ref":"#/components/schemas/SharepointDriveData"},{"type":"null"}]},"files":{"items":{"$ref":"#/components/schemas/SharepointFileData"},"type":"array","title":"Files"}},"type":"object","required":["site","drive","files"],"title":"SharepointData"},"SharepointDriveData":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"SharepointDriveData"},"SharepointFileData":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"type":{"type":"string","enum":["file","folder"],"title":"Type"},"drive_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Drive Id"}},"type":"object","required":["id","name","path","type","drive_id"],"title":"SharepointFileData"},"SharepointSiteData":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["id","name","display_name"],"title":"SharepointSiteData"},"SlackData":{"properties":{"channel_id":{"type":"string","title":"Channel Id"},"channel_name":{"type":"string","title":"Channel Name"}},"type":"object","required":["channel_id","channel_name"],"title":"SlackData"},"SpreadsheetLocation":{"properties":{"location_type":{"type":"string","const":"spreadsheet","title":"Location Type","default":"spreadsheet"},"range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range","description":"Excel-style range like 'A1:C10'"},"sheet_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet Name","description":"Name of the sheet"},"sheet_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sheet Index","description":"0-based index of the sheet"}},"type":"object","title":"SpreadsheetLocation","description":"Location within a spreadsheet using cell ranges."},"SurrenderStep":{"properties":{"type":{"type":"string","const":"surrender","title":"Type","default":"surrender"},"think":{"type":"string","title":"Think"},"current_question":{"type":"string","title":"Current Question"},"errored":{"type":"boolean","title":"Errored","default":false},"partial_answer":{"$ref":"#/components/schemas/Answer","description":"The a potential partial answer when a full answer was not possible."}},"type":"object","required":["think","current_question","partial_answer"],"title":"SurrenderStep"},"SyncFilter":{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"type":"object"},"Tool":{"properties":{"type":{"type":"string","const":"retrieve","title":"Type"},"partitions":{"items":{"type":"string"},"type":"array","title":"Partitions"}},"type":"object","required":["type","partitions"],"title":"Tool"},"UncategorizedText":{"properties":{"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"UncategorizedText"},"UpdateDocumentFromUrlParams":{"properties":{"mode":{"anyOf":[{"type":"string","enum":["hi_res","fast","agentic_ocr"]},{"$ref":"#/components/schemas/MediaModeParam"}],"title":"Mode","description":"Partition strategy for the document.\nDifferent strategies exist for textual, audio and video file types and you can set the strategy you want for \neach file type, or just for textual types.\n\nFor textual documents the options are `'hi_res'` or `'fast'`.\nWhen set to `'hi_res'`, images and tables will be extracted from the document.\n`'fast'` will only extract text.\n`'fast'` may be up to 20x faster than `'hi_res'`.\n`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.\nImages will always be processed in `hi_res`.\nIf `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.\n\nFor audio files, the options are true or false. True if you want to process audio, false otherwise.        \n\nFor video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.\n`'audio_only'` will extract just the audio part of the video.\n`'video_only'` will similarly just extract the video part, ignoring audio.\n`'audio_video'` will extract both audio and video.\n\nTo process all media types at the highest quality, use `'all'`.\n\nWhen you specify audio or video stategies, the format must be a JSON object. In this case,\ntextual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. \nSee examples below.\n\nExamples\n\nTextual documents only\n    \"fast\"\n\nVideo documents only\n{\n    \"video\": \"audio_video\"\n}\n\nSpecify multiple document types\n{\n    \"static\": \"hi_res\",\n    \"audio\": true,\n    \"video\": \"video_only\"\n}\n\nSpecify only textual or audio document types\n{\n    \"static\": \"fast\",\n    \"audio\": true\n}\n\nHighest quality processing for all media types\n    \"all\"\n\nAgentic OCR\n    \"agentic_ocr\"\n    Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai.","default":"fast"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url","description":"Url of the file to download. Must be publicly accessible and HTTP or HTTPS scheme."}},"type":"object","required":["url"],"title":"UpdateDocumentFromUrlParams"},"UpdateDocumentRawParams":{"properties":{"data":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}],"minLength":1,"title":"Data","description":"Document data in a text or JSON format."}},"type":"object","required":["data"],"title":"UpdateDocumentRawParams"},"UpdateInstructionParams":{"properties":{"active":{"type":"boolean","title":"Active","description":"Whether the instruction is active. Active instructions are applied to documents when they're created or when their file is updated.","examples":[true]}},"type":"object","required":["active"],"title":"UpdateInstructionParams"},"UpdatePartitionParams":{"properties":{"context_aware":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Context Aware","description":"Enable context-aware descriptions for the partition."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the partition."},"metadata_schema":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"additionalProperties":true,"type":"object"}]},"type":"object"},{"type":"null"}],"title":"Metadata Schema","description":"Metadata schema for the partition. This is an optional subset of the metadata of documents in the partition, defined as JSON Schema, that can be used in filter generatation. Providing detailed descriptions of the fields in the schema can be helpful for LLMs generating filters dynamically."}},"type":"object","title":"UpdatePartitionParams"},"UpdateWebhookEndpointPayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Url"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"partition_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition Pattern"}},"type":"object","title":"UpdateWebhookEndpointPayload"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoModalityData":{"properties":{"type":{"type":"string","const":"video","title":"Type","default":"video"},"word_timestamps":{"items":{"$ref":"#/components/schemas/WordTimestamp"},"type":"array","title":"Word Timestamps","default":[]}},"type":"object","title":"VideoModalityData"},"VideoSegment":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"}},"type":"object","title":"VideoSegment"},"WebcrawlerData":{"properties":{"url":{"type":"string","title":"Url"},"restrict_domain":{"type":"boolean","title":"Restrict Domain","default":true},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth"},"max_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pages"}},"type":"object","required":["url"],"title":"WebcrawlerData"},"WebhookEndpoint":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"name":{"type":"string","title":"Name"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"partition_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition Pattern"},"active":{"type":"boolean","title":"Active"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","created_at","updated_at","name","url","partition_pattern","active","secret"],"title":"WebhookEndpoint"},"WebhookEndpointList":{"properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"webhook_endpoints":{"items":{"$ref":"#/components/schemas/WebhookEndpoint"},"type":"array","title":"Webhook Endpoints"}},"type":"object","required":["pagination","webhook_endpoints"],"title":"WebhookEndpointList"},"WordModality":{"properties":{"word":{"type":"string","title":"Word"},"probability":{"type":"number","title":"Probability"},"start":{"type":"number","title":"Start"},"end":{"type":"number","title":"End"}},"type":"object","required":["word","probability","start","end"],"title":"WordModality"},"WordTimestamp":{"properties":{"start_time":{"type":"number","title":"Start Time"},"end_time":{"type":"number","title":"End Time"},"word":{"type":"string","title":"Word"},"probability":{"type":"number","title":"Probability"}},"type":"object","required":["start_time","end_time","word","probability"],"title":"WordTimestamp"},"ZendeskCredentials":{"properties":{"domain":{"type":"string","title":"Domain"},"email":{"type":"string","title":"Email"},"api_token":{"type":"string","title":"Api Token"}},"type":"object","required":["domain","email","api_token"],"title":"ZendeskCredentials"},"ZendeskData":{"properties":{"articles":{"type":"boolean","title":"Articles"}},"type":"object","required":["articles"],"title":"ZendeskData"},"agent_hopps__models__models__Usage":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelUsage"},"type":"array","title":"Models"}},"type":"object","title":"Usage"},"ragie__api__schema__response__Usage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens"},"input_token_details":{"$ref":"#/components/schemas/InputTokenDetails","default":{"cached_tokens":0}},"output_tokens":{"type":"integer","title":"Output Tokens"},"output_token_details":{"$ref":"#/components/schemas/OutputTokenDetails","default":{"reasoning_tokens":0}},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["input_tokens","output_tokens","total_tokens"],"title":"Usage"},"CreateDocumentParams":{"type":"object","title":"CreateDocumentParams","properties":{"mode":{"type":"object","title":"Mode","description":"Partition strategy for the document.\nDifferent strategies exist for textual, audio and video file types and you can set the strategy you want for \neach file type, or just for textual types.\n\nFor textual documents the options are `'hi_res'` or `'fast'`.\nWhen set to `'hi_res'`, images and tables will be extracted from the document.\n`'fast'` will only extract text.\n`'fast'` may be up to 20x faster than `'hi_res'`.\n`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.\nImages will always be processed in `hi_res`.\nIf `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.\n\nFor audio files, the options are true or false. True if you want to process audio, false otherwise.        \n\nFor video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.\n`'audio_only'` will extract just the audio part of the video.\n`'video_only'` will similarly just extract the video part, ignoring audio.\n`'audio_video'` will extract both audio and video.\n\nTo process all media types at the highest quality, use `'all'`.\n\nWhen you specify audio or video stategies, the format must be a JSON object. In this case,\ntextual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. \nSee examples below.\n\nExamples\n\nTextual documents only\n    \"fast\"\n\nVideo documents only\n{\n    \"video\": \"audio_video\"\n}\n\nSpecify multiple document types\n{\n    \"static\": \"hi_res\",\n    \"audio\": true,\n    \"video\": \"video_only\"\n}\n\nSpecify only textual or audio document types\n{\n    \"static\": \"fast\",\n    \"audio\": true\n}\n\nHighest quality processing for all media types\n    \"all\"\n\nAgentic OCR\n    \"agentic_ocr\"\n    Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai.","default":"fast","oneOf":[{"type":"object","properties":{"static":{"oneOf":[{"type":"string","enum":["hi_res","fast"]},{"type":"null"}],"title":"Static"},"audio":{"oneOf":[{"type":"boolean"},{"type":"null"}],"title":"Audio"},"video":{"oneOf":[{"type":"string","enum":["audio_only","video_only","audio_video"]},{"type":"null"}],"title":"Video"}}},{"type":"string","enum":["hi_res","fast"]}]},"metadata":{"type":"object","title":"Metadata","description":"Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`.","default":"{}","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"file":{"type":"string","format":"binary","title":"File","description":"The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml`\nImages: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic`\nDocuments: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported. Other static document files over 10000 pages are not supported."},"external_id":{"type":"string","title":"External Id","description":"An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found."},"name":{"type":"string","title":"Name","description":"An optional name for the document. If set, the document will have this name. Otherwise it will default to the file's name."},"partition":{"type":"string","title":"Partition","description":"An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`.  A partition is created any time a document is created."},"workflow":{"type":"string","enum":["parse","index"],"nullable":true}},"required":["file"]},"UpdateDocumentFileParams":{"type":"object","title":"UpdateDocumentFileParams","properties":{"mode":{"type":"object","title":"Mode","description":"Partition strategy for the document.\nDifferent strategies exist for textual, audio and video file types and you can set the strategy you want for \neach file type, or just for textual types.\n\nFor textual documents the options are `'hi_res'` or `'fast'`.\nWhen set to `'hi_res'`, images and tables will be extracted from the document.\n`'fast'` will only extract text.\n`'fast'` may be up to 20x faster than `'hi_res'`.\n`hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints.\nImages will always be processed in `hi_res`.\nIf `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode.\n\nFor audio files, the options are true or false. True if you want to process audio, false otherwise.        \n\nFor video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`.\n`'audio_only'` will extract just the audio part of the video.\n`'video_only'` will similarly just extract the video part, ignoring audio.\n`'audio_video'` will extract both audio and video.\n\nTo process all media types at the highest quality, use `'all'`.\n\nWhen you specify audio or video stategies, the format must be a JSON object. In this case,\ntextual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. \nSee examples below.\n\nExamples\n\nTextual documents only\n    \"fast\"\n\nVideo documents only\n{\n    \"video\": \"audio_video\"\n}\n\nSpecify multiple document types\n{\n    \"static\": \"hi_res\",\n    \"audio\": true,\n    \"video\": \"video_only\"\n}\n\nSpecify only textual or audio document types\n{\n    \"static\": \"fast\",\n    \"audio\": true\n}\n\nHighest quality processing for all media types\n    \"all\"\n\nAgentic OCR\n    \"agentic_ocr\"\n    Agentic OCR is in early access. `agentic_ocr` mode extracts content using vision models which can be more accurate, especially across more visually complex documents. If you are interested in accessing this feature, please contact us at support@ragie.ai.","default":"fast","oneOf":[{"type":"object","properties":{"static":{"oneOf":[{"type":"string","enum":["hi_res","fast"]},{"type":"null"}],"title":"Static"},"audio":{"oneOf":[{"type":"boolean"},{"type":"null"}],"title":"Audio"},"video":{"oneOf":[{"type":"string","enum":["audio_only","video_only","audio_video"]},{"type":"null"}],"title":"Video"}}},{"type":"string","enum":["hi_res","fast"]}]},"file":{"type":"string","format":"binary","title":"File","description":"The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml`\nImages: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic`\nDocuments: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported. Other static document files over 10000 pages are not supported."}},"required":["file"]},"Address":{"properties":{"type":{"type":"string","const":"Address","title":"Type","default":"Address"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Address"},"Author":{"properties":{"type":{"type":"string","const":"Author","title":"Type","default":"Author"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Author"},"Barcode":{"properties":{"type":{"type":"string","const":"Barcode","title":"Type","default":"Barcode"},"content":{"type":"string","title":"Content","description":"The nearby text content of the barcode"}},"type":"object","required":["content"],"title":"Barcode"},"Bibliography":{"properties":{"type":{"type":"string","const":"Bibliography","title":"Type","default":"Bibliography"},"content":{"type":"string","title":"Content","description":"The text content of the bibliography."}},"type":"object","required":["content"],"title":"Bibliography"},"Button":{"properties":{"type":{"type":"string","const":"Button","title":"Type","default":"Button"},"content":{"type":"string","title":"Content","description":"The text content inside the button"}},"type":"object","required":["content"],"title":"Button"},"CalendarDate":{"properties":{"type":{"type":"string","const":"CalendarDate","title":"Type","default":"CalendarDate"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"CalendarDate"},"Code":{"properties":{"type":{"type":"string","const":"Code","title":"Type","default":"Code"},"content":{"type":"string","title":"Content","description":"The content of the code","default":""},"language":{"type":"string","title":"Language","description":"The language the code is written in","default":""}},"type":"object","title":"Code"},"Comment":{"properties":{"type":{"type":"string","const":"Comment","title":"Type","default":"Comment"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Comment"},"DefinitionList":{"properties":{"type":{"type":"string","const":"DefinitionList","title":"Type","default":"DefinitionList"},"content":{"type":"string","title":"Content","description":"The text content of the list and each item."}},"type":"object","required":["content"],"title":"DefinitionList"},"EmailAddress":{"properties":{"type":{"type":"string","const":"EmailAddress","title":"Type","default":"EmailAddress"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"EmailAddress"},"FigureCaption":{"properties":{"type":{"type":"string","const":"FigureCaption","title":"Type","default":"FigureCaption"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"FigureCaption"},"Figure":{"properties":{"type":{"type":"string","const":"Figure","title":"Type","default":"Figure"},"content":{"type":"string","title":"Content","description":"The text visible inside the visual (OCR)"},"description":{"type":"string","title":"Description","description":"A detailed description of what the visual depicts."},"base64_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64 Data","description":""}},"type":"object","required":["content","description"],"title":"Figure"},"Footer":{"properties":{"type":{"type":"string","const":"Footer","title":"Type","default":"Footer"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Footer"},"Footnote":{"properties":{"type":{"type":"string","const":"Footnote","title":"Type","default":"Footnote"},"content":{"type":"string","title":"Content","description":"The text content inside the footnote"}},"type":"object","required":["content"],"title":"Footnote"},"FormField":{"properties":{"type":{"type":"string","const":"FormField","title":"Type","default":"FormField"},"content":{"type":"string","title":"Content","description":"The text content of the form field, including both the label and the value"},"input_type":{"type":"string","enum":["text","textarea","checkbox","radio","checkbox-group","radio-group","date","time","date-time"],"title":"Input Type","description":"Type of input."},"label":{"type":"string","title":"Label","description":"The main question/label for the field."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"The filled text. For single checkbox: 'true'/'false'."},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormOption"},"type":"array"},{"type":"null"}],"title":"Options","description":"List of available options."},"selected_values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Values","description":"The 'label' of the selected option(s)."},"help_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help Text","description":"The help text for the form field."}},"type":"object","required":["content","input_type","label"],"title":"FormField"},"Formula":{"properties":{"type":{"type":"string","const":"Formula","title":"Type","default":"Formula"},"content":{"type":"string","title":"Content","description":"The formula as plain text."},"latex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latex","description":"The LaTeX representation of the formula."}},"type":"object","required":["content"],"title":"Formula"},"Header":{"properties":{"type":{"type":"string","const":"Header","title":"Type","default":"Header"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Header"},"Json":{"properties":{"type":{"type":"string","const":"Json","title":"Type","default":"Json"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Json"},"KeyValue":{"properties":{"type":{"type":"string","const":"KeyValue","title":"Type","default":"KeyValue"},"key":{"type":"string","title":"Key","description":"The label/attribute name (e.g. 'Date', 'Invoice #')."},"value":{"type":"string","title":"Value","description":"The static text value found."}},"type":"object","required":["key","value"],"title":"KeyValue"},"Logo":{"properties":{"type":{"type":"string","const":"Logo","title":"Type","default":"Logo"},"content":{"type":"string","title":"Content","description":"The text visible inside the logo (OCR)","default":""},"description":{"type":"string","title":"Description","description":"A detailed description of the logo"},"base64_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64 Data","description":""}},"type":"object","required":["description"],"title":"Logo"},"OrderedList":{"properties":{"type":{"type":"string","const":"OrderedList","title":"Type","default":"OrderedList"},"content":{"type":"string","title":"Content","description":"The text content of the list and each list item."}},"type":"object","required":["content"],"title":"OrderedList"},"QRCode":{"properties":{"type":{"type":"string","const":"QrCode","title":"Type","default":"QrCode"},"content":{"type":"string","title":"Content","description":"The value the QR code represents"}},"type":"object","required":["content"],"title":"QRCode"},"Quote":{"properties":{"type":{"type":"string","const":"Quote","title":"Type","default":"Quote"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Quote"},"SectionHeader":{"properties":{"type":{"type":"string","const":"SectionHeader","title":"Type","default":"SectionHeader"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"SectionHeader"},"Signature":{"properties":{"type":{"type":"string","const":"Signature","title":"Type","default":"Signature"},"content":{"type":"string","title":"Content","description":"Content of the signature."},"description":{"type":"string","title":"Description","description":"A detailed description of the signature."},"label":{"type":"string","title":"Label","description":"The printed text indicating who should sign (e.g., 'Driver Signature', 'Authorized By')."},"is_signed":{"type":"boolean","title":"Is Signed","description":"True if a handwritten signature, digital signature, or stamp is present. False if blank."},"signer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signer Name","description":"The name of the signer"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date","description":"The date of the signature if present"}},"type":"object","required":["content","description","label","is_signed"],"title":"Signature"},"Stamp":{"properties":{"type":{"type":"string","const":"Stamp","title":"Type","default":"Stamp"},"content":{"type":"string","title":"Content","description":"The text inside the stamp","default":""},"description":{"type":"string","title":"Description","description":"A detailed description of what the visual depicts.","default":""}},"type":"object","title":"Stamp"},"SubHeader":{"properties":{"type":{"type":"string","const":"SubHeader","title":"Type","default":"SubHeader"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"SubHeader"},"TableOfContents":{"properties":{"type":{"type":"string","const":"TableOfContents","title":"Type","default":"TableOfContents"},"content":{"type":"string","title":"Content","description":"Text content of the table of contents"}},"type":"object","required":["content"],"title":"TableOfContents"},"Table":{"properties":{"type":{"type":"string","const":"Table","title":"Type","default":"Table"},"content":{"type":"string","title":"Content","description":"The Table in HTML."},"description":{"type":"string","title":"Description","description":"A brief summary of the content in the table."},"header_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Range","description":"Optional normalized header rows range used for <thead> construction."}},"type":"object","required":["content","description"],"title":"Table"},"Text":{"properties":{"type":{"type":"string","const":"Text","title":"Type","default":"Text"},"content":{"type":"string","title":"Content","description":"The text content"},"handwritten":{"type":"boolean","title":"Handwritten","description":"True if handwritten, false otherwise","default":false}},"type":"object","required":["content"],"title":"Text"},"Time":{"properties":{"type":{"type":"string","const":"Time","title":"Type","default":"Time"},"content":{"type":"string","title":"Content","description":"The time text content"}},"type":"object","required":["content"],"title":"Time"},"Title":{"properties":{"type":{"type":"string","const":"Title","title":"Type","default":"Title"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Title"},"UnorderedList":{"properties":{"type":{"type":"string","const":"UnorderedList","title":"Type","default":"UnorderedList"},"content":{"type":"string","title":"Content","description":"The text content of the list and each list item."}},"type":"object","required":["content"],"title":"UnorderedList"},"Video":{"properties":{"type":{"type":"string","const":"Video","title":"Type","default":"Video"},"content":{"type":"string","title":"Content","description":"A description of what the video shows."}},"type":"object","required":["content"],"title":"Video"},"Watermark":{"properties":{"type":{"type":"string","const":"Watermark","title":"Type","default":"Watermark"},"content":{"type":"string","title":"Content","description":"The text content"}},"type":"object","required":["content"],"title":"Watermark"}},"securitySchemes":{"auth":{"type":"http","scheme":"bearer"}}},"security":[{"auth":[]}]}