7978 lines
248 KiB
JSON
7978 lines
248 KiB
JSON
{
|
|
"openapi": "3.1.0",
|
|
"info": {
|
|
"title": "Docling Serve",
|
|
"version": "1.8.0"
|
|
},
|
|
"paths": {
|
|
"/openapi-3.0.json": {
|
|
"get": {
|
|
"summary": "Openapi 30",
|
|
"operationId": "openapi_30_openapi_3_0_json_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/health": {
|
|
"get": {
|
|
"tags": [
|
|
"health"
|
|
],
|
|
"summary": "Health",
|
|
"operationId": "health_health_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HealthCheckResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/version": {
|
|
"get": {
|
|
"tags": [
|
|
"health"
|
|
],
|
|
"summary": "Version Info",
|
|
"operationId": "version_info_version_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "Response Version Info Version Get"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/convert/source": {
|
|
"post": {
|
|
"tags": [
|
|
"convert"
|
|
],
|
|
"summary": "Process Url",
|
|
"operationId": "process_url_v1_convert_source_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ConvertDocumentsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ConvertDocumentResponse"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PresignedUrlConvertDocumentResponse"
|
|
}
|
|
],
|
|
"title": "Response Process Url V1 Convert Source Post"
|
|
}
|
|
},
|
|
"application/zip": {}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/convert/file": {
|
|
"post": {
|
|
"tags": [
|
|
"convert"
|
|
],
|
|
"summary": "Process File",
|
|
"operationId": "process_file_v1_convert_file_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_process_file_v1_convert_file_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ConvertDocumentResponse"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PresignedUrlConvertDocumentResponse"
|
|
}
|
|
],
|
|
"title": "Response Process File V1 Convert File Post"
|
|
}
|
|
},
|
|
"application/zip": {}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/convert/source/async": {
|
|
"post": {
|
|
"tags": [
|
|
"convert"
|
|
],
|
|
"summary": "Process Url Async",
|
|
"operationId": "process_url_async_v1_convert_source_async_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ConvertDocumentsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TaskStatusResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/convert/file/async": {
|
|
"post": {
|
|
"tags": [
|
|
"convert"
|
|
],
|
|
"summary": "Process File Async",
|
|
"operationId": "process_file_async_v1_convert_file_async_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_process_file_async_v1_convert_file_async_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TaskStatusResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/chunk/hybrid/source/async": {
|
|
"post": {
|
|
"tags": [
|
|
"chunk"
|
|
],
|
|
"summary": "Chunk Sources With Hybridchunker As Async Task",
|
|
"operationId": "Chunk_sources_with_HybridChunker_as_async_task_v1_chunk_hybrid_source_async_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HybridChunkerOptionsDocumentsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TaskStatusResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/chunk/hybrid/file/async": {
|
|
"post": {
|
|
"tags": [
|
|
"chunk"
|
|
],
|
|
"summary": "Chunk Files With Hybridchunker As Async Task",
|
|
"operationId": "Chunk_files_with_HybridChunker_as_async_task_v1_chunk_hybrid_file_async_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_Chunk_files_with_HybridChunker_as_async_task_v1_chunk_hybrid_file_async_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TaskStatusResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/chunk/hybrid/source": {
|
|
"post": {
|
|
"tags": [
|
|
"chunk"
|
|
],
|
|
"summary": "Chunk Sources With Hybridchunker",
|
|
"operationId": "Chunk_sources_with_HybridChunker_v1_chunk_hybrid_source_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HybridChunkerOptionsDocumentsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChunkDocumentResponse"
|
|
}
|
|
},
|
|
"application/zip": {}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/chunk/hybrid/file": {
|
|
"post": {
|
|
"tags": [
|
|
"chunk"
|
|
],
|
|
"summary": "Chunk Files With Hybridchunker",
|
|
"operationId": "Chunk_files_with_HybridChunker_v1_chunk_hybrid_file_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_Chunk_files_with_HybridChunker_v1_chunk_hybrid_file_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChunkDocumentResponse"
|
|
}
|
|
},
|
|
"application/zip": {}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/chunk/hierarchical/source/async": {
|
|
"post": {
|
|
"tags": [
|
|
"chunk"
|
|
],
|
|
"summary": "Chunk Sources With Hierarchicalchunker As Async Task",
|
|
"operationId": "Chunk_sources_with_HierarchicalChunker_as_async_task_v1_chunk_hierarchical_source_async_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HierarchicalChunkerOptionsDocumentsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TaskStatusResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/chunk/hierarchical/file/async": {
|
|
"post": {
|
|
"tags": [
|
|
"chunk"
|
|
],
|
|
"summary": "Chunk Files With Hierarchicalchunker As Async Task",
|
|
"operationId": "Chunk_files_with_HierarchicalChunker_as_async_task_v1_chunk_hierarchical_file_async_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_Chunk_files_with_HierarchicalChunker_as_async_task_v1_chunk_hierarchical_file_async_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TaskStatusResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/chunk/hierarchical/source": {
|
|
"post": {
|
|
"tags": [
|
|
"chunk"
|
|
],
|
|
"summary": "Chunk Sources With Hierarchicalchunker",
|
|
"operationId": "Chunk_sources_with_HierarchicalChunker_v1_chunk_hierarchical_source_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HierarchicalChunkerOptionsDocumentsRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChunkDocumentResponse"
|
|
}
|
|
},
|
|
"application/zip": {}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/chunk/hierarchical/file": {
|
|
"post": {
|
|
"tags": [
|
|
"chunk"
|
|
],
|
|
"summary": "Chunk Files With Hierarchicalchunker",
|
|
"operationId": "Chunk_files_with_HierarchicalChunker_v1_chunk_hierarchical_file_post",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Body_Chunk_files_with_HierarchicalChunker_v1_chunk_hierarchical_file_post"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChunkDocumentResponse"
|
|
}
|
|
},
|
|
"application/zip": {}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/status/poll/{task_id}": {
|
|
"get": {
|
|
"tags": [
|
|
"tasks"
|
|
],
|
|
"summary": "Task Status Poll",
|
|
"operationId": "task_status_poll_v1_status_poll__task_id__get",
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "task_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Task Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "wait",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "number",
|
|
"description": "Number of seconds to wait for a completed status.",
|
|
"default": 0,
|
|
"title": "Wait"
|
|
},
|
|
"description": "Number of seconds to wait for a completed status."
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TaskStatusResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/result/{task_id}": {
|
|
"get": {
|
|
"tags": [
|
|
"tasks"
|
|
],
|
|
"summary": "Task Result",
|
|
"operationId": "task_result_v1_result__task_id__get",
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "task_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"title": "Task Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ConvertDocumentResponse"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PresignedUrlConvertDocumentResponse"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ChunkDocumentResponse"
|
|
}
|
|
],
|
|
"title": "Response Task Result V1 Result Task Id Get"
|
|
}
|
|
},
|
|
"application/zip": {}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/clear/converters": {
|
|
"get": {
|
|
"tags": [
|
|
"clear"
|
|
],
|
|
"summary": "Clear Converters",
|
|
"operationId": "clear_converters_v1_clear_converters_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ClearResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/clear/results": {
|
|
"get": {
|
|
"tags": [
|
|
"clear"
|
|
],
|
|
"summary": "Clear Results",
|
|
"operationId": "clear_results_v1_clear_results_get",
|
|
"security": [
|
|
{
|
|
"APIKeyAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "older_then",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "number",
|
|
"default": 3600,
|
|
"title": "Older Then"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ClearResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"BaseMeta": {
|
|
"properties": {
|
|
"summary": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SummaryMetaField"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "BaseMeta",
|
|
"description": "Base class for metadata."
|
|
},
|
|
"Body_Chunk_files_with_HierarchicalChunker_as_async_task_v1_chunk_hierarchical_file_async_post": {
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
},
|
|
"type": "array",
|
|
"title": "Files"
|
|
},
|
|
"include_converted_doc": {
|
|
"type": "boolean",
|
|
"title": "Include Converted Doc",
|
|
"description": "If true, the output will include both the chunks and the converted document.",
|
|
"default": false
|
|
},
|
|
"target_type": {
|
|
"$ref": "#/components/schemas/TargetName",
|
|
"description": "Specification for the type of output target.",
|
|
"default": "inbody"
|
|
},
|
|
"convert_from_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/InputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "Convert From Formats",
|
|
"description": "Input format(s) to convert from. String or list of strings. Allowed values: docx, pptx, html, image, pdf, asciidoc, md, csv, xlsx, xml_uspto, xml_jats, mets_gbs, json_docling, audio, vtt. Optional, defaults to all formats.",
|
|
"default": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"examples": [
|
|
[
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
]
|
|
]
|
|
},
|
|
"convert_image_export_mode": {
|
|
"$ref": "#/components/schemas/ImageRefMode",
|
|
"description": "Image export mode for the document (in case of JSON, Markdown or HTML). Allowed values: placeholder, embedded, referenced. Optional, defaults to Embedded.",
|
|
"default": "embedded",
|
|
"examples": [
|
|
"embedded"
|
|
]
|
|
},
|
|
"convert_do_ocr": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Ocr",
|
|
"description": "If enabled, the bitmap content will be processed using OCR. Boolean. Optional, defaults to true",
|
|
"default": true
|
|
},
|
|
"convert_force_ocr": {
|
|
"type": "boolean",
|
|
"title": "Convert Force Ocr",
|
|
"description": "If enabled, replace existing text with OCR-generated text over content. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"convert_ocr_engine": {
|
|
"$ref": "#/components/schemas/ocr_engines_enum",
|
|
"description": "The OCR engine to use. String. Allowed values: auto, easyocr, ocrmac, rapidocr, tesserocr, tesseract. Optional, defaults to easyocr.",
|
|
"default": "easyocr",
|
|
"examples": [
|
|
"easyocr"
|
|
]
|
|
},
|
|
"convert_ocr_lang": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Convert Ocr Lang",
|
|
"description": "List of languages used by the OCR engine. Note that each OCR engine has different values for the language names. String or list of strings. Optional, defaults to empty.",
|
|
"examples": [
|
|
[
|
|
"fr",
|
|
"de",
|
|
"es",
|
|
"en"
|
|
]
|
|
]
|
|
},
|
|
"convert_pdf_backend": {
|
|
"$ref": "#/components/schemas/PdfBackend",
|
|
"description": "The PDF backend to use. String. Allowed values: pypdfium2, dlparse_v1, dlparse_v2, dlparse_v4. Optional, defaults to dlparse_v4.",
|
|
"default": "dlparse_v4",
|
|
"examples": [
|
|
"dlparse_v4"
|
|
]
|
|
},
|
|
"convert_table_mode": {
|
|
"$ref": "#/components/schemas/TableFormerMode",
|
|
"description": "Mode to use for table structure, String. Allowed values: fast, accurate. Optional, defaults to accurate.",
|
|
"default": "accurate",
|
|
"examples": [
|
|
"accurate"
|
|
]
|
|
},
|
|
"convert_table_cell_matching": {
|
|
"type": "boolean",
|
|
"title": "Convert Table Cell Matching",
|
|
"description": "If true, matches table cells predictions back to PDF cells. Can break table output if PDF cells are merged across table columns. If false, let table structure model define the text cells, ignore PDF cells.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_pipeline": {
|
|
"$ref": "#/components/schemas/ProcessingPipeline",
|
|
"description": "Choose the pipeline to process PDF or image files.",
|
|
"default": "standard"
|
|
},
|
|
"convert_page_range": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2,
|
|
"title": "Convert Page Range",
|
|
"description": "Only convert a range of pages. The page number starts at 1.",
|
|
"default": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"examples": [
|
|
[
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
[
|
|
1,
|
|
4
|
|
]
|
|
]
|
|
},
|
|
"convert_document_timeout": {
|
|
"type": "number",
|
|
"title": "Convert Document Timeout",
|
|
"description": "The timeout for processing each document, in seconds.",
|
|
"default": 604800
|
|
},
|
|
"convert_abort_on_error": {
|
|
"type": "boolean",
|
|
"title": "Convert Abort On Error",
|
|
"description": "Abort on error if enabled. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"convert_do_table_structure": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Table Structure",
|
|
"description": "If enabled, the table structure will be extracted. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_include_images": {
|
|
"type": "boolean",
|
|
"title": "Convert Include Images",
|
|
"description": "If enabled, images will be extracted from the document. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_images_scale": {
|
|
"type": "number",
|
|
"title": "Convert Images Scale",
|
|
"description": "Scale factor for images. Float. Optional, defaults to 2.0.",
|
|
"default": 2,
|
|
"examples": [
|
|
2
|
|
]
|
|
},
|
|
"convert_md_page_break_placeholder": {
|
|
"type": "string",
|
|
"title": "Convert Md Page Break Placeholder",
|
|
"description": "Add this placeholder between pages in the markdown output.",
|
|
"default": "",
|
|
"examples": [
|
|
"<!-- page-break -->",
|
|
""
|
|
]
|
|
},
|
|
"convert_do_code_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Code Enrichment",
|
|
"description": "If enabled, perform OCR code enrichment. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_formula_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Formula Enrichment",
|
|
"description": "If enabled, perform formula OCR, return LaTeX code. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_picture_classification": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Picture Classification",
|
|
"description": "If enabled, classify pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_picture_description": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Picture Description",
|
|
"description": "If enabled, describe pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_picture_description_area_threshold": {
|
|
"type": "number",
|
|
"title": "Convert Picture Description Area Threshold",
|
|
"description": "Minimum percentage of the area for a picture to be processed with the models.",
|
|
"default": 0.05,
|
|
"examples": [
|
|
0.05
|
|
]
|
|
},
|
|
"convert_picture_description_local": {
|
|
"type": "string",
|
|
"title": "Convert Picture Description Local",
|
|
"description": "Options for running a local vision-language model in the picture description. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with picture_description_api.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}",
|
|
"{\"repo_id\": \"HuggingFaceTB/SmolVLM-256M-Instruct\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}"
|
|
]
|
|
},
|
|
"convert_picture_description_api": {
|
|
"type": "string",
|
|
"title": "Convert Picture Description Api",
|
|
"description": "API details for using a vision-language model in the picture description. This parameter is mutually exclusive with picture_description_local.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}",
|
|
"{\"url\": \"http://localhost:11434/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VlmModelType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Preset of local and API models for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model_api. Use the other options for more parameters.",
|
|
"examples": [
|
|
"granite_docling"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model_local": {
|
|
"type": "string",
|
|
"title": "Convert Vlm Pipeline Model Local",
|
|
"description": "Options for running a local vision-language model for the vlm pipeline. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with vlm_pipeline_model_api and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-imagetexttotext\", \"extra_generation_config\": {\"skip_special_tokens\": false}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M-mlx\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"mlx\", \"transformers_model_type\": \"automodel\", \"extra_generation_config\": {}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Convert this page to markdown. Do not miss any text and only output the bare markdown!\", \"scale\": 2.0, \"response_format\": \"markdown\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-vision2seq\", \"extra_generation_config\": {}, \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model_api": {
|
|
"type": "string",
|
|
"title": "Convert Vlm Pipeline Model Api",
|
|
"description": "API details for using a vision-language model for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"ibm-granite/granite-docling-258M-mlx\"}, \"timeout\": 60.0, \"concurrency\": 1, \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"chunking_use_markdown_tables": {
|
|
"type": "boolean",
|
|
"title": "Chunking Use Markdown Tables",
|
|
"description": "Use markdown table format instead of triplets for table serialization.",
|
|
"default": false
|
|
},
|
|
"chunking_include_raw_text": {
|
|
"type": "boolean",
|
|
"title": "Chunking Include Raw Text",
|
|
"description": "Include both raw_text and text (contextualized) in response. If False, only text is included.",
|
|
"default": false
|
|
},
|
|
"chunking_max_tokens": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Chunking Max Tokens",
|
|
"description": "Maximum number of tokens per chunk. When left to none, the value is automatically extracted from the tokenizer."
|
|
},
|
|
"chunking_tokenizer": {
|
|
"type": "string",
|
|
"title": "Chunking Tokenizer",
|
|
"description": "HuggingFace model name for custom tokenization. If not specified, uses 'sentence-transformers/all-MiniLM-L6-v2' as default.",
|
|
"default": "sentence-transformers/all-MiniLM-L6-v2",
|
|
"examples": [
|
|
"Qwen/Qwen3-Embedding-0.6B",
|
|
"sentence-transformers/all-MiniLM-L6-v2"
|
|
]
|
|
},
|
|
"chunking_merge_peers": {
|
|
"type": "boolean",
|
|
"title": "Chunking Merge Peers",
|
|
"description": "Merge undersized successive chunks with same headings.",
|
|
"default": true
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"files"
|
|
],
|
|
"title": "Body_Chunk_files_with_HierarchicalChunker_as_async_task_v1_chunk_hierarchical_file_async_post"
|
|
},
|
|
"Body_Chunk_files_with_HierarchicalChunker_v1_chunk_hierarchical_file_post": {
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
},
|
|
"type": "array",
|
|
"title": "Files"
|
|
},
|
|
"include_converted_doc": {
|
|
"type": "boolean",
|
|
"title": "Include Converted Doc",
|
|
"description": "If true, the output will include both the chunks and the converted document.",
|
|
"default": false
|
|
},
|
|
"target_type": {
|
|
"$ref": "#/components/schemas/TargetName",
|
|
"description": "Specification for the type of output target.",
|
|
"default": "inbody"
|
|
},
|
|
"convert_from_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/InputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "Convert From Formats",
|
|
"description": "Input format(s) to convert from. String or list of strings. Allowed values: docx, pptx, html, image, pdf, asciidoc, md, csv, xlsx, xml_uspto, xml_jats, mets_gbs, json_docling, audio, vtt. Optional, defaults to all formats.",
|
|
"default": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"examples": [
|
|
[
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
]
|
|
]
|
|
},
|
|
"convert_image_export_mode": {
|
|
"$ref": "#/components/schemas/ImageRefMode",
|
|
"description": "Image export mode for the document (in case of JSON, Markdown or HTML). Allowed values: placeholder, embedded, referenced. Optional, defaults to Embedded.",
|
|
"default": "embedded",
|
|
"examples": [
|
|
"embedded"
|
|
]
|
|
},
|
|
"convert_do_ocr": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Ocr",
|
|
"description": "If enabled, the bitmap content will be processed using OCR. Boolean. Optional, defaults to true",
|
|
"default": true
|
|
},
|
|
"convert_force_ocr": {
|
|
"type": "boolean",
|
|
"title": "Convert Force Ocr",
|
|
"description": "If enabled, replace existing text with OCR-generated text over content. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"convert_ocr_engine": {
|
|
"$ref": "#/components/schemas/ocr_engines_enum",
|
|
"description": "The OCR engine to use. String. Allowed values: auto, easyocr, ocrmac, rapidocr, tesserocr, tesseract. Optional, defaults to easyocr.",
|
|
"default": "easyocr",
|
|
"examples": [
|
|
"easyocr"
|
|
]
|
|
},
|
|
"convert_ocr_lang": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Convert Ocr Lang",
|
|
"description": "List of languages used by the OCR engine. Note that each OCR engine has different values for the language names. String or list of strings. Optional, defaults to empty.",
|
|
"examples": [
|
|
[
|
|
"fr",
|
|
"de",
|
|
"es",
|
|
"en"
|
|
]
|
|
]
|
|
},
|
|
"convert_pdf_backend": {
|
|
"$ref": "#/components/schemas/PdfBackend",
|
|
"description": "The PDF backend to use. String. Allowed values: pypdfium2, dlparse_v1, dlparse_v2, dlparse_v4. Optional, defaults to dlparse_v4.",
|
|
"default": "dlparse_v4",
|
|
"examples": [
|
|
"dlparse_v4"
|
|
]
|
|
},
|
|
"convert_table_mode": {
|
|
"$ref": "#/components/schemas/TableFormerMode",
|
|
"description": "Mode to use for table structure, String. Allowed values: fast, accurate. Optional, defaults to accurate.",
|
|
"default": "accurate",
|
|
"examples": [
|
|
"accurate"
|
|
]
|
|
},
|
|
"convert_table_cell_matching": {
|
|
"type": "boolean",
|
|
"title": "Convert Table Cell Matching",
|
|
"description": "If true, matches table cells predictions back to PDF cells. Can break table output if PDF cells are merged across table columns. If false, let table structure model define the text cells, ignore PDF cells.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_pipeline": {
|
|
"$ref": "#/components/schemas/ProcessingPipeline",
|
|
"description": "Choose the pipeline to process PDF or image files.",
|
|
"default": "standard"
|
|
},
|
|
"convert_page_range": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2,
|
|
"title": "Convert Page Range",
|
|
"description": "Only convert a range of pages. The page number starts at 1.",
|
|
"default": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"examples": [
|
|
[
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
[
|
|
1,
|
|
4
|
|
]
|
|
]
|
|
},
|
|
"convert_document_timeout": {
|
|
"type": "number",
|
|
"title": "Convert Document Timeout",
|
|
"description": "The timeout for processing each document, in seconds.",
|
|
"default": 604800
|
|
},
|
|
"convert_abort_on_error": {
|
|
"type": "boolean",
|
|
"title": "Convert Abort On Error",
|
|
"description": "Abort on error if enabled. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"convert_do_table_structure": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Table Structure",
|
|
"description": "If enabled, the table structure will be extracted. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_include_images": {
|
|
"type": "boolean",
|
|
"title": "Convert Include Images",
|
|
"description": "If enabled, images will be extracted from the document. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_images_scale": {
|
|
"type": "number",
|
|
"title": "Convert Images Scale",
|
|
"description": "Scale factor for images. Float. Optional, defaults to 2.0.",
|
|
"default": 2,
|
|
"examples": [
|
|
2
|
|
]
|
|
},
|
|
"convert_md_page_break_placeholder": {
|
|
"type": "string",
|
|
"title": "Convert Md Page Break Placeholder",
|
|
"description": "Add this placeholder between pages in the markdown output.",
|
|
"default": "",
|
|
"examples": [
|
|
"<!-- page-break -->",
|
|
""
|
|
]
|
|
},
|
|
"convert_do_code_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Code Enrichment",
|
|
"description": "If enabled, perform OCR code enrichment. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_formula_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Formula Enrichment",
|
|
"description": "If enabled, perform formula OCR, return LaTeX code. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_picture_classification": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Picture Classification",
|
|
"description": "If enabled, classify pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_picture_description": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Picture Description",
|
|
"description": "If enabled, describe pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_picture_description_area_threshold": {
|
|
"type": "number",
|
|
"title": "Convert Picture Description Area Threshold",
|
|
"description": "Minimum percentage of the area for a picture to be processed with the models.",
|
|
"default": 0.05,
|
|
"examples": [
|
|
0.05
|
|
]
|
|
},
|
|
"convert_picture_description_local": {
|
|
"type": "string",
|
|
"title": "Convert Picture Description Local",
|
|
"description": "Options for running a local vision-language model in the picture description. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with picture_description_api.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}",
|
|
"{\"repo_id\": \"HuggingFaceTB/SmolVLM-256M-Instruct\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}"
|
|
]
|
|
},
|
|
"convert_picture_description_api": {
|
|
"type": "string",
|
|
"title": "Convert Picture Description Api",
|
|
"description": "API details for using a vision-language model in the picture description. This parameter is mutually exclusive with picture_description_local.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}",
|
|
"{\"url\": \"http://localhost:11434/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VlmModelType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Preset of local and API models for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model_api. Use the other options for more parameters.",
|
|
"examples": [
|
|
"granite_docling"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model_local": {
|
|
"type": "string",
|
|
"title": "Convert Vlm Pipeline Model Local",
|
|
"description": "Options for running a local vision-language model for the vlm pipeline. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with vlm_pipeline_model_api and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-imagetexttotext\", \"extra_generation_config\": {\"skip_special_tokens\": false}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M-mlx\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"mlx\", \"transformers_model_type\": \"automodel\", \"extra_generation_config\": {}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Convert this page to markdown. Do not miss any text and only output the bare markdown!\", \"scale\": 2.0, \"response_format\": \"markdown\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-vision2seq\", \"extra_generation_config\": {}, \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model_api": {
|
|
"type": "string",
|
|
"title": "Convert Vlm Pipeline Model Api",
|
|
"description": "API details for using a vision-language model for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"ibm-granite/granite-docling-258M-mlx\"}, \"timeout\": 60.0, \"concurrency\": 1, \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"chunking_use_markdown_tables": {
|
|
"type": "boolean",
|
|
"title": "Chunking Use Markdown Tables",
|
|
"description": "Use markdown table format instead of triplets for table serialization.",
|
|
"default": false
|
|
},
|
|
"chunking_include_raw_text": {
|
|
"type": "boolean",
|
|
"title": "Chunking Include Raw Text",
|
|
"description": "Include both raw_text and text (contextualized) in response. If False, only text is included.",
|
|
"default": false
|
|
},
|
|
"chunking_max_tokens": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Chunking Max Tokens",
|
|
"description": "Maximum number of tokens per chunk. When left to none, the value is automatically extracted from the tokenizer."
|
|
},
|
|
"chunking_tokenizer": {
|
|
"type": "string",
|
|
"title": "Chunking Tokenizer",
|
|
"description": "HuggingFace model name for custom tokenization. If not specified, uses 'sentence-transformers/all-MiniLM-L6-v2' as default.",
|
|
"default": "sentence-transformers/all-MiniLM-L6-v2",
|
|
"examples": [
|
|
"Qwen/Qwen3-Embedding-0.6B",
|
|
"sentence-transformers/all-MiniLM-L6-v2"
|
|
]
|
|
},
|
|
"chunking_merge_peers": {
|
|
"type": "boolean",
|
|
"title": "Chunking Merge Peers",
|
|
"description": "Merge undersized successive chunks with same headings.",
|
|
"default": true
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"files"
|
|
],
|
|
"title": "Body_Chunk_files_with_HierarchicalChunker_v1_chunk_hierarchical_file_post"
|
|
},
|
|
"Body_Chunk_files_with_HybridChunker_as_async_task_v1_chunk_hybrid_file_async_post": {
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
},
|
|
"type": "array",
|
|
"title": "Files"
|
|
},
|
|
"include_converted_doc": {
|
|
"type": "boolean",
|
|
"title": "Include Converted Doc",
|
|
"description": "If true, the output will include both the chunks and the converted document.",
|
|
"default": false
|
|
},
|
|
"target_type": {
|
|
"$ref": "#/components/schemas/TargetName",
|
|
"description": "Specification for the type of output target.",
|
|
"default": "inbody"
|
|
},
|
|
"convert_from_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/InputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "Convert From Formats",
|
|
"description": "Input format(s) to convert from. String or list of strings. Allowed values: docx, pptx, html, image, pdf, asciidoc, md, csv, xlsx, xml_uspto, xml_jats, mets_gbs, json_docling, audio, vtt. Optional, defaults to all formats.",
|
|
"default": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"examples": [
|
|
[
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
]
|
|
]
|
|
},
|
|
"convert_image_export_mode": {
|
|
"$ref": "#/components/schemas/ImageRefMode",
|
|
"description": "Image export mode for the document (in case of JSON, Markdown or HTML). Allowed values: placeholder, embedded, referenced. Optional, defaults to Embedded.",
|
|
"default": "embedded",
|
|
"examples": [
|
|
"embedded"
|
|
]
|
|
},
|
|
"convert_do_ocr": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Ocr",
|
|
"description": "If enabled, the bitmap content will be processed using OCR. Boolean. Optional, defaults to true",
|
|
"default": true
|
|
},
|
|
"convert_force_ocr": {
|
|
"type": "boolean",
|
|
"title": "Convert Force Ocr",
|
|
"description": "If enabled, replace existing text with OCR-generated text over content. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"convert_ocr_engine": {
|
|
"$ref": "#/components/schemas/ocr_engines_enum",
|
|
"description": "The OCR engine to use. String. Allowed values: auto, easyocr, ocrmac, rapidocr, tesserocr, tesseract. Optional, defaults to easyocr.",
|
|
"default": "easyocr",
|
|
"examples": [
|
|
"easyocr"
|
|
]
|
|
},
|
|
"convert_ocr_lang": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Convert Ocr Lang",
|
|
"description": "List of languages used by the OCR engine. Note that each OCR engine has different values for the language names. String or list of strings. Optional, defaults to empty.",
|
|
"examples": [
|
|
[
|
|
"fr",
|
|
"de",
|
|
"es",
|
|
"en"
|
|
]
|
|
]
|
|
},
|
|
"convert_pdf_backend": {
|
|
"$ref": "#/components/schemas/PdfBackend",
|
|
"description": "The PDF backend to use. String. Allowed values: pypdfium2, dlparse_v1, dlparse_v2, dlparse_v4. Optional, defaults to dlparse_v4.",
|
|
"default": "dlparse_v4",
|
|
"examples": [
|
|
"dlparse_v4"
|
|
]
|
|
},
|
|
"convert_table_mode": {
|
|
"$ref": "#/components/schemas/TableFormerMode",
|
|
"description": "Mode to use for table structure, String. Allowed values: fast, accurate. Optional, defaults to accurate.",
|
|
"default": "accurate",
|
|
"examples": [
|
|
"accurate"
|
|
]
|
|
},
|
|
"convert_table_cell_matching": {
|
|
"type": "boolean",
|
|
"title": "Convert Table Cell Matching",
|
|
"description": "If true, matches table cells predictions back to PDF cells. Can break table output if PDF cells are merged across table columns. If false, let table structure model define the text cells, ignore PDF cells.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_pipeline": {
|
|
"$ref": "#/components/schemas/ProcessingPipeline",
|
|
"description": "Choose the pipeline to process PDF or image files.",
|
|
"default": "standard"
|
|
},
|
|
"convert_page_range": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2,
|
|
"title": "Convert Page Range",
|
|
"description": "Only convert a range of pages. The page number starts at 1.",
|
|
"default": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"examples": [
|
|
[
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
[
|
|
1,
|
|
4
|
|
]
|
|
]
|
|
},
|
|
"convert_document_timeout": {
|
|
"type": "number",
|
|
"title": "Convert Document Timeout",
|
|
"description": "The timeout for processing each document, in seconds.",
|
|
"default": 604800
|
|
},
|
|
"convert_abort_on_error": {
|
|
"type": "boolean",
|
|
"title": "Convert Abort On Error",
|
|
"description": "Abort on error if enabled. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"convert_do_table_structure": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Table Structure",
|
|
"description": "If enabled, the table structure will be extracted. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_include_images": {
|
|
"type": "boolean",
|
|
"title": "Convert Include Images",
|
|
"description": "If enabled, images will be extracted from the document. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_images_scale": {
|
|
"type": "number",
|
|
"title": "Convert Images Scale",
|
|
"description": "Scale factor for images. Float. Optional, defaults to 2.0.",
|
|
"default": 2,
|
|
"examples": [
|
|
2
|
|
]
|
|
},
|
|
"convert_md_page_break_placeholder": {
|
|
"type": "string",
|
|
"title": "Convert Md Page Break Placeholder",
|
|
"description": "Add this placeholder between pages in the markdown output.",
|
|
"default": "",
|
|
"examples": [
|
|
"<!-- page-break -->",
|
|
""
|
|
]
|
|
},
|
|
"convert_do_code_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Code Enrichment",
|
|
"description": "If enabled, perform OCR code enrichment. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_formula_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Formula Enrichment",
|
|
"description": "If enabled, perform formula OCR, return LaTeX code. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_picture_classification": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Picture Classification",
|
|
"description": "If enabled, classify pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_picture_description": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Picture Description",
|
|
"description": "If enabled, describe pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_picture_description_area_threshold": {
|
|
"type": "number",
|
|
"title": "Convert Picture Description Area Threshold",
|
|
"description": "Minimum percentage of the area for a picture to be processed with the models.",
|
|
"default": 0.05,
|
|
"examples": [
|
|
0.05
|
|
]
|
|
},
|
|
"convert_picture_description_local": {
|
|
"type": "string",
|
|
"title": "Convert Picture Description Local",
|
|
"description": "Options for running a local vision-language model in the picture description. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with picture_description_api.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}",
|
|
"{\"repo_id\": \"HuggingFaceTB/SmolVLM-256M-Instruct\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}"
|
|
]
|
|
},
|
|
"convert_picture_description_api": {
|
|
"type": "string",
|
|
"title": "Convert Picture Description Api",
|
|
"description": "API details for using a vision-language model in the picture description. This parameter is mutually exclusive with picture_description_local.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}",
|
|
"{\"url\": \"http://localhost:11434/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VlmModelType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Preset of local and API models for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model_api. Use the other options for more parameters.",
|
|
"examples": [
|
|
"granite_docling"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model_local": {
|
|
"type": "string",
|
|
"title": "Convert Vlm Pipeline Model Local",
|
|
"description": "Options for running a local vision-language model for the vlm pipeline. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with vlm_pipeline_model_api and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-imagetexttotext\", \"extra_generation_config\": {\"skip_special_tokens\": false}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M-mlx\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"mlx\", \"transformers_model_type\": \"automodel\", \"extra_generation_config\": {}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Convert this page to markdown. Do not miss any text and only output the bare markdown!\", \"scale\": 2.0, \"response_format\": \"markdown\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-vision2seq\", \"extra_generation_config\": {}, \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model_api": {
|
|
"type": "string",
|
|
"title": "Convert Vlm Pipeline Model Api",
|
|
"description": "API details for using a vision-language model for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"ibm-granite/granite-docling-258M-mlx\"}, \"timeout\": 60.0, \"concurrency\": 1, \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"chunking_use_markdown_tables": {
|
|
"type": "boolean",
|
|
"title": "Chunking Use Markdown Tables",
|
|
"description": "Use markdown table format instead of triplets for table serialization.",
|
|
"default": false
|
|
},
|
|
"chunking_include_raw_text": {
|
|
"type": "boolean",
|
|
"title": "Chunking Include Raw Text",
|
|
"description": "Include both raw_text and text (contextualized) in response. If False, only text is included.",
|
|
"default": false
|
|
},
|
|
"chunking_max_tokens": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Chunking Max Tokens",
|
|
"description": "Maximum number of tokens per chunk. When left to none, the value is automatically extracted from the tokenizer."
|
|
},
|
|
"chunking_tokenizer": {
|
|
"type": "string",
|
|
"title": "Chunking Tokenizer",
|
|
"description": "HuggingFace model name for custom tokenization. If not specified, uses 'sentence-transformers/all-MiniLM-L6-v2' as default.",
|
|
"default": "sentence-transformers/all-MiniLM-L6-v2",
|
|
"examples": [
|
|
"Qwen/Qwen3-Embedding-0.6B",
|
|
"sentence-transformers/all-MiniLM-L6-v2"
|
|
]
|
|
},
|
|
"chunking_merge_peers": {
|
|
"type": "boolean",
|
|
"title": "Chunking Merge Peers",
|
|
"description": "Merge undersized successive chunks with same headings.",
|
|
"default": true
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"files"
|
|
],
|
|
"title": "Body_Chunk_files_with_HybridChunker_as_async_task_v1_chunk_hybrid_file_async_post"
|
|
},
|
|
"Body_Chunk_files_with_HybridChunker_v1_chunk_hybrid_file_post": {
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
},
|
|
"type": "array",
|
|
"title": "Files"
|
|
},
|
|
"include_converted_doc": {
|
|
"type": "boolean",
|
|
"title": "Include Converted Doc",
|
|
"description": "If true, the output will include both the chunks and the converted document.",
|
|
"default": false
|
|
},
|
|
"target_type": {
|
|
"$ref": "#/components/schemas/TargetName",
|
|
"description": "Specification for the type of output target.",
|
|
"default": "inbody"
|
|
},
|
|
"convert_from_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/InputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "Convert From Formats",
|
|
"description": "Input format(s) to convert from. String or list of strings. Allowed values: docx, pptx, html, image, pdf, asciidoc, md, csv, xlsx, xml_uspto, xml_jats, mets_gbs, json_docling, audio, vtt. Optional, defaults to all formats.",
|
|
"default": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"examples": [
|
|
[
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
]
|
|
]
|
|
},
|
|
"convert_image_export_mode": {
|
|
"$ref": "#/components/schemas/ImageRefMode",
|
|
"description": "Image export mode for the document (in case of JSON, Markdown or HTML). Allowed values: placeholder, embedded, referenced. Optional, defaults to Embedded.",
|
|
"default": "embedded",
|
|
"examples": [
|
|
"embedded"
|
|
]
|
|
},
|
|
"convert_do_ocr": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Ocr",
|
|
"description": "If enabled, the bitmap content will be processed using OCR. Boolean. Optional, defaults to true",
|
|
"default": true
|
|
},
|
|
"convert_force_ocr": {
|
|
"type": "boolean",
|
|
"title": "Convert Force Ocr",
|
|
"description": "If enabled, replace existing text with OCR-generated text over content. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"convert_ocr_engine": {
|
|
"$ref": "#/components/schemas/ocr_engines_enum",
|
|
"description": "The OCR engine to use. String. Allowed values: auto, easyocr, ocrmac, rapidocr, tesserocr, tesseract. Optional, defaults to easyocr.",
|
|
"default": "easyocr",
|
|
"examples": [
|
|
"easyocr"
|
|
]
|
|
},
|
|
"convert_ocr_lang": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Convert Ocr Lang",
|
|
"description": "List of languages used by the OCR engine. Note that each OCR engine has different values for the language names. String or list of strings. Optional, defaults to empty.",
|
|
"examples": [
|
|
[
|
|
"fr",
|
|
"de",
|
|
"es",
|
|
"en"
|
|
]
|
|
]
|
|
},
|
|
"convert_pdf_backend": {
|
|
"$ref": "#/components/schemas/PdfBackend",
|
|
"description": "The PDF backend to use. String. Allowed values: pypdfium2, dlparse_v1, dlparse_v2, dlparse_v4. Optional, defaults to dlparse_v4.",
|
|
"default": "dlparse_v4",
|
|
"examples": [
|
|
"dlparse_v4"
|
|
]
|
|
},
|
|
"convert_table_mode": {
|
|
"$ref": "#/components/schemas/TableFormerMode",
|
|
"description": "Mode to use for table structure, String. Allowed values: fast, accurate. Optional, defaults to accurate.",
|
|
"default": "accurate",
|
|
"examples": [
|
|
"accurate"
|
|
]
|
|
},
|
|
"convert_table_cell_matching": {
|
|
"type": "boolean",
|
|
"title": "Convert Table Cell Matching",
|
|
"description": "If true, matches table cells predictions back to PDF cells. Can break table output if PDF cells are merged across table columns. If false, let table structure model define the text cells, ignore PDF cells.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_pipeline": {
|
|
"$ref": "#/components/schemas/ProcessingPipeline",
|
|
"description": "Choose the pipeline to process PDF or image files.",
|
|
"default": "standard"
|
|
},
|
|
"convert_page_range": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2,
|
|
"title": "Convert Page Range",
|
|
"description": "Only convert a range of pages. The page number starts at 1.",
|
|
"default": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"examples": [
|
|
[
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
[
|
|
1,
|
|
4
|
|
]
|
|
]
|
|
},
|
|
"convert_document_timeout": {
|
|
"type": "number",
|
|
"title": "Convert Document Timeout",
|
|
"description": "The timeout for processing each document, in seconds.",
|
|
"default": 604800
|
|
},
|
|
"convert_abort_on_error": {
|
|
"type": "boolean",
|
|
"title": "Convert Abort On Error",
|
|
"description": "Abort on error if enabled. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"convert_do_table_structure": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Table Structure",
|
|
"description": "If enabled, the table structure will be extracted. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_include_images": {
|
|
"type": "boolean",
|
|
"title": "Convert Include Images",
|
|
"description": "If enabled, images will be extracted from the document. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"convert_images_scale": {
|
|
"type": "number",
|
|
"title": "Convert Images Scale",
|
|
"description": "Scale factor for images. Float. Optional, defaults to 2.0.",
|
|
"default": 2,
|
|
"examples": [
|
|
2
|
|
]
|
|
},
|
|
"convert_md_page_break_placeholder": {
|
|
"type": "string",
|
|
"title": "Convert Md Page Break Placeholder",
|
|
"description": "Add this placeholder between pages in the markdown output.",
|
|
"default": "",
|
|
"examples": [
|
|
"<!-- page-break -->",
|
|
""
|
|
]
|
|
},
|
|
"convert_do_code_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Code Enrichment",
|
|
"description": "If enabled, perform OCR code enrichment. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_formula_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Formula Enrichment",
|
|
"description": "If enabled, perform formula OCR, return LaTeX code. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_picture_classification": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Picture Classification",
|
|
"description": "If enabled, classify pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_do_picture_description": {
|
|
"type": "boolean",
|
|
"title": "Convert Do Picture Description",
|
|
"description": "If enabled, describe pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"convert_picture_description_area_threshold": {
|
|
"type": "number",
|
|
"title": "Convert Picture Description Area Threshold",
|
|
"description": "Minimum percentage of the area for a picture to be processed with the models.",
|
|
"default": 0.05,
|
|
"examples": [
|
|
0.05
|
|
]
|
|
},
|
|
"convert_picture_description_local": {
|
|
"type": "string",
|
|
"title": "Convert Picture Description Local",
|
|
"description": "Options for running a local vision-language model in the picture description. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with picture_description_api.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}",
|
|
"{\"repo_id\": \"HuggingFaceTB/SmolVLM-256M-Instruct\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}"
|
|
]
|
|
},
|
|
"convert_picture_description_api": {
|
|
"type": "string",
|
|
"title": "Convert Picture Description Api",
|
|
"description": "API details for using a vision-language model in the picture description. This parameter is mutually exclusive with picture_description_local.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}",
|
|
"{\"url\": \"http://localhost:11434/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VlmModelType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Preset of local and API models for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model_api. Use the other options for more parameters.",
|
|
"examples": [
|
|
"granite_docling"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model_local": {
|
|
"type": "string",
|
|
"title": "Convert Vlm Pipeline Model Local",
|
|
"description": "Options for running a local vision-language model for the vlm pipeline. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with vlm_pipeline_model_api and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-imagetexttotext\", \"extra_generation_config\": {\"skip_special_tokens\": false}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M-mlx\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"mlx\", \"transformers_model_type\": \"automodel\", \"extra_generation_config\": {}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Convert this page to markdown. Do not miss any text and only output the bare markdown!\", \"scale\": 2.0, \"response_format\": \"markdown\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-vision2seq\", \"extra_generation_config\": {}, \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"convert_vlm_pipeline_model_api": {
|
|
"type": "string",
|
|
"title": "Convert Vlm Pipeline Model Api",
|
|
"description": "API details for using a vision-language model for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"ibm-granite/granite-docling-258M-mlx\"}, \"timeout\": 60.0, \"concurrency\": 1, \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"chunking_use_markdown_tables": {
|
|
"type": "boolean",
|
|
"title": "Chunking Use Markdown Tables",
|
|
"description": "Use markdown table format instead of triplets for table serialization.",
|
|
"default": false
|
|
},
|
|
"chunking_include_raw_text": {
|
|
"type": "boolean",
|
|
"title": "Chunking Include Raw Text",
|
|
"description": "Include both raw_text and text (contextualized) in response. If False, only text is included.",
|
|
"default": false
|
|
},
|
|
"chunking_max_tokens": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Chunking Max Tokens",
|
|
"description": "Maximum number of tokens per chunk. When left to none, the value is automatically extracted from the tokenizer."
|
|
},
|
|
"chunking_tokenizer": {
|
|
"type": "string",
|
|
"title": "Chunking Tokenizer",
|
|
"description": "HuggingFace model name for custom tokenization. If not specified, uses 'sentence-transformers/all-MiniLM-L6-v2' as default.",
|
|
"default": "sentence-transformers/all-MiniLM-L6-v2",
|
|
"examples": [
|
|
"Qwen/Qwen3-Embedding-0.6B",
|
|
"sentence-transformers/all-MiniLM-L6-v2"
|
|
]
|
|
},
|
|
"chunking_merge_peers": {
|
|
"type": "boolean",
|
|
"title": "Chunking Merge Peers",
|
|
"description": "Merge undersized successive chunks with same headings.",
|
|
"default": true
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"files"
|
|
],
|
|
"title": "Body_Chunk_files_with_HybridChunker_v1_chunk_hybrid_file_post"
|
|
},
|
|
"Body_process_file_async_v1_convert_file_async_post": {
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
},
|
|
"type": "array",
|
|
"title": "Files"
|
|
},
|
|
"target_type": {
|
|
"$ref": "#/components/schemas/TargetName",
|
|
"default": "inbody"
|
|
},
|
|
"from_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/InputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "From Formats",
|
|
"description": "Input format(s) to convert from. String or list of strings. Allowed values: docx, pptx, html, image, pdf, asciidoc, md, csv, xlsx, xml_uspto, xml_jats, mets_gbs, json_docling, audio, vtt. Optional, defaults to all formats.",
|
|
"default": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"examples": [
|
|
[
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
]
|
|
]
|
|
},
|
|
"to_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/OutputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "To Formats",
|
|
"description": "Output format(s) to convert to. String or list of strings. Allowed values: md, json, html, html_split_page, text, doctags. Optional, defaults to Markdown.",
|
|
"default": [
|
|
"md"
|
|
],
|
|
"examples": [
|
|
[
|
|
"md"
|
|
],
|
|
[
|
|
"md",
|
|
"json"
|
|
],
|
|
[
|
|
"md",
|
|
"json",
|
|
"html",
|
|
"html_split_page",
|
|
"text",
|
|
"doctags"
|
|
]
|
|
]
|
|
},
|
|
"image_export_mode": {
|
|
"$ref": "#/components/schemas/ImageRefMode",
|
|
"description": "Image export mode for the document (in case of JSON, Markdown or HTML). Allowed values: placeholder, embedded, referenced. Optional, defaults to Embedded.",
|
|
"default": "embedded",
|
|
"examples": [
|
|
"embedded"
|
|
]
|
|
},
|
|
"do_ocr": {
|
|
"type": "boolean",
|
|
"title": "Do Ocr",
|
|
"description": "If enabled, the bitmap content will be processed using OCR. Boolean. Optional, defaults to true",
|
|
"default": true
|
|
},
|
|
"force_ocr": {
|
|
"type": "boolean",
|
|
"title": "Force Ocr",
|
|
"description": "If enabled, replace existing text with OCR-generated text over content. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"ocr_engine": {
|
|
"$ref": "#/components/schemas/ocr_engines_enum",
|
|
"description": "The OCR engine to use. String. Allowed values: auto, easyocr, ocrmac, rapidocr, tesserocr, tesseract. Optional, defaults to easyocr.",
|
|
"default": "easyocr",
|
|
"examples": [
|
|
"easyocr"
|
|
]
|
|
},
|
|
"ocr_lang": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Ocr Lang",
|
|
"description": "List of languages used by the OCR engine. Note that each OCR engine has different values for the language names. String or list of strings. Optional, defaults to empty.",
|
|
"examples": [
|
|
[
|
|
"fr",
|
|
"de",
|
|
"es",
|
|
"en"
|
|
]
|
|
]
|
|
},
|
|
"pdf_backend": {
|
|
"$ref": "#/components/schemas/PdfBackend",
|
|
"description": "The PDF backend to use. String. Allowed values: pypdfium2, dlparse_v1, dlparse_v2, dlparse_v4. Optional, defaults to dlparse_v4.",
|
|
"default": "dlparse_v4",
|
|
"examples": [
|
|
"dlparse_v4"
|
|
]
|
|
},
|
|
"table_mode": {
|
|
"$ref": "#/components/schemas/TableFormerMode",
|
|
"description": "Mode to use for table structure, String. Allowed values: fast, accurate. Optional, defaults to accurate.",
|
|
"default": "accurate",
|
|
"examples": [
|
|
"accurate"
|
|
]
|
|
},
|
|
"table_cell_matching": {
|
|
"type": "boolean",
|
|
"title": "Table Cell Matching",
|
|
"description": "If true, matches table cells predictions back to PDF cells. Can break table output if PDF cells are merged across table columns. If false, let table structure model define the text cells, ignore PDF cells.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"pipeline": {
|
|
"$ref": "#/components/schemas/ProcessingPipeline",
|
|
"description": "Choose the pipeline to process PDF or image files.",
|
|
"default": "standard"
|
|
},
|
|
"page_range": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2,
|
|
"title": "Page Range",
|
|
"description": "Only convert a range of pages. The page number starts at 1.",
|
|
"default": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"examples": [
|
|
[
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
[
|
|
1,
|
|
4
|
|
]
|
|
]
|
|
},
|
|
"document_timeout": {
|
|
"type": "number",
|
|
"title": "Document Timeout",
|
|
"description": "The timeout for processing each document, in seconds.",
|
|
"default": 604800
|
|
},
|
|
"abort_on_error": {
|
|
"type": "boolean",
|
|
"title": "Abort On Error",
|
|
"description": "Abort on error if enabled. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"do_table_structure": {
|
|
"type": "boolean",
|
|
"title": "Do Table Structure",
|
|
"description": "If enabled, the table structure will be extracted. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"include_images": {
|
|
"type": "boolean",
|
|
"title": "Include Images",
|
|
"description": "If enabled, images will be extracted from the document. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"images_scale": {
|
|
"type": "number",
|
|
"title": "Images Scale",
|
|
"description": "Scale factor for images. Float. Optional, defaults to 2.0.",
|
|
"default": 2,
|
|
"examples": [
|
|
2
|
|
]
|
|
},
|
|
"md_page_break_placeholder": {
|
|
"type": "string",
|
|
"title": "Md Page Break Placeholder",
|
|
"description": "Add this placeholder between pages in the markdown output.",
|
|
"default": "",
|
|
"examples": [
|
|
"<!-- page-break -->",
|
|
""
|
|
]
|
|
},
|
|
"do_code_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Do Code Enrichment",
|
|
"description": "If enabled, perform OCR code enrichment. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"do_formula_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Do Formula Enrichment",
|
|
"description": "If enabled, perform formula OCR, return LaTeX code. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"do_picture_classification": {
|
|
"type": "boolean",
|
|
"title": "Do Picture Classification",
|
|
"description": "If enabled, classify pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"do_picture_description": {
|
|
"type": "boolean",
|
|
"title": "Do Picture Description",
|
|
"description": "If enabled, describe pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"picture_description_area_threshold": {
|
|
"type": "number",
|
|
"title": "Picture Description Area Threshold",
|
|
"description": "Minimum percentage of the area for a picture to be processed with the models.",
|
|
"default": 0.05,
|
|
"examples": [
|
|
0.05
|
|
]
|
|
},
|
|
"picture_description_local": {
|
|
"type": "string",
|
|
"title": "Picture Description Local",
|
|
"description": "Options for running a local vision-language model in the picture description. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with picture_description_api.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}",
|
|
"{\"repo_id\": \"HuggingFaceTB/SmolVLM-256M-Instruct\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}"
|
|
]
|
|
},
|
|
"picture_description_api": {
|
|
"type": "string",
|
|
"title": "Picture Description Api",
|
|
"description": "API details for using a vision-language model in the picture description. This parameter is mutually exclusive with picture_description_local.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}",
|
|
"{\"url\": \"http://localhost:11434/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}"
|
|
]
|
|
},
|
|
"vlm_pipeline_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VlmModelType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Preset of local and API models for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model_api. Use the other options for more parameters.",
|
|
"examples": [
|
|
"granite_docling"
|
|
]
|
|
},
|
|
"vlm_pipeline_model_local": {
|
|
"type": "string",
|
|
"title": "Vlm Pipeline Model Local",
|
|
"description": "Options for running a local vision-language model for the vlm pipeline. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with vlm_pipeline_model_api and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-imagetexttotext\", \"extra_generation_config\": {\"skip_special_tokens\": false}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M-mlx\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"mlx\", \"transformers_model_type\": \"automodel\", \"extra_generation_config\": {}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Convert this page to markdown. Do not miss any text and only output the bare markdown!\", \"scale\": 2.0, \"response_format\": \"markdown\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-vision2seq\", \"extra_generation_config\": {}, \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"vlm_pipeline_model_api": {
|
|
"type": "string",
|
|
"title": "Vlm Pipeline Model Api",
|
|
"description": "API details for using a vision-language model for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"ibm-granite/granite-docling-258M-mlx\"}, \"timeout\": 60.0, \"concurrency\": 1, \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"temperature\": 0.0}"
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"files"
|
|
],
|
|
"title": "Body_process_file_async_v1_convert_file_async_post"
|
|
},
|
|
"Body_process_file_v1_convert_file_post": {
|
|
"properties": {
|
|
"files": {
|
|
"items": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
},
|
|
"type": "array",
|
|
"title": "Files"
|
|
},
|
|
"target_type": {
|
|
"$ref": "#/components/schemas/TargetName",
|
|
"default": "inbody"
|
|
},
|
|
"from_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/InputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "From Formats",
|
|
"description": "Input format(s) to convert from. String or list of strings. Allowed values: docx, pptx, html, image, pdf, asciidoc, md, csv, xlsx, xml_uspto, xml_jats, mets_gbs, json_docling, audio, vtt. Optional, defaults to all formats.",
|
|
"default": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"examples": [
|
|
[
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
]
|
|
]
|
|
},
|
|
"to_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/OutputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "To Formats",
|
|
"description": "Output format(s) to convert to. String or list of strings. Allowed values: md, json, html, html_split_page, text, doctags. Optional, defaults to Markdown.",
|
|
"default": [
|
|
"md"
|
|
],
|
|
"examples": [
|
|
[
|
|
"md"
|
|
],
|
|
[
|
|
"md",
|
|
"json"
|
|
],
|
|
[
|
|
"md",
|
|
"json",
|
|
"html",
|
|
"html_split_page",
|
|
"text",
|
|
"doctags"
|
|
]
|
|
]
|
|
},
|
|
"image_export_mode": {
|
|
"$ref": "#/components/schemas/ImageRefMode",
|
|
"description": "Image export mode for the document (in case of JSON, Markdown or HTML). Allowed values: placeholder, embedded, referenced. Optional, defaults to Embedded.",
|
|
"default": "embedded",
|
|
"examples": [
|
|
"embedded"
|
|
]
|
|
},
|
|
"do_ocr": {
|
|
"type": "boolean",
|
|
"title": "Do Ocr",
|
|
"description": "If enabled, the bitmap content will be processed using OCR. Boolean. Optional, defaults to true",
|
|
"default": true
|
|
},
|
|
"force_ocr": {
|
|
"type": "boolean",
|
|
"title": "Force Ocr",
|
|
"description": "If enabled, replace existing text with OCR-generated text over content. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"ocr_engine": {
|
|
"$ref": "#/components/schemas/ocr_engines_enum",
|
|
"description": "The OCR engine to use. String. Allowed values: auto, easyocr, ocrmac, rapidocr, tesserocr, tesseract. Optional, defaults to easyocr.",
|
|
"default": "easyocr",
|
|
"examples": [
|
|
"easyocr"
|
|
]
|
|
},
|
|
"ocr_lang": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Ocr Lang",
|
|
"description": "List of languages used by the OCR engine. Note that each OCR engine has different values for the language names. String or list of strings. Optional, defaults to empty.",
|
|
"examples": [
|
|
[
|
|
"fr",
|
|
"de",
|
|
"es",
|
|
"en"
|
|
]
|
|
]
|
|
},
|
|
"pdf_backend": {
|
|
"$ref": "#/components/schemas/PdfBackend",
|
|
"description": "The PDF backend to use. String. Allowed values: pypdfium2, dlparse_v1, dlparse_v2, dlparse_v4. Optional, defaults to dlparse_v4.",
|
|
"default": "dlparse_v4",
|
|
"examples": [
|
|
"dlparse_v4"
|
|
]
|
|
},
|
|
"table_mode": {
|
|
"$ref": "#/components/schemas/TableFormerMode",
|
|
"description": "Mode to use for table structure, String. Allowed values: fast, accurate. Optional, defaults to accurate.",
|
|
"default": "accurate",
|
|
"examples": [
|
|
"accurate"
|
|
]
|
|
},
|
|
"table_cell_matching": {
|
|
"type": "boolean",
|
|
"title": "Table Cell Matching",
|
|
"description": "If true, matches table cells predictions back to PDF cells. Can break table output if PDF cells are merged across table columns. If false, let table structure model define the text cells, ignore PDF cells.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"pipeline": {
|
|
"$ref": "#/components/schemas/ProcessingPipeline",
|
|
"description": "Choose the pipeline to process PDF or image files.",
|
|
"default": "standard"
|
|
},
|
|
"page_range": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2,
|
|
"title": "Page Range",
|
|
"description": "Only convert a range of pages. The page number starts at 1.",
|
|
"default": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"examples": [
|
|
[
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
[
|
|
1,
|
|
4
|
|
]
|
|
]
|
|
},
|
|
"document_timeout": {
|
|
"type": "number",
|
|
"title": "Document Timeout",
|
|
"description": "The timeout for processing each document, in seconds.",
|
|
"default": 604800
|
|
},
|
|
"abort_on_error": {
|
|
"type": "boolean",
|
|
"title": "Abort On Error",
|
|
"description": "Abort on error if enabled. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"do_table_structure": {
|
|
"type": "boolean",
|
|
"title": "Do Table Structure",
|
|
"description": "If enabled, the table structure will be extracted. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"include_images": {
|
|
"type": "boolean",
|
|
"title": "Include Images",
|
|
"description": "If enabled, images will be extracted from the document. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"images_scale": {
|
|
"type": "number",
|
|
"title": "Images Scale",
|
|
"description": "Scale factor for images. Float. Optional, defaults to 2.0.",
|
|
"default": 2,
|
|
"examples": [
|
|
2
|
|
]
|
|
},
|
|
"md_page_break_placeholder": {
|
|
"type": "string",
|
|
"title": "Md Page Break Placeholder",
|
|
"description": "Add this placeholder between pages in the markdown output.",
|
|
"default": "",
|
|
"examples": [
|
|
"<!-- page-break -->",
|
|
""
|
|
]
|
|
},
|
|
"do_code_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Do Code Enrichment",
|
|
"description": "If enabled, perform OCR code enrichment. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"do_formula_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Do Formula Enrichment",
|
|
"description": "If enabled, perform formula OCR, return LaTeX code. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"do_picture_classification": {
|
|
"type": "boolean",
|
|
"title": "Do Picture Classification",
|
|
"description": "If enabled, classify pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"do_picture_description": {
|
|
"type": "boolean",
|
|
"title": "Do Picture Description",
|
|
"description": "If enabled, describe pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"picture_description_area_threshold": {
|
|
"type": "number",
|
|
"title": "Picture Description Area Threshold",
|
|
"description": "Minimum percentage of the area for a picture to be processed with the models.",
|
|
"default": 0.05,
|
|
"examples": [
|
|
0.05
|
|
]
|
|
},
|
|
"picture_description_local": {
|
|
"type": "string",
|
|
"title": "Picture Description Local",
|
|
"description": "Options for running a local vision-language model in the picture description. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with picture_description_api.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}",
|
|
"{\"repo_id\": \"HuggingFaceTB/SmolVLM-256M-Instruct\", \"prompt\": \"Describe this image in a few sentences.\", \"generation_config\": {\"max_new_tokens\": 200, \"do_sample\": false}}"
|
|
]
|
|
},
|
|
"picture_description_api": {
|
|
"type": "string",
|
|
"title": "Picture Description Api",
|
|
"description": "API details for using a vision-language model in the picture description. This parameter is mutually exclusive with picture_description_local.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}",
|
|
"{\"url\": \"http://localhost:11434/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"granite3.2-vision:2b\"}, \"timeout\": 20.0, \"concurrency\": 1, \"prompt\": \"Describe this image in a few sentences.\"}"
|
|
]
|
|
},
|
|
"vlm_pipeline_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VlmModelType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Preset of local and API models for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model_api. Use the other options for more parameters.",
|
|
"examples": [
|
|
"granite_docling"
|
|
]
|
|
},
|
|
"vlm_pipeline_model_local": {
|
|
"type": "string",
|
|
"title": "Vlm Pipeline Model Local",
|
|
"description": "Options for running a local vision-language model for the vlm pipeline. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with vlm_pipeline_model_api and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-imagetexttotext\", \"extra_generation_config\": {\"skip_special_tokens\": false}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-docling-258M-mlx\", \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"inference_framework\": \"mlx\", \"transformers_model_type\": \"automodel\", \"extra_generation_config\": {}, \"temperature\": 0.0}",
|
|
"{\"repo_id\": \"ibm-granite/granite-vision-3.2-2b\", \"prompt\": \"Convert this page to markdown. Do not miss any text and only output the bare markdown!\", \"scale\": 2.0, \"response_format\": \"markdown\", \"inference_framework\": \"transformers\", \"transformers_model_type\": \"automodel-vision2seq\", \"extra_generation_config\": {}, \"temperature\": 0.0}"
|
|
]
|
|
},
|
|
"vlm_pipeline_model_api": {
|
|
"type": "string",
|
|
"title": "Vlm Pipeline Model Api",
|
|
"description": "API details for using a vision-language model for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model.",
|
|
"examples": [
|
|
"{\"url\": \"http://localhost:1234/v1/chat/completions\", \"headers\": {}, \"params\": {\"model\": \"ibm-granite/granite-docling-258M-mlx\"}, \"timeout\": 60.0, \"concurrency\": 1, \"prompt\": \"Convert this page to docling.\", \"scale\": 2.0, \"response_format\": \"doctags\", \"temperature\": 0.0}"
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"files"
|
|
],
|
|
"title": "Body_process_file_v1_convert_file_post"
|
|
},
|
|
"BoundingBox": {
|
|
"properties": {
|
|
"l": {
|
|
"type": "number",
|
|
"title": "L"
|
|
},
|
|
"t": {
|
|
"type": "number",
|
|
"title": "T"
|
|
},
|
|
"r": {
|
|
"type": "number",
|
|
"title": "R"
|
|
},
|
|
"b": {
|
|
"type": "number",
|
|
"title": "B"
|
|
},
|
|
"coord_origin": {
|
|
"$ref": "#/components/schemas/CoordOrigin",
|
|
"default": "TOPLEFT"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"l",
|
|
"t",
|
|
"r",
|
|
"b"
|
|
],
|
|
"title": "BoundingBox",
|
|
"description": "BoundingBox."
|
|
},
|
|
"ChartBar": {
|
|
"properties": {
|
|
"label": {
|
|
"type": "string",
|
|
"title": "Label"
|
|
},
|
|
"values": {
|
|
"type": "number",
|
|
"title": "Values"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"label",
|
|
"values"
|
|
],
|
|
"title": "ChartBar",
|
|
"description": "Represents a bar in a bar chart.\n\nAttributes:\n label (str): The label for the bar.\n values (float): The value associated with the bar."
|
|
},
|
|
"ChartLine": {
|
|
"properties": {
|
|
"label": {
|
|
"type": "string",
|
|
"title": "Label"
|
|
},
|
|
"values": {
|
|
"items": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "number"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2
|
|
},
|
|
"type": "array",
|
|
"title": "Values"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"label",
|
|
"values"
|
|
],
|
|
"title": "ChartLine",
|
|
"description": "Represents a line in a line chart.\n\nAttributes:\n label (str): The label for the line.\n values (List[Tuple[float, float]]): A list of (x, y) coordinate pairs\n representing the line's data points."
|
|
},
|
|
"ChartPoint": {
|
|
"properties": {
|
|
"value": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "number"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2,
|
|
"title": "Value"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"value"
|
|
],
|
|
"title": "ChartPoint",
|
|
"description": "Represents a point in a scatter chart.\n\nAttributes:\n value (Tuple[float, float]): A (x, y) coordinate pair representing a point in a\n chart."
|
|
},
|
|
"ChartSlice": {
|
|
"properties": {
|
|
"label": {
|
|
"type": "string",
|
|
"title": "Label"
|
|
},
|
|
"value": {
|
|
"type": "number",
|
|
"title": "Value"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"label",
|
|
"value"
|
|
],
|
|
"title": "ChartSlice",
|
|
"description": "Represents a slice in a pie chart.\n\nAttributes:\n label (str): The label for the slice.\n value (float): The value represented by the slice."
|
|
},
|
|
"ChartStackedBar": {
|
|
"properties": {
|
|
"label": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array",
|
|
"title": "Label"
|
|
},
|
|
"values": {
|
|
"items": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2
|
|
},
|
|
"type": "array",
|
|
"title": "Values"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"label",
|
|
"values"
|
|
],
|
|
"title": "ChartStackedBar",
|
|
"description": "Represents a stacked bar in a stacked bar chart.\n\nAttributes:\n label (List[str]): The labels for the stacked bars. Multiple values are stored\n in cases where the chart is \"double stacked,\" meaning bars are stacked both\n horizontally and vertically.\n values (List[Tuple[str, int]]): A list of values representing different segments\n of the stacked bar along with their label."
|
|
},
|
|
"ChunkDocumentResponse": {
|
|
"properties": {
|
|
"chunks": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChunkedDocumentResultItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Chunks"
|
|
},
|
|
"documents": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ExportResult"
|
|
},
|
|
"type": "array",
|
|
"title": "Documents"
|
|
},
|
|
"processing_time": {
|
|
"type": "number",
|
|
"title": "Processing Time"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"chunks",
|
|
"documents",
|
|
"processing_time"
|
|
],
|
|
"title": "ChunkDocumentResponse"
|
|
},
|
|
"ChunkedDocumentResultItem": {
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string",
|
|
"title": "Filename"
|
|
},
|
|
"chunk_index": {
|
|
"type": "integer",
|
|
"title": "Chunk Index"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text",
|
|
"description": "The chunk text with structural context (headers, formatting)"
|
|
},
|
|
"raw_text": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Raw Text",
|
|
"description": "Raw chunk text without additional formatting or context"
|
|
},
|
|
"num_tokens": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Num Tokens",
|
|
"description": "Number of tokens in the text, if the chunker is aware of tokens"
|
|
},
|
|
"headings": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Headings",
|
|
"description": "List of headings for this chunk"
|
|
},
|
|
"captions": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Captions",
|
|
"description": "List of captions for this chunk (e.g. for pictures and tables)"
|
|
},
|
|
"doc_items": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array",
|
|
"title": "Doc Items",
|
|
"description": "List of doc items references"
|
|
},
|
|
"page_numbers": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Page Numbers",
|
|
"description": "Page numbers where this chunk content appears"
|
|
},
|
|
"metadata": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Metadata",
|
|
"description": "Additional metadata associated with this chunk"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"filename",
|
|
"chunk_index",
|
|
"text",
|
|
"doc_items"
|
|
],
|
|
"title": "ChunkedDocumentResultItem",
|
|
"description": "A single chunk of a document with its metadata and content."
|
|
},
|
|
"ClearResponse": {
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"title": "Status",
|
|
"default": "ok"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "ClearResponse"
|
|
},
|
|
"CodeItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/FloatingMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"const": "code",
|
|
"title": "Label",
|
|
"default": "code"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"orig": {
|
|
"type": "string",
|
|
"title": "Orig"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"formatting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Formatting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"hyperlink": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "path"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Hyperlink"
|
|
},
|
|
"captions": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Captions",
|
|
"default": []
|
|
},
|
|
"references": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "References",
|
|
"default": []
|
|
},
|
|
"footnotes": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Footnotes",
|
|
"default": []
|
|
},
|
|
"image": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ImageRef"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"code_language": {
|
|
"$ref": "#/components/schemas/CodeLanguageLabel",
|
|
"default": "unknown"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref",
|
|
"orig",
|
|
"text"
|
|
],
|
|
"title": "CodeItem",
|
|
"description": "CodeItem."
|
|
},
|
|
"CodeLanguageLabel": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Ada",
|
|
"Awk",
|
|
"Bash",
|
|
"bc",
|
|
"C",
|
|
"C#",
|
|
"C++",
|
|
"CMake",
|
|
"COBOL",
|
|
"CSS",
|
|
"Ceylon",
|
|
"Clojure",
|
|
"Crystal",
|
|
"Cuda",
|
|
"Cython",
|
|
"D",
|
|
"Dart",
|
|
"dc",
|
|
"Dockerfile",
|
|
"Elixir",
|
|
"Erlang",
|
|
"FORTRAN",
|
|
"Forth",
|
|
"Go",
|
|
"HTML",
|
|
"Haskell",
|
|
"Haxe",
|
|
"Java",
|
|
"JavaScript",
|
|
"JSON",
|
|
"Julia",
|
|
"Kotlin",
|
|
"Lisp",
|
|
"Lua",
|
|
"Matlab",
|
|
"MoonScript",
|
|
"Nim",
|
|
"OCaml",
|
|
"ObjectiveC",
|
|
"Octave",
|
|
"PHP",
|
|
"Pascal",
|
|
"Perl",
|
|
"Prolog",
|
|
"Python",
|
|
"Racket",
|
|
"Ruby",
|
|
"Rust",
|
|
"SML",
|
|
"SQL",
|
|
"Scala",
|
|
"Scheme",
|
|
"Swift",
|
|
"TypeScript",
|
|
"unknown",
|
|
"VisualBasic",
|
|
"XML",
|
|
"YAML"
|
|
],
|
|
"title": "CodeLanguageLabel",
|
|
"description": "CodeLanguageLabel."
|
|
},
|
|
"ContentLayer": {
|
|
"type": "string",
|
|
"enum": [
|
|
"body",
|
|
"furniture",
|
|
"background",
|
|
"invisible",
|
|
"notes"
|
|
],
|
|
"title": "ContentLayer",
|
|
"description": "ContentLayer."
|
|
},
|
|
"ConversionStatus": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"started",
|
|
"failure",
|
|
"success",
|
|
"partial_success",
|
|
"skipped"
|
|
],
|
|
"title": "ConversionStatus"
|
|
},
|
|
"ConvertDocumentResponse": {
|
|
"properties": {
|
|
"document": {
|
|
"$ref": "#/components/schemas/ExportDocumentResponse"
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/ConversionStatus"
|
|
},
|
|
"errors": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ErrorItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Errors",
|
|
"default": []
|
|
},
|
|
"processing_time": {
|
|
"type": "number",
|
|
"title": "Processing Time"
|
|
},
|
|
"timings": {
|
|
"additionalProperties": {
|
|
"$ref": "#/components/schemas/ProfilingItem"
|
|
},
|
|
"type": "object",
|
|
"title": "Timings",
|
|
"default": {}
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"document",
|
|
"status",
|
|
"processing_time"
|
|
],
|
|
"title": "ConvertDocumentResponse"
|
|
},
|
|
"ConvertDocumentsRequest": {
|
|
"properties": {
|
|
"options": {
|
|
"$ref": "#/components/schemas/ConvertDocumentsRequestOptions",
|
|
"default": {
|
|
"from_formats": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"to_formats": [
|
|
"md"
|
|
],
|
|
"image_export_mode": "embedded",
|
|
"do_ocr": true,
|
|
"force_ocr": false,
|
|
"ocr_engine": "easyocr",
|
|
"pdf_backend": "dlparse_v4",
|
|
"table_mode": "accurate",
|
|
"table_cell_matching": true,
|
|
"pipeline": "standard",
|
|
"page_range": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"document_timeout": 604800,
|
|
"abort_on_error": false,
|
|
"do_table_structure": true,
|
|
"include_images": true,
|
|
"images_scale": 2,
|
|
"md_page_break_placeholder": "",
|
|
"do_code_enrichment": false,
|
|
"do_formula_enrichment": false,
|
|
"do_picture_classification": false,
|
|
"do_picture_description": false,
|
|
"picture_description_area_threshold": 0.05
|
|
}
|
|
},
|
|
"sources": {
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/FileSourceRequest"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/HttpSourceRequest"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/S3SourceRequest"
|
|
}
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "kind",
|
|
"mapping": {
|
|
"file": "#/components/schemas/FileSourceRequest",
|
|
"http": "#/components/schemas/HttpSourceRequest",
|
|
"s3": "#/components/schemas/S3SourceRequest"
|
|
}
|
|
}
|
|
},
|
|
"type": "array",
|
|
"title": "Sources"
|
|
},
|
|
"target": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/InBodyTarget"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ZipTarget"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/S3Target"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PutTarget"
|
|
}
|
|
],
|
|
"title": "Target",
|
|
"default": {
|
|
"kind": "inbody"
|
|
},
|
|
"discriminator": {
|
|
"propertyName": "kind",
|
|
"mapping": {
|
|
"inbody": "#/components/schemas/InBodyTarget",
|
|
"put": "#/components/schemas/PutTarget",
|
|
"s3": "#/components/schemas/S3Target",
|
|
"zip": "#/components/schemas/ZipTarget"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"sources"
|
|
],
|
|
"title": "ConvertDocumentsRequest"
|
|
},
|
|
"ConvertDocumentsRequestOptions": {
|
|
"properties": {
|
|
"from_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/InputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "From Formats",
|
|
"description": "Input format(s) to convert from. String or list of strings. Allowed values: docx, pptx, html, image, pdf, asciidoc, md, csv, xlsx, xml_uspto, xml_jats, mets_gbs, json_docling, audio, vtt. Optional, defaults to all formats.",
|
|
"default": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"examples": [
|
|
[
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
]
|
|
]
|
|
},
|
|
"to_formats": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/OutputFormat"
|
|
},
|
|
"type": "array",
|
|
"title": "To Formats",
|
|
"description": "Output format(s) to convert to. String or list of strings. Allowed values: md, json, html, html_split_page, text, doctags. Optional, defaults to Markdown.",
|
|
"default": [
|
|
"md"
|
|
],
|
|
"examples": [
|
|
[
|
|
"md"
|
|
],
|
|
[
|
|
"md",
|
|
"json"
|
|
],
|
|
[
|
|
"md",
|
|
"json",
|
|
"html",
|
|
"html_split_page",
|
|
"text",
|
|
"doctags"
|
|
]
|
|
]
|
|
},
|
|
"image_export_mode": {
|
|
"$ref": "#/components/schemas/ImageRefMode",
|
|
"description": "Image export mode for the document (in case of JSON, Markdown or HTML). Allowed values: placeholder, embedded, referenced. Optional, defaults to Embedded.",
|
|
"default": "embedded",
|
|
"examples": [
|
|
"embedded"
|
|
]
|
|
},
|
|
"do_ocr": {
|
|
"type": "boolean",
|
|
"title": "Do Ocr",
|
|
"description": "If enabled, the bitmap content will be processed using OCR. Boolean. Optional, defaults to true",
|
|
"default": true
|
|
},
|
|
"force_ocr": {
|
|
"type": "boolean",
|
|
"title": "Force Ocr",
|
|
"description": "If enabled, replace existing text with OCR-generated text over content. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"ocr_engine": {
|
|
"$ref": "#/components/schemas/ocr_engines_enum",
|
|
"description": "The OCR engine to use. String. Allowed values: auto, easyocr, ocrmac, rapidocr, tesserocr, tesseract. Optional, defaults to easyocr.",
|
|
"default": "easyocr",
|
|
"examples": [
|
|
"easyocr"
|
|
]
|
|
},
|
|
"ocr_lang": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Ocr Lang",
|
|
"description": "List of languages used by the OCR engine. Note that each OCR engine has different values for the language names. String or list of strings. Optional, defaults to empty.",
|
|
"examples": [
|
|
[
|
|
"fr",
|
|
"de",
|
|
"es",
|
|
"en"
|
|
]
|
|
]
|
|
},
|
|
"pdf_backend": {
|
|
"$ref": "#/components/schemas/PdfBackend",
|
|
"description": "The PDF backend to use. String. Allowed values: pypdfium2, dlparse_v1, dlparse_v2, dlparse_v4. Optional, defaults to dlparse_v4.",
|
|
"default": "dlparse_v4",
|
|
"examples": [
|
|
"dlparse_v4"
|
|
]
|
|
},
|
|
"table_mode": {
|
|
"$ref": "#/components/schemas/TableFormerMode",
|
|
"description": "Mode to use for table structure, String. Allowed values: fast, accurate. Optional, defaults to accurate.",
|
|
"default": "accurate",
|
|
"examples": [
|
|
"accurate"
|
|
]
|
|
},
|
|
"table_cell_matching": {
|
|
"type": "boolean",
|
|
"title": "Table Cell Matching",
|
|
"description": "If true, matches table cells predictions back to PDF cells. Can break table output if PDF cells are merged across table columns. If false, let table structure model define the text cells, ignore PDF cells.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"pipeline": {
|
|
"$ref": "#/components/schemas/ProcessingPipeline",
|
|
"description": "Choose the pipeline to process PDF or image files.",
|
|
"default": "standard"
|
|
},
|
|
"page_range": {
|
|
"title": "Page Range",
|
|
"description": "Only convert a range of pages. The page number starts at 1.",
|
|
"default": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"examples": [
|
|
[
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
[
|
|
1,
|
|
4
|
|
]
|
|
]
|
|
},
|
|
"document_timeout": {
|
|
"type": "number",
|
|
"maximum": 604800,
|
|
"exclusiveMinimum": 0,
|
|
"title": "Document Timeout",
|
|
"description": "The timeout for processing each document, in seconds.",
|
|
"default": 604800
|
|
},
|
|
"abort_on_error": {
|
|
"type": "boolean",
|
|
"title": "Abort On Error",
|
|
"description": "Abort on error if enabled. Boolean. Optional, defaults to false.",
|
|
"default": false
|
|
},
|
|
"do_table_structure": {
|
|
"type": "boolean",
|
|
"title": "Do Table Structure",
|
|
"description": "If enabled, the table structure will be extracted. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"include_images": {
|
|
"type": "boolean",
|
|
"title": "Include Images",
|
|
"description": "If enabled, images will be extracted from the document. Boolean. Optional, defaults to true.",
|
|
"default": true,
|
|
"examples": [
|
|
true
|
|
]
|
|
},
|
|
"images_scale": {
|
|
"type": "number",
|
|
"title": "Images Scale",
|
|
"description": "Scale factor for images. Float. Optional, defaults to 2.0.",
|
|
"default": 2,
|
|
"examples": [
|
|
2
|
|
]
|
|
},
|
|
"md_page_break_placeholder": {
|
|
"type": "string",
|
|
"title": "Md Page Break Placeholder",
|
|
"description": "Add this placeholder between pages in the markdown output.",
|
|
"default": "",
|
|
"examples": [
|
|
"<!-- page-break -->",
|
|
""
|
|
]
|
|
},
|
|
"do_code_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Do Code Enrichment",
|
|
"description": "If enabled, perform OCR code enrichment. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"do_formula_enrichment": {
|
|
"type": "boolean",
|
|
"title": "Do Formula Enrichment",
|
|
"description": "If enabled, perform formula OCR, return LaTeX code. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"do_picture_classification": {
|
|
"type": "boolean",
|
|
"title": "Do Picture Classification",
|
|
"description": "If enabled, classify pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"do_picture_description": {
|
|
"type": "boolean",
|
|
"title": "Do Picture Description",
|
|
"description": "If enabled, describe pictures in documents. Boolean. Optional, defaults to false.",
|
|
"default": false,
|
|
"examples": [
|
|
false
|
|
]
|
|
},
|
|
"picture_description_area_threshold": {
|
|
"type": "number",
|
|
"title": "Picture Description Area Threshold",
|
|
"description": "Minimum percentage of the area for a picture to be processed with the models.",
|
|
"default": 0.05,
|
|
"examples": [
|
|
0.05
|
|
]
|
|
},
|
|
"picture_description_local": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PictureDescriptionLocal"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Options for running a local vision-language model in the picture description. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with picture_description_api.",
|
|
"examples": [
|
|
{
|
|
"generation_config": {
|
|
"do_sample": false,
|
|
"max_new_tokens": 200
|
|
},
|
|
"prompt": "Describe this image in a few sentences.",
|
|
"repo_id": "ibm-granite/granite-vision-3.2-2b"
|
|
},
|
|
{
|
|
"generation_config": {
|
|
"do_sample": false,
|
|
"max_new_tokens": 200
|
|
},
|
|
"prompt": "Describe this image in a few sentences.",
|
|
"repo_id": "HuggingFaceTB/SmolVLM-256M-Instruct"
|
|
}
|
|
]
|
|
},
|
|
"picture_description_api": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PictureDescriptionApi"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "API details for using a vision-language model in the picture description. This parameter is mutually exclusive with picture_description_local.",
|
|
"examples": [
|
|
{
|
|
"concurrency": 1,
|
|
"headers": {},
|
|
"params": {
|
|
"model": "granite3.2-vision:2b"
|
|
},
|
|
"prompt": "Describe this image in a few sentences.",
|
|
"timeout": 20,
|
|
"url": "http://localhost:1234/v1/chat/completions"
|
|
},
|
|
{
|
|
"concurrency": 1,
|
|
"headers": {},
|
|
"params": {
|
|
"model": "granite3.2-vision:2b"
|
|
},
|
|
"prompt": "Describe this image in a few sentences.",
|
|
"timeout": 20,
|
|
"url": "http://localhost:11434/v1/chat/completions"
|
|
}
|
|
]
|
|
},
|
|
"vlm_pipeline_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VlmModelType"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Preset of local and API models for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model_api. Use the other options for more parameters.",
|
|
"examples": [
|
|
"granite_docling"
|
|
]
|
|
},
|
|
"vlm_pipeline_model_local": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VlmModelLocal"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Options for running a local vision-language model for the vlm pipeline. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with vlm_pipeline_model_api and vlm_pipeline_model.",
|
|
"examples": [
|
|
{
|
|
"extra_generation_config": {
|
|
"skip_special_tokens": false
|
|
},
|
|
"inference_framework": "transformers",
|
|
"prompt": "Convert this page to docling.",
|
|
"repo_id": "ibm-granite/granite-docling-258M",
|
|
"response_format": "doctags",
|
|
"scale": 2,
|
|
"temperature": 0,
|
|
"transformers_model_type": "automodel-imagetexttotext"
|
|
},
|
|
{
|
|
"extra_generation_config": {},
|
|
"inference_framework": "mlx",
|
|
"prompt": "Convert this page to docling.",
|
|
"repo_id": "ibm-granite/granite-docling-258M-mlx",
|
|
"response_format": "doctags",
|
|
"scale": 2,
|
|
"temperature": 0,
|
|
"transformers_model_type": "automodel"
|
|
},
|
|
{
|
|
"extra_generation_config": {},
|
|
"inference_framework": "transformers",
|
|
"prompt": "Convert this page to markdown. Do not miss any text and only output the bare markdown!",
|
|
"repo_id": "ibm-granite/granite-vision-3.2-2b",
|
|
"response_format": "markdown",
|
|
"scale": 2,
|
|
"temperature": 0,
|
|
"transformers_model_type": "automodel-vision2seq"
|
|
}
|
|
]
|
|
},
|
|
"vlm_pipeline_model_api": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VlmModelApi"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "API details for using a vision-language model for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model.",
|
|
"examples": [
|
|
{
|
|
"concurrency": 1,
|
|
"headers": {},
|
|
"params": {
|
|
"model": "ibm-granite/granite-docling-258M-mlx"
|
|
},
|
|
"prompt": "Convert this page to docling.",
|
|
"response_format": "doctags",
|
|
"scale": 2,
|
|
"temperature": 0,
|
|
"timeout": 60,
|
|
"url": "http://localhost:1234/v1/chat/completions"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "ConvertDocumentsRequestOptions"
|
|
},
|
|
"CoordOrigin": {
|
|
"type": "string",
|
|
"enum": [
|
|
"TOPLEFT",
|
|
"BOTTOMLEFT"
|
|
],
|
|
"title": "CoordOrigin",
|
|
"description": "CoordOrigin."
|
|
},
|
|
"DescriptionAnnotation": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "description",
|
|
"title": "Kind",
|
|
"default": "description"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"provenance": {
|
|
"type": "string",
|
|
"title": "Provenance"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"text",
|
|
"provenance"
|
|
],
|
|
"title": "DescriptionAnnotation",
|
|
"description": "DescriptionAnnotation."
|
|
},
|
|
"DescriptionMetaField": {
|
|
"properties": {
|
|
"confidence": {
|
|
"type": "number",
|
|
"title": "Confidence",
|
|
"description": "The confidence of the prediction.",
|
|
"examples": [
|
|
0.9,
|
|
0.42
|
|
]
|
|
},
|
|
"created_by": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By",
|
|
"description": "The origin of the prediction.",
|
|
"examples": [
|
|
"ibm-granite/granite-docling-258M"
|
|
]
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"required": [
|
|
"text"
|
|
],
|
|
"title": "DescriptionMetaField",
|
|
"description": "Description metadata field."
|
|
},
|
|
"DoclingComponentType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"document_backend",
|
|
"model",
|
|
"doc_assembler",
|
|
"user_input",
|
|
"pipeline"
|
|
],
|
|
"title": "DoclingComponentType"
|
|
},
|
|
"DoclingDocument": {
|
|
"properties": {
|
|
"schema_name": {
|
|
"type": "string",
|
|
"const": "DoclingDocument",
|
|
"title": "Schema Name",
|
|
"default": "DoclingDocument"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"pattern": "^(?P<major>0|[1-9]\\d*)\\.(?P<minor>0|[1-9]\\d*)\\.(?P<patch>0|[1-9]\\d*)(?:-(?P<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
|
|
"title": "Version",
|
|
"default": "1.8.0"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name"
|
|
},
|
|
"origin": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DocumentOrigin"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"furniture": {
|
|
"$ref": "#/components/schemas/GroupItem",
|
|
"default": {
|
|
"self_ref": "#/furniture",
|
|
"children": [],
|
|
"content_layer": "furniture",
|
|
"name": "_root_",
|
|
"label": "unspecified"
|
|
},
|
|
"deprecated": true
|
|
},
|
|
"body": {
|
|
"$ref": "#/components/schemas/GroupItem",
|
|
"default": {
|
|
"self_ref": "#/body",
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"name": "_root_",
|
|
"label": "unspecified"
|
|
}
|
|
},
|
|
"groups": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ListGroup"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/InlineGroup"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/GroupItem"
|
|
}
|
|
]
|
|
},
|
|
"type": "array",
|
|
"title": "Groups",
|
|
"default": []
|
|
},
|
|
"texts": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/TitleItem"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/SectionHeaderItem"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ListItem"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CodeItem"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/FormulaItem"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/TextItem"
|
|
}
|
|
]
|
|
},
|
|
"type": "array",
|
|
"title": "Texts",
|
|
"default": []
|
|
},
|
|
"pictures": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PictureItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Pictures",
|
|
"default": []
|
|
},
|
|
"tables": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TableItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Tables",
|
|
"default": []
|
|
},
|
|
"key_value_items": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/KeyValueItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Key Value Items",
|
|
"default": []
|
|
},
|
|
"form_items": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/FormItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Form Items",
|
|
"default": []
|
|
},
|
|
"pages": {
|
|
"additionalProperties": {
|
|
"$ref": "#/components/schemas/PageItem"
|
|
},
|
|
"type": "object",
|
|
"title": "Pages",
|
|
"default": {}
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "DoclingDocument",
|
|
"description": "DoclingDocument."
|
|
},
|
|
"DocumentOrigin": {
|
|
"properties": {
|
|
"mimetype": {
|
|
"type": "string",
|
|
"title": "Mimetype"
|
|
},
|
|
"binary_hash": {
|
|
"type": "integer",
|
|
"maximum": 18446744073709552000,
|
|
"minimum": 0,
|
|
"title": "Binary Hash"
|
|
},
|
|
"filename": {
|
|
"type": "string",
|
|
"title": "Filename"
|
|
},
|
|
"uri": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Uri"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"mimetype",
|
|
"binary_hash",
|
|
"filename"
|
|
],
|
|
"title": "DocumentOrigin",
|
|
"description": "FileSource."
|
|
},
|
|
"ErrorItem": {
|
|
"properties": {
|
|
"component_type": {
|
|
"$ref": "#/components/schemas/DoclingComponentType"
|
|
},
|
|
"module_name": {
|
|
"type": "string",
|
|
"title": "Module Name"
|
|
},
|
|
"error_message": {
|
|
"type": "string",
|
|
"title": "Error Message"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"component_type",
|
|
"module_name",
|
|
"error_message"
|
|
],
|
|
"title": "ErrorItem"
|
|
},
|
|
"ExportDocumentResponse": {
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string",
|
|
"title": "Filename"
|
|
},
|
|
"md_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Md Content"
|
|
},
|
|
"json_content": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DoclingDocument"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"html_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Html Content"
|
|
},
|
|
"text_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Text Content"
|
|
},
|
|
"doctags_content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Doctags Content"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"filename"
|
|
],
|
|
"title": "ExportDocumentResponse"
|
|
},
|
|
"ExportResult": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "ExportResult",
|
|
"title": "Kind",
|
|
"default": "ExportResult"
|
|
},
|
|
"content": {
|
|
"$ref": "#/components/schemas/ExportDocumentResponse"
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/ConversionStatus"
|
|
},
|
|
"errors": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ErrorItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Errors",
|
|
"default": []
|
|
},
|
|
"timings": {
|
|
"additionalProperties": {
|
|
"$ref": "#/components/schemas/ProfilingItem"
|
|
},
|
|
"type": "object",
|
|
"title": "Timings",
|
|
"default": {}
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"status"
|
|
],
|
|
"title": "ExportResult",
|
|
"description": "Container of all exported content."
|
|
},
|
|
"FileSourceRequest": {
|
|
"properties": {
|
|
"base64_string": {
|
|
"type": "string",
|
|
"title": "Base64 String",
|
|
"description": "Content of the file serialized in base64. For example it can be obtained via `base64 -w 0 /path/to/file/pdf-to-convert.pdf`."
|
|
},
|
|
"filename": {
|
|
"type": "string",
|
|
"title": "Filename",
|
|
"description": "Filename of the uploaded document",
|
|
"examples": [
|
|
"file.pdf"
|
|
]
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "file",
|
|
"title": "Kind",
|
|
"default": "file"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"base64_string",
|
|
"filename"
|
|
],
|
|
"title": "FileSourceRequest"
|
|
},
|
|
"FloatingMeta": {
|
|
"properties": {
|
|
"summary": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SummaryMetaField"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DescriptionMetaField"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "FloatingMeta",
|
|
"description": "Metadata model for floating."
|
|
},
|
|
"FormItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/FloatingMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"const": "form",
|
|
"title": "Label",
|
|
"default": "form"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"captions": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Captions",
|
|
"default": []
|
|
},
|
|
"references": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "References",
|
|
"default": []
|
|
},
|
|
"footnotes": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Footnotes",
|
|
"default": []
|
|
},
|
|
"image": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ImageRef"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"graph": {
|
|
"$ref": "#/components/schemas/GraphData"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref",
|
|
"graph"
|
|
],
|
|
"title": "FormItem",
|
|
"description": "FormItem."
|
|
},
|
|
"Formatting": {
|
|
"properties": {
|
|
"bold": {
|
|
"type": "boolean",
|
|
"title": "Bold",
|
|
"default": false
|
|
},
|
|
"italic": {
|
|
"type": "boolean",
|
|
"title": "Italic",
|
|
"default": false
|
|
},
|
|
"underline": {
|
|
"type": "boolean",
|
|
"title": "Underline",
|
|
"default": false
|
|
},
|
|
"strikethrough": {
|
|
"type": "boolean",
|
|
"title": "Strikethrough",
|
|
"default": false
|
|
},
|
|
"script": {
|
|
"$ref": "#/components/schemas/Script",
|
|
"default": "baseline"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "Formatting",
|
|
"description": "Formatting."
|
|
},
|
|
"FormulaItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BaseMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"const": "formula",
|
|
"title": "Label",
|
|
"default": "formula"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"orig": {
|
|
"type": "string",
|
|
"title": "Orig"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"formatting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Formatting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"hyperlink": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "path"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Hyperlink"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref",
|
|
"orig",
|
|
"text"
|
|
],
|
|
"title": "FormulaItem",
|
|
"description": "FormulaItem."
|
|
},
|
|
"GraphCell": {
|
|
"properties": {
|
|
"label": {
|
|
"$ref": "#/components/schemas/GraphCellLabel"
|
|
},
|
|
"cell_id": {
|
|
"type": "integer",
|
|
"title": "Cell Id"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"orig": {
|
|
"type": "string",
|
|
"title": "Orig"
|
|
},
|
|
"prov": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"item_ref": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"label",
|
|
"cell_id",
|
|
"text",
|
|
"orig"
|
|
],
|
|
"title": "GraphCell",
|
|
"description": "GraphCell."
|
|
},
|
|
"GraphCellLabel": {
|
|
"type": "string",
|
|
"enum": [
|
|
"unspecified",
|
|
"key",
|
|
"value",
|
|
"checkbox"
|
|
],
|
|
"title": "GraphCellLabel",
|
|
"description": "GraphCellLabel."
|
|
},
|
|
"GraphData": {
|
|
"properties": {
|
|
"cells": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/GraphCell"
|
|
},
|
|
"type": "array",
|
|
"title": "Cells"
|
|
},
|
|
"links": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/GraphLink"
|
|
},
|
|
"type": "array",
|
|
"title": "Links"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "GraphData",
|
|
"description": "GraphData."
|
|
},
|
|
"GraphLink": {
|
|
"properties": {
|
|
"label": {
|
|
"$ref": "#/components/schemas/GraphLinkLabel"
|
|
},
|
|
"source_cell_id": {
|
|
"type": "integer",
|
|
"title": "Source Cell Id"
|
|
},
|
|
"target_cell_id": {
|
|
"type": "integer",
|
|
"title": "Target Cell Id"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"label",
|
|
"source_cell_id",
|
|
"target_cell_id"
|
|
],
|
|
"title": "GraphLink",
|
|
"description": "GraphLink."
|
|
},
|
|
"GraphLinkLabel": {
|
|
"type": "string",
|
|
"enum": [
|
|
"unspecified",
|
|
"to_value",
|
|
"to_key",
|
|
"to_parent",
|
|
"to_child"
|
|
],
|
|
"title": "GraphLinkLabel",
|
|
"description": "GraphLinkLabel."
|
|
},
|
|
"GroupItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BaseMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name",
|
|
"default": "group"
|
|
},
|
|
"label": {
|
|
"$ref": "#/components/schemas/GroupLabel",
|
|
"default": "unspecified"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref"
|
|
],
|
|
"title": "GroupItem",
|
|
"description": "GroupItem."
|
|
},
|
|
"GroupLabel": {
|
|
"type": "string",
|
|
"enum": [
|
|
"unspecified",
|
|
"list",
|
|
"ordered_list",
|
|
"chapter",
|
|
"section",
|
|
"sheet",
|
|
"slide",
|
|
"form_area",
|
|
"key_value_area",
|
|
"comment_section",
|
|
"inline",
|
|
"picture_area"
|
|
],
|
|
"title": "GroupLabel",
|
|
"description": "GroupLabel."
|
|
},
|
|
"HTTPValidationError": {
|
|
"properties": {
|
|
"detail": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ValidationError"
|
|
},
|
|
"type": "array",
|
|
"title": "Detail"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "HTTPValidationError"
|
|
},
|
|
"HealthCheckResponse": {
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"title": "Status",
|
|
"default": "ok"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "HealthCheckResponse"
|
|
},
|
|
"HierarchicalChunkerOptions": {
|
|
"properties": {
|
|
"chunker": {
|
|
"type": "string",
|
|
"const": "hierarchical",
|
|
"title": "Chunker",
|
|
"default": "hierarchical"
|
|
},
|
|
"use_markdown_tables": {
|
|
"type": "boolean",
|
|
"title": "Use Markdown Tables",
|
|
"description": "Use markdown table format instead of triplets for table serialization.",
|
|
"default": false
|
|
},
|
|
"include_raw_text": {
|
|
"type": "boolean",
|
|
"title": "Include Raw Text",
|
|
"description": "Include both raw_text and text (contextualized) in response. If False, only text is included.",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "HierarchicalChunkerOptions",
|
|
"description": "Configuration options for the HierarchicalChunker."
|
|
},
|
|
"HierarchicalChunkerOptionsDocumentsRequest": {
|
|
"properties": {
|
|
"convert_options": {
|
|
"$ref": "#/components/schemas/ConvertDocumentsRequestOptions",
|
|
"description": "Conversion options.",
|
|
"default": {
|
|
"from_formats": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"to_formats": [
|
|
"md"
|
|
],
|
|
"image_export_mode": "embedded",
|
|
"do_ocr": true,
|
|
"force_ocr": false,
|
|
"ocr_engine": "easyocr",
|
|
"pdf_backend": "dlparse_v4",
|
|
"table_mode": "accurate",
|
|
"table_cell_matching": true,
|
|
"pipeline": "standard",
|
|
"page_range": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"document_timeout": 604800,
|
|
"abort_on_error": false,
|
|
"do_table_structure": true,
|
|
"include_images": true,
|
|
"images_scale": 2,
|
|
"md_page_break_placeholder": "",
|
|
"do_code_enrichment": false,
|
|
"do_formula_enrichment": false,
|
|
"do_picture_classification": false,
|
|
"do_picture_description": false,
|
|
"picture_description_area_threshold": 0.05
|
|
}
|
|
},
|
|
"sources": {
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/FileSourceRequest"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/HttpSourceRequest"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/S3SourceRequest"
|
|
}
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "kind",
|
|
"mapping": {
|
|
"file": "#/components/schemas/FileSourceRequest",
|
|
"http": "#/components/schemas/HttpSourceRequest",
|
|
"s3": "#/components/schemas/S3SourceRequest"
|
|
}
|
|
}
|
|
},
|
|
"type": "array",
|
|
"title": "Sources",
|
|
"description": "List of input document sources to process."
|
|
},
|
|
"include_converted_doc": {
|
|
"type": "boolean",
|
|
"title": "Include Converted Doc",
|
|
"description": "If true, the output will include both the chunks and the converted document.",
|
|
"default": false
|
|
},
|
|
"target": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/InBodyTarget"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ZipTarget"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/S3Target"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PutTarget"
|
|
}
|
|
],
|
|
"title": "Target",
|
|
"description": "Specification for the type of output target.",
|
|
"default": {
|
|
"kind": "inbody"
|
|
},
|
|
"discriminator": {
|
|
"propertyName": "kind",
|
|
"mapping": {
|
|
"inbody": "#/components/schemas/InBodyTarget",
|
|
"put": "#/components/schemas/PutTarget",
|
|
"s3": "#/components/schemas/S3Target",
|
|
"zip": "#/components/schemas/ZipTarget"
|
|
}
|
|
}
|
|
},
|
|
"chunking_options": {
|
|
"$ref": "#/components/schemas/HierarchicalChunkerOptions",
|
|
"description": "Options specific to the chunker."
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"sources"
|
|
],
|
|
"title": "HierarchicalChunkerOptionsDocumentsRequest"
|
|
},
|
|
"HttpSourceRequest": {
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri",
|
|
"title": "Url",
|
|
"description": "HTTP url to process",
|
|
"examples": [
|
|
"https://arxiv.org/pdf/2206.01062"
|
|
]
|
|
},
|
|
"headers": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "Headers",
|
|
"description": "Additional headers used to fetch the urls, e.g. authorization, agent, etc",
|
|
"default": {}
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "http",
|
|
"title": "Kind",
|
|
"default": "http"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"url"
|
|
],
|
|
"title": "HttpSourceRequest"
|
|
},
|
|
"HybridChunkerOptions": {
|
|
"properties": {
|
|
"chunker": {
|
|
"type": "string",
|
|
"const": "hybrid",
|
|
"title": "Chunker",
|
|
"default": "hybrid"
|
|
},
|
|
"use_markdown_tables": {
|
|
"type": "boolean",
|
|
"title": "Use Markdown Tables",
|
|
"description": "Use markdown table format instead of triplets for table serialization.",
|
|
"default": false
|
|
},
|
|
"include_raw_text": {
|
|
"type": "boolean",
|
|
"title": "Include Raw Text",
|
|
"description": "Include both raw_text and text (contextualized) in response. If False, only text is included.",
|
|
"default": false
|
|
},
|
|
"max_tokens": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Max Tokens",
|
|
"description": "Maximum number of tokens per chunk. When left to none, the value is automatically extracted from the tokenizer."
|
|
},
|
|
"tokenizer": {
|
|
"type": "string",
|
|
"title": "Tokenizer",
|
|
"description": "HuggingFace model name for custom tokenization. If not specified, uses 'sentence-transformers/all-MiniLM-L6-v2' as default.",
|
|
"default": "sentence-transformers/all-MiniLM-L6-v2",
|
|
"examples": [
|
|
"Qwen/Qwen3-Embedding-0.6B",
|
|
"sentence-transformers/all-MiniLM-L6-v2"
|
|
]
|
|
},
|
|
"merge_peers": {
|
|
"type": "boolean",
|
|
"title": "Merge Peers",
|
|
"description": "Merge undersized successive chunks with same headings.",
|
|
"default": true
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "HybridChunkerOptions",
|
|
"description": "Configuration options for the HybridChunker."
|
|
},
|
|
"HybridChunkerOptionsDocumentsRequest": {
|
|
"properties": {
|
|
"convert_options": {
|
|
"$ref": "#/components/schemas/ConvertDocumentsRequestOptions",
|
|
"description": "Conversion options.",
|
|
"default": {
|
|
"from_formats": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"to_formats": [
|
|
"md"
|
|
],
|
|
"image_export_mode": "embedded",
|
|
"do_ocr": true,
|
|
"force_ocr": false,
|
|
"ocr_engine": "easyocr",
|
|
"pdf_backend": "dlparse_v4",
|
|
"table_mode": "accurate",
|
|
"table_cell_matching": true,
|
|
"pipeline": "standard",
|
|
"page_range": [
|
|
1,
|
|
9223372036854776000
|
|
],
|
|
"document_timeout": 604800,
|
|
"abort_on_error": false,
|
|
"do_table_structure": true,
|
|
"include_images": true,
|
|
"images_scale": 2,
|
|
"md_page_break_placeholder": "",
|
|
"do_code_enrichment": false,
|
|
"do_formula_enrichment": false,
|
|
"do_picture_classification": false,
|
|
"do_picture_description": false,
|
|
"picture_description_area_threshold": 0.05
|
|
}
|
|
},
|
|
"sources": {
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/FileSourceRequest"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/HttpSourceRequest"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/S3SourceRequest"
|
|
}
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "kind",
|
|
"mapping": {
|
|
"file": "#/components/schemas/FileSourceRequest",
|
|
"http": "#/components/schemas/HttpSourceRequest",
|
|
"s3": "#/components/schemas/S3SourceRequest"
|
|
}
|
|
}
|
|
},
|
|
"type": "array",
|
|
"title": "Sources",
|
|
"description": "List of input document sources to process."
|
|
},
|
|
"include_converted_doc": {
|
|
"type": "boolean",
|
|
"title": "Include Converted Doc",
|
|
"description": "If true, the output will include both the chunks and the converted document.",
|
|
"default": false
|
|
},
|
|
"target": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/InBodyTarget"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ZipTarget"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/S3Target"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PutTarget"
|
|
}
|
|
],
|
|
"title": "Target",
|
|
"description": "Specification for the type of output target.",
|
|
"default": {
|
|
"kind": "inbody"
|
|
},
|
|
"discriminator": {
|
|
"propertyName": "kind",
|
|
"mapping": {
|
|
"inbody": "#/components/schemas/InBodyTarget",
|
|
"put": "#/components/schemas/PutTarget",
|
|
"s3": "#/components/schemas/S3Target",
|
|
"zip": "#/components/schemas/ZipTarget"
|
|
}
|
|
}
|
|
},
|
|
"chunking_options": {
|
|
"$ref": "#/components/schemas/HybridChunkerOptions",
|
|
"description": "Options specific to the chunker."
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"sources"
|
|
],
|
|
"title": "HybridChunkerOptionsDocumentsRequest"
|
|
},
|
|
"ImageRef": {
|
|
"properties": {
|
|
"mimetype": {
|
|
"type": "string",
|
|
"title": "Mimetype"
|
|
},
|
|
"dpi": {
|
|
"type": "integer",
|
|
"title": "Dpi"
|
|
},
|
|
"size": {
|
|
"$ref": "#/components/schemas/Size"
|
|
},
|
|
"uri": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "path"
|
|
}
|
|
],
|
|
"title": "Uri"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"mimetype",
|
|
"dpi",
|
|
"size",
|
|
"uri"
|
|
],
|
|
"title": "ImageRef",
|
|
"description": "ImageRef."
|
|
},
|
|
"ImageRefMode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"placeholder",
|
|
"embedded",
|
|
"referenced"
|
|
],
|
|
"title": "ImageRefMode",
|
|
"description": "ImageRefMode."
|
|
},
|
|
"InBodyTarget": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "inbody",
|
|
"title": "Kind",
|
|
"default": "inbody"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "InBodyTarget"
|
|
},
|
|
"InferenceFramework": {
|
|
"type": "string",
|
|
"enum": [
|
|
"mlx",
|
|
"transformers",
|
|
"vllm"
|
|
],
|
|
"title": "InferenceFramework"
|
|
},
|
|
"InlineGroup": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BaseMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name",
|
|
"default": "group"
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"const": "inline",
|
|
"title": "Label",
|
|
"default": "inline"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref"
|
|
],
|
|
"title": "InlineGroup",
|
|
"description": "InlineGroup."
|
|
},
|
|
"InputFormat": {
|
|
"type": "string",
|
|
"enum": [
|
|
"docx",
|
|
"pptx",
|
|
"html",
|
|
"image",
|
|
"pdf",
|
|
"asciidoc",
|
|
"md",
|
|
"csv",
|
|
"xlsx",
|
|
"xml_uspto",
|
|
"xml_jats",
|
|
"mets_gbs",
|
|
"json_docling",
|
|
"audio",
|
|
"vtt"
|
|
],
|
|
"title": "InputFormat",
|
|
"description": "A document format supported by document backend parsers."
|
|
},
|
|
"KeyValueItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/FloatingMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"const": "key_value_region",
|
|
"title": "Label",
|
|
"default": "key_value_region"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"captions": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Captions",
|
|
"default": []
|
|
},
|
|
"references": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "References",
|
|
"default": []
|
|
},
|
|
"footnotes": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Footnotes",
|
|
"default": []
|
|
},
|
|
"image": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ImageRef"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"graph": {
|
|
"$ref": "#/components/schemas/GraphData"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref",
|
|
"graph"
|
|
],
|
|
"title": "KeyValueItem",
|
|
"description": "KeyValueItem."
|
|
},
|
|
"ListGroup": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BaseMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "Name",
|
|
"default": "group"
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"const": "list",
|
|
"title": "Label",
|
|
"default": "list"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref"
|
|
],
|
|
"title": "ListGroup",
|
|
"description": "ListGroup."
|
|
},
|
|
"ListItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BaseMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"const": "list_item",
|
|
"title": "Label",
|
|
"default": "list_item"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"orig": {
|
|
"type": "string",
|
|
"title": "Orig"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"formatting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Formatting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"hyperlink": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "path"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Hyperlink"
|
|
},
|
|
"enumerated": {
|
|
"type": "boolean",
|
|
"title": "Enumerated",
|
|
"default": false
|
|
},
|
|
"marker": {
|
|
"type": "string",
|
|
"title": "Marker",
|
|
"default": "-"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref",
|
|
"orig",
|
|
"text"
|
|
],
|
|
"title": "ListItem",
|
|
"description": "SectionItem."
|
|
},
|
|
"MiscAnnotation": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "misc",
|
|
"title": "Kind",
|
|
"default": "misc"
|
|
},
|
|
"content": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "Content"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"content"
|
|
],
|
|
"title": "MiscAnnotation",
|
|
"description": "MiscAnnotation."
|
|
},
|
|
"MoleculeMetaField": {
|
|
"properties": {
|
|
"confidence": {
|
|
"type": "number",
|
|
"title": "Confidence",
|
|
"description": "The confidence of the prediction.",
|
|
"examples": [
|
|
0.9,
|
|
0.42
|
|
]
|
|
},
|
|
"created_by": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By",
|
|
"description": "The origin of the prediction.",
|
|
"examples": [
|
|
"ibm-granite/granite-docling-258M"
|
|
]
|
|
},
|
|
"smi": {
|
|
"type": "string",
|
|
"title": "Smi",
|
|
"description": "The SMILES representation of the molecule."
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"required": [
|
|
"smi"
|
|
],
|
|
"title": "MoleculeMetaField",
|
|
"description": "Molecule metadata field."
|
|
},
|
|
"OutputFormat": {
|
|
"type": "string",
|
|
"enum": [
|
|
"md",
|
|
"json",
|
|
"html",
|
|
"html_split_page",
|
|
"text",
|
|
"doctags"
|
|
],
|
|
"title": "OutputFormat"
|
|
},
|
|
"PageItem": {
|
|
"properties": {
|
|
"size": {
|
|
"$ref": "#/components/schemas/Size"
|
|
},
|
|
"image": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ImageRef"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"page_no": {
|
|
"type": "integer",
|
|
"title": "Page No"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"size",
|
|
"page_no"
|
|
],
|
|
"title": "PageItem",
|
|
"description": "PageItem."
|
|
},
|
|
"PdfBackend": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pypdfium2",
|
|
"dlparse_v1",
|
|
"dlparse_v2",
|
|
"dlparse_v4"
|
|
],
|
|
"title": "PdfBackend",
|
|
"description": "Enum of valid PDF backends."
|
|
},
|
|
"PictureBarChartData": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "bar_chart_data",
|
|
"title": "Kind",
|
|
"default": "bar_chart_data"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"title": "Title"
|
|
},
|
|
"x_axis_label": {
|
|
"type": "string",
|
|
"title": "X Axis Label"
|
|
},
|
|
"y_axis_label": {
|
|
"type": "string",
|
|
"title": "Y Axis Label"
|
|
},
|
|
"bars": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChartBar"
|
|
},
|
|
"type": "array",
|
|
"title": "Bars"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"title",
|
|
"x_axis_label",
|
|
"y_axis_label",
|
|
"bars"
|
|
],
|
|
"title": "PictureBarChartData",
|
|
"description": "Represents data of a bar chart.\n\nAttributes:\n kind (Literal[\"bar_chart_data\"]): The type of the chart.\n x_axis_label (str): The label for the x-axis.\n y_axis_label (str): The label for the y-axis.\n bars (List[ChartBar]): A list of bars in the chart."
|
|
},
|
|
"PictureClassificationClass": {
|
|
"properties": {
|
|
"class_name": {
|
|
"type": "string",
|
|
"title": "Class Name"
|
|
},
|
|
"confidence": {
|
|
"type": "number",
|
|
"title": "Confidence"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"class_name",
|
|
"confidence"
|
|
],
|
|
"title": "PictureClassificationClass",
|
|
"description": "PictureClassificationData."
|
|
},
|
|
"PictureClassificationData": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "classification",
|
|
"title": "Kind",
|
|
"default": "classification"
|
|
},
|
|
"provenance": {
|
|
"type": "string",
|
|
"title": "Provenance"
|
|
},
|
|
"predicted_classes": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PictureClassificationClass"
|
|
},
|
|
"type": "array",
|
|
"title": "Predicted Classes"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"provenance",
|
|
"predicted_classes"
|
|
],
|
|
"title": "PictureClassificationData",
|
|
"description": "PictureClassificationData."
|
|
},
|
|
"PictureClassificationMetaField": {
|
|
"properties": {
|
|
"predictions": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/PictureClassificationPrediction"
|
|
},
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"title": "Predictions"
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "PictureClassificationMetaField",
|
|
"description": "Picture classification metadata field."
|
|
},
|
|
"PictureClassificationPrediction": {
|
|
"properties": {
|
|
"confidence": {
|
|
"type": "number",
|
|
"title": "Confidence",
|
|
"description": "The confidence of the prediction.",
|
|
"examples": [
|
|
0.9,
|
|
0.42
|
|
]
|
|
},
|
|
"created_by": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By",
|
|
"description": "The origin of the prediction.",
|
|
"examples": [
|
|
"ibm-granite/granite-docling-258M"
|
|
]
|
|
},
|
|
"class_name": {
|
|
"type": "string",
|
|
"title": "Class Name"
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"required": [
|
|
"class_name"
|
|
],
|
|
"title": "PictureClassificationPrediction",
|
|
"description": "Picture classification instance."
|
|
},
|
|
"PictureDescriptionApi": {
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri",
|
|
"title": "Url",
|
|
"description": "Endpoint which accepts openai-api compatible requests.",
|
|
"examples": [
|
|
"http://localhost:8000/v1/chat/completions",
|
|
"http://localhost:1234/v1/chat/completions",
|
|
"http://localhost:11434/v1/chat/completions"
|
|
]
|
|
},
|
|
"headers": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object",
|
|
"title": "Headers",
|
|
"description": "Headers used for calling the API endpoint. For example, it could include authentication headers.",
|
|
"default": {}
|
|
},
|
|
"params": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "Params",
|
|
"description": "Model parameters.",
|
|
"default": {},
|
|
"examples": [
|
|
{
|
|
"max_completion_tokens": 200,
|
|
"model": "HuggingFaceTB/SmolVLM-256M-Instruct"
|
|
},
|
|
{
|
|
"max_completion_tokens": 200,
|
|
"model": "ibm-granite/granite-vision-3.3-2b"
|
|
},
|
|
{
|
|
"model": "granite3.2-vision:2b"
|
|
}
|
|
]
|
|
},
|
|
"timeout": {
|
|
"type": "number",
|
|
"title": "Timeout",
|
|
"description": "Timeout for the API request.",
|
|
"default": 20
|
|
},
|
|
"concurrency": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"title": "Concurrency",
|
|
"description": "Maximum number of concurrent requests to the API.",
|
|
"default": 1,
|
|
"examples": [
|
|
1
|
|
]
|
|
},
|
|
"prompt": {
|
|
"type": "string",
|
|
"title": "Prompt",
|
|
"description": "Prompt used when calling the vision-language model.",
|
|
"default": "Describe this image in a few sentences.",
|
|
"examples": [
|
|
"Describe this image in a few sentences.",
|
|
"This is a figures from a document. Provide a detailed description of it."
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"url"
|
|
],
|
|
"title": "PictureDescriptionApi"
|
|
},
|
|
"PictureDescriptionLocal": {
|
|
"properties": {
|
|
"repo_id": {
|
|
"type": "string",
|
|
"title": "Repo Id",
|
|
"description": "Repository id from the Hugging Face Hub.",
|
|
"examples": [
|
|
"HuggingFaceTB/SmolVLM-256M-Instruct",
|
|
"ibm-granite/granite-vision-3.3-2b"
|
|
]
|
|
},
|
|
"prompt": {
|
|
"type": "string",
|
|
"title": "Prompt",
|
|
"description": "Prompt used when calling the vision-language model.",
|
|
"default": "Describe this image in a few sentences.",
|
|
"examples": [
|
|
"Describe this image in a few sentences.",
|
|
"This is a figure from a document. Provide a detailed description of it."
|
|
]
|
|
},
|
|
"generation_config": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "Generation Config",
|
|
"description": "Config from https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.GenerationConfig",
|
|
"default": {
|
|
"max_new_tokens": 200,
|
|
"do_sample": false
|
|
},
|
|
"examples": [
|
|
{
|
|
"do_sample": false,
|
|
"max_new_tokens": 200
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"repo_id"
|
|
],
|
|
"title": "PictureDescriptionLocal"
|
|
},
|
|
"PictureItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PictureMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"enum": [
|
|
"picture",
|
|
"chart"
|
|
],
|
|
"title": "Label",
|
|
"default": "picture"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"captions": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Captions",
|
|
"default": []
|
|
},
|
|
"references": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "References",
|
|
"default": []
|
|
},
|
|
"footnotes": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Footnotes",
|
|
"default": []
|
|
},
|
|
"image": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ImageRef"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"annotations": {
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DescriptionAnnotation"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/MiscAnnotation"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PictureClassificationData"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PictureMoleculeData"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PictureTabularChartData"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PictureLineChartData"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PictureBarChartData"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PictureStackedBarChartData"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PicturePieChartData"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PictureScatterChartData"
|
|
}
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "kind",
|
|
"mapping": {
|
|
"bar_chart_data": "#/components/schemas/PictureBarChartData",
|
|
"classification": "#/components/schemas/PictureClassificationData",
|
|
"description": "#/components/schemas/DescriptionAnnotation",
|
|
"line_chart_data": "#/components/schemas/PictureLineChartData",
|
|
"misc": "#/components/schemas/MiscAnnotation",
|
|
"molecule_data": "#/components/schemas/PictureMoleculeData",
|
|
"pie_chart_data": "#/components/schemas/PicturePieChartData",
|
|
"scatter_chart_data": "#/components/schemas/PictureScatterChartData",
|
|
"stacked_bar_chart_data": "#/components/schemas/PictureStackedBarChartData",
|
|
"tabular_chart_data": "#/components/schemas/PictureTabularChartData"
|
|
}
|
|
}
|
|
},
|
|
"type": "array",
|
|
"title": "Annotations",
|
|
"default": [],
|
|
"deprecated": true
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref"
|
|
],
|
|
"title": "PictureItem",
|
|
"description": "PictureItem."
|
|
},
|
|
"PictureLineChartData": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "line_chart_data",
|
|
"title": "Kind",
|
|
"default": "line_chart_data"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"title": "Title"
|
|
},
|
|
"x_axis_label": {
|
|
"type": "string",
|
|
"title": "X Axis Label"
|
|
},
|
|
"y_axis_label": {
|
|
"type": "string",
|
|
"title": "Y Axis Label"
|
|
},
|
|
"lines": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChartLine"
|
|
},
|
|
"type": "array",
|
|
"title": "Lines"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"title",
|
|
"x_axis_label",
|
|
"y_axis_label",
|
|
"lines"
|
|
],
|
|
"title": "PictureLineChartData",
|
|
"description": "Represents data of a line chart.\n\nAttributes:\n kind (Literal[\"line_chart_data\"]): The type of the chart.\n x_axis_label (str): The label for the x-axis.\n y_axis_label (str): The label for the y-axis.\n lines (List[ChartLine]): A list of lines in the chart."
|
|
},
|
|
"PictureMeta": {
|
|
"properties": {
|
|
"summary": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SummaryMetaField"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DescriptionMetaField"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"classification": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PictureClassificationMetaField"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"molecule": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MoleculeMetaField"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"tabular_chart": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/TabularChartMetaField"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "PictureMeta",
|
|
"description": "Metadata model for pictures."
|
|
},
|
|
"PictureMoleculeData": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "molecule_data",
|
|
"title": "Kind",
|
|
"default": "molecule_data"
|
|
},
|
|
"smi": {
|
|
"type": "string",
|
|
"title": "Smi"
|
|
},
|
|
"confidence": {
|
|
"type": "number",
|
|
"title": "Confidence"
|
|
},
|
|
"class_name": {
|
|
"type": "string",
|
|
"title": "Class Name"
|
|
},
|
|
"segmentation": {
|
|
"items": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "number"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2
|
|
},
|
|
"type": "array",
|
|
"title": "Segmentation"
|
|
},
|
|
"provenance": {
|
|
"type": "string",
|
|
"title": "Provenance"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"smi",
|
|
"confidence",
|
|
"class_name",
|
|
"segmentation",
|
|
"provenance"
|
|
],
|
|
"title": "PictureMoleculeData",
|
|
"description": "PictureMoleculeData."
|
|
},
|
|
"PicturePieChartData": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "pie_chart_data",
|
|
"title": "Kind",
|
|
"default": "pie_chart_data"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"title": "Title"
|
|
},
|
|
"slices": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChartSlice"
|
|
},
|
|
"type": "array",
|
|
"title": "Slices"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"title",
|
|
"slices"
|
|
],
|
|
"title": "PicturePieChartData",
|
|
"description": "Represents data of a pie chart.\n\nAttributes:\n kind (Literal[\"pie_chart_data\"]): The type of the chart.\n slices (List[ChartSlice]): A list of slices in the pie chart."
|
|
},
|
|
"PictureScatterChartData": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "scatter_chart_data",
|
|
"title": "Kind",
|
|
"default": "scatter_chart_data"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"title": "Title"
|
|
},
|
|
"x_axis_label": {
|
|
"type": "string",
|
|
"title": "X Axis Label"
|
|
},
|
|
"y_axis_label": {
|
|
"type": "string",
|
|
"title": "Y Axis Label"
|
|
},
|
|
"points": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChartPoint"
|
|
},
|
|
"type": "array",
|
|
"title": "Points"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"title",
|
|
"x_axis_label",
|
|
"y_axis_label",
|
|
"points"
|
|
],
|
|
"title": "PictureScatterChartData",
|
|
"description": "Represents data of a scatter chart.\n\nAttributes:\n kind (Literal[\"scatter_chart_data\"]): The type of the chart.\n x_axis_label (str): The label for the x-axis.\n y_axis_label (str): The label for the y-axis.\n points (List[ChartPoint]): A list of points in the scatter chart."
|
|
},
|
|
"PictureStackedBarChartData": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "stacked_bar_chart_data",
|
|
"title": "Kind",
|
|
"default": "stacked_bar_chart_data"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"title": "Title"
|
|
},
|
|
"x_axis_label": {
|
|
"type": "string",
|
|
"title": "X Axis Label"
|
|
},
|
|
"y_axis_label": {
|
|
"type": "string",
|
|
"title": "Y Axis Label"
|
|
},
|
|
"stacked_bars": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChartStackedBar"
|
|
},
|
|
"type": "array",
|
|
"title": "Stacked Bars"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"title",
|
|
"x_axis_label",
|
|
"y_axis_label",
|
|
"stacked_bars"
|
|
],
|
|
"title": "PictureStackedBarChartData",
|
|
"description": "Represents data of a stacked bar chart.\n\nAttributes:\n kind (Literal[\"stacked_bar_chart_data\"]): The type of the chart.\n x_axis_label (str): The label for the x-axis.\n y_axis_label (str): The label for the y-axis.\n stacked_bars (List[ChartStackedBar]): A list of stacked bars in the chart."
|
|
},
|
|
"PictureTabularChartData": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "tabular_chart_data",
|
|
"title": "Kind",
|
|
"default": "tabular_chart_data"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"title": "Title"
|
|
},
|
|
"chart_data": {
|
|
"$ref": "#/components/schemas/TableData"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"title",
|
|
"chart_data"
|
|
],
|
|
"title": "PictureTabularChartData",
|
|
"description": "Base class for picture chart data.\n\nAttributes:\n title (str): The title of the chart.\n chart_data (TableData): Chart data in the table format."
|
|
},
|
|
"PresignedUrlConvertDocumentResponse": {
|
|
"properties": {
|
|
"processing_time": {
|
|
"type": "number",
|
|
"title": "Processing Time"
|
|
},
|
|
"num_converted": {
|
|
"type": "integer",
|
|
"title": "Num Converted"
|
|
},
|
|
"num_succeeded": {
|
|
"type": "integer",
|
|
"title": "Num Succeeded"
|
|
},
|
|
"num_failed": {
|
|
"type": "integer",
|
|
"title": "Num Failed"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"processing_time",
|
|
"num_converted",
|
|
"num_succeeded",
|
|
"num_failed"
|
|
],
|
|
"title": "PresignedUrlConvertDocumentResponse"
|
|
},
|
|
"ProcessingPipeline": {
|
|
"type": "string",
|
|
"enum": [
|
|
"legacy",
|
|
"standard",
|
|
"vlm",
|
|
"asr"
|
|
],
|
|
"title": "ProcessingPipeline"
|
|
},
|
|
"ProfilingItem": {
|
|
"properties": {
|
|
"scope": {
|
|
"$ref": "#/components/schemas/ProfilingScope"
|
|
},
|
|
"count": {
|
|
"type": "integer",
|
|
"title": "Count",
|
|
"default": 0
|
|
},
|
|
"times": {
|
|
"items": {
|
|
"type": "number"
|
|
},
|
|
"type": "array",
|
|
"title": "Times",
|
|
"default": []
|
|
},
|
|
"start_timestamps": {
|
|
"items": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"type": "array",
|
|
"title": "Start Timestamps",
|
|
"default": []
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"scope"
|
|
],
|
|
"title": "ProfilingItem"
|
|
},
|
|
"ProfilingScope": {
|
|
"type": "string",
|
|
"enum": [
|
|
"page",
|
|
"document"
|
|
],
|
|
"title": "ProfilingScope"
|
|
},
|
|
"ProvenanceItem": {
|
|
"properties": {
|
|
"page_no": {
|
|
"type": "integer",
|
|
"title": "Page No"
|
|
},
|
|
"bbox": {
|
|
"$ref": "#/components/schemas/BoundingBox"
|
|
},
|
|
"charspan": {
|
|
"prefixItems": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"type": "array",
|
|
"maxItems": 2,
|
|
"minItems": 2,
|
|
"title": "Charspan"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"page_no",
|
|
"bbox",
|
|
"charspan"
|
|
],
|
|
"title": "ProvenanceItem",
|
|
"description": "ProvenanceItem."
|
|
},
|
|
"PutTarget": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "put",
|
|
"title": "Kind",
|
|
"default": "put"
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri",
|
|
"title": "Url"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"url"
|
|
],
|
|
"title": "PutTarget"
|
|
},
|
|
"RefItem": {
|
|
"properties": {
|
|
"$ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "$Ref"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"$ref"
|
|
],
|
|
"title": "RefItem",
|
|
"description": "RefItem."
|
|
},
|
|
"ResponseFormat": {
|
|
"type": "string",
|
|
"enum": [
|
|
"doctags",
|
|
"markdown",
|
|
"html",
|
|
"otsl",
|
|
"plaintext"
|
|
],
|
|
"title": "ResponseFormat"
|
|
},
|
|
"RichTableCell": {
|
|
"properties": {
|
|
"bbox": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BoundingBox"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"row_span": {
|
|
"type": "integer",
|
|
"title": "Row Span",
|
|
"default": 1
|
|
},
|
|
"col_span": {
|
|
"type": "integer",
|
|
"title": "Col Span",
|
|
"default": 1
|
|
},
|
|
"start_row_offset_idx": {
|
|
"type": "integer",
|
|
"title": "Start Row Offset Idx"
|
|
},
|
|
"end_row_offset_idx": {
|
|
"type": "integer",
|
|
"title": "End Row Offset Idx"
|
|
},
|
|
"start_col_offset_idx": {
|
|
"type": "integer",
|
|
"title": "Start Col Offset Idx"
|
|
},
|
|
"end_col_offset_idx": {
|
|
"type": "integer",
|
|
"title": "End Col Offset Idx"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"column_header": {
|
|
"type": "boolean",
|
|
"title": "Column Header",
|
|
"default": false
|
|
},
|
|
"row_header": {
|
|
"type": "boolean",
|
|
"title": "Row Header",
|
|
"default": false
|
|
},
|
|
"row_section": {
|
|
"type": "boolean",
|
|
"title": "Row Section",
|
|
"default": false
|
|
},
|
|
"fillable": {
|
|
"type": "boolean",
|
|
"title": "Fillable",
|
|
"default": false
|
|
},
|
|
"ref": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"start_row_offset_idx",
|
|
"end_row_offset_idx",
|
|
"start_col_offset_idx",
|
|
"end_col_offset_idx",
|
|
"text",
|
|
"ref"
|
|
],
|
|
"title": "RichTableCell",
|
|
"description": "RichTableCell."
|
|
},
|
|
"S3SourceRequest": {
|
|
"properties": {
|
|
"endpoint": {
|
|
"type": "string",
|
|
"title": "Endpoint",
|
|
"description": "S3 service endpoint, without protocol. Required.",
|
|
"examples": [
|
|
"s3.eu-de.cloud-object-storage.appdomain.cloud",
|
|
"s3.us-east-2.amazonaws.com "
|
|
]
|
|
},
|
|
"verify_ssl": {
|
|
"type": "boolean",
|
|
"title": "Verify Ssl",
|
|
"description": "If enabled, SSL will be used to connect to s3. Boolean. Optional, defaults to true",
|
|
"default": true
|
|
},
|
|
"access_key": {
|
|
"type": "string",
|
|
"format": "password",
|
|
"title": "Access Key",
|
|
"description": "S3 access key. Required.",
|
|
"writeOnly": true
|
|
},
|
|
"secret_key": {
|
|
"type": "string",
|
|
"format": "password",
|
|
"title": "Secret Key",
|
|
"description": "S3 secret key. Required.",
|
|
"writeOnly": true
|
|
},
|
|
"bucket": {
|
|
"type": "string",
|
|
"title": "Bucket",
|
|
"description": "S3 bucket name. Required."
|
|
},
|
|
"key_prefix": {
|
|
"type": "string",
|
|
"title": "Key Prefix",
|
|
"description": "Prefix for the object keys on s3. Optional, defaults to empty.",
|
|
"default": ""
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "s3",
|
|
"title": "Kind",
|
|
"default": "s3"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"endpoint",
|
|
"access_key",
|
|
"secret_key",
|
|
"bucket"
|
|
],
|
|
"title": "S3SourceRequest"
|
|
},
|
|
"S3Target": {
|
|
"properties": {
|
|
"endpoint": {
|
|
"type": "string",
|
|
"title": "Endpoint",
|
|
"description": "S3 service endpoint, without protocol. Required.",
|
|
"examples": [
|
|
"s3.eu-de.cloud-object-storage.appdomain.cloud",
|
|
"s3.us-east-2.amazonaws.com "
|
|
]
|
|
},
|
|
"verify_ssl": {
|
|
"type": "boolean",
|
|
"title": "Verify Ssl",
|
|
"description": "If enabled, SSL will be used to connect to s3. Boolean. Optional, defaults to true",
|
|
"default": true
|
|
},
|
|
"access_key": {
|
|
"type": "string",
|
|
"format": "password",
|
|
"title": "Access Key",
|
|
"description": "S3 access key. Required.",
|
|
"writeOnly": true
|
|
},
|
|
"secret_key": {
|
|
"type": "string",
|
|
"format": "password",
|
|
"title": "Secret Key",
|
|
"description": "S3 secret key. Required.",
|
|
"writeOnly": true
|
|
},
|
|
"bucket": {
|
|
"type": "string",
|
|
"title": "Bucket",
|
|
"description": "S3 bucket name. Required."
|
|
},
|
|
"key_prefix": {
|
|
"type": "string",
|
|
"title": "Key Prefix",
|
|
"description": "Prefix for the object keys on s3. Optional, defaults to empty.",
|
|
"default": ""
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "s3",
|
|
"title": "Kind",
|
|
"default": "s3"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"endpoint",
|
|
"access_key",
|
|
"secret_key",
|
|
"bucket"
|
|
],
|
|
"title": "S3Target"
|
|
},
|
|
"Script": {
|
|
"type": "string",
|
|
"enum": [
|
|
"baseline",
|
|
"sub",
|
|
"super"
|
|
],
|
|
"title": "Script",
|
|
"description": "Text script position."
|
|
},
|
|
"SectionHeaderItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BaseMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"const": "section_header",
|
|
"title": "Label",
|
|
"default": "section_header"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"orig": {
|
|
"type": "string",
|
|
"title": "Orig"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"formatting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Formatting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"hyperlink": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "path"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Hyperlink"
|
|
},
|
|
"level": {
|
|
"type": "integer",
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Level",
|
|
"default": 1
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref",
|
|
"orig",
|
|
"text"
|
|
],
|
|
"title": "SectionHeaderItem",
|
|
"description": "SectionItem."
|
|
},
|
|
"Size": {
|
|
"properties": {
|
|
"width": {
|
|
"type": "number",
|
|
"title": "Width"
|
|
},
|
|
"height": {
|
|
"type": "number",
|
|
"title": "Height"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "Size",
|
|
"description": "Size."
|
|
},
|
|
"SummaryMetaField": {
|
|
"properties": {
|
|
"confidence": {
|
|
"type": "number",
|
|
"title": "Confidence",
|
|
"description": "The confidence of the prediction.",
|
|
"examples": [
|
|
0.9,
|
|
0.42
|
|
]
|
|
},
|
|
"created_by": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By",
|
|
"description": "The origin of the prediction.",
|
|
"examples": [
|
|
"ibm-granite/granite-docling-258M"
|
|
]
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"required": [
|
|
"text"
|
|
],
|
|
"title": "SummaryMetaField",
|
|
"description": "Summary data."
|
|
},
|
|
"TableCell": {
|
|
"properties": {
|
|
"bbox": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BoundingBox"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"row_span": {
|
|
"type": "integer",
|
|
"title": "Row Span",
|
|
"default": 1
|
|
},
|
|
"col_span": {
|
|
"type": "integer",
|
|
"title": "Col Span",
|
|
"default": 1
|
|
},
|
|
"start_row_offset_idx": {
|
|
"type": "integer",
|
|
"title": "Start Row Offset Idx"
|
|
},
|
|
"end_row_offset_idx": {
|
|
"type": "integer",
|
|
"title": "End Row Offset Idx"
|
|
},
|
|
"start_col_offset_idx": {
|
|
"type": "integer",
|
|
"title": "Start Col Offset Idx"
|
|
},
|
|
"end_col_offset_idx": {
|
|
"type": "integer",
|
|
"title": "End Col Offset Idx"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"column_header": {
|
|
"type": "boolean",
|
|
"title": "Column Header",
|
|
"default": false
|
|
},
|
|
"row_header": {
|
|
"type": "boolean",
|
|
"title": "Row Header",
|
|
"default": false
|
|
},
|
|
"row_section": {
|
|
"type": "boolean",
|
|
"title": "Row Section",
|
|
"default": false
|
|
},
|
|
"fillable": {
|
|
"type": "boolean",
|
|
"title": "Fillable",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"start_row_offset_idx",
|
|
"end_row_offset_idx",
|
|
"start_col_offset_idx",
|
|
"end_col_offset_idx",
|
|
"text"
|
|
],
|
|
"title": "TableCell",
|
|
"description": "TableCell."
|
|
},
|
|
"TableData": {
|
|
"properties": {
|
|
"table_cells": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RichTableCell"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/TableCell"
|
|
}
|
|
]
|
|
},
|
|
"type": "array",
|
|
"title": "Table Cells",
|
|
"default": []
|
|
},
|
|
"num_rows": {
|
|
"type": "integer",
|
|
"title": "Num Rows",
|
|
"default": 0
|
|
},
|
|
"num_cols": {
|
|
"type": "integer",
|
|
"title": "Num Cols",
|
|
"default": 0
|
|
},
|
|
"grid": {
|
|
"items": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/TableCell"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"type": "array",
|
|
"title": "Grid",
|
|
"description": "grid.",
|
|
"readOnly": true
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"grid"
|
|
],
|
|
"title": "TableData",
|
|
"description": "BaseTableData."
|
|
},
|
|
"TableFormerMode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"fast",
|
|
"accurate"
|
|
],
|
|
"title": "TableFormerMode",
|
|
"description": "Modes for the TableFormer model."
|
|
},
|
|
"TableItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/FloatingMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"enum": [
|
|
"document_index",
|
|
"table"
|
|
],
|
|
"title": "Label",
|
|
"default": "table"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"captions": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Captions",
|
|
"default": []
|
|
},
|
|
"references": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "References",
|
|
"default": []
|
|
},
|
|
"footnotes": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Footnotes",
|
|
"default": []
|
|
},
|
|
"image": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ImageRef"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/TableData"
|
|
},
|
|
"annotations": {
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DescriptionAnnotation"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/MiscAnnotation"
|
|
}
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "kind",
|
|
"mapping": {
|
|
"description": "#/components/schemas/DescriptionAnnotation",
|
|
"misc": "#/components/schemas/MiscAnnotation"
|
|
}
|
|
}
|
|
},
|
|
"type": "array",
|
|
"title": "Annotations",
|
|
"default": [],
|
|
"deprecated": true
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref",
|
|
"data"
|
|
],
|
|
"title": "TableItem",
|
|
"description": "TableItem."
|
|
},
|
|
"TabularChartMetaField": {
|
|
"properties": {
|
|
"confidence": {
|
|
"type": "number",
|
|
"title": "Confidence",
|
|
"description": "The confidence of the prediction.",
|
|
"examples": [
|
|
0.9,
|
|
0.42
|
|
]
|
|
},
|
|
"created_by": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Created By",
|
|
"description": "The origin of the prediction.",
|
|
"examples": [
|
|
"ibm-granite/granite-docling-258M"
|
|
]
|
|
},
|
|
"title": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Title"
|
|
},
|
|
"chart_data": {
|
|
"$ref": "#/components/schemas/TableData"
|
|
}
|
|
},
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"required": [
|
|
"chart_data"
|
|
],
|
|
"title": "TabularChartMetaField",
|
|
"description": "Tabular chart metadata field."
|
|
},
|
|
"TargetName": {
|
|
"type": "string",
|
|
"enum": [
|
|
"inbody",
|
|
"zip"
|
|
],
|
|
"title": "TargetName"
|
|
},
|
|
"TaskProcessingMeta": {
|
|
"properties": {
|
|
"num_docs": {
|
|
"type": "integer",
|
|
"title": "Num Docs"
|
|
},
|
|
"num_processed": {
|
|
"type": "integer",
|
|
"title": "Num Processed",
|
|
"default": 0
|
|
},
|
|
"num_succeeded": {
|
|
"type": "integer",
|
|
"title": "Num Succeeded",
|
|
"default": 0
|
|
},
|
|
"num_failed": {
|
|
"type": "integer",
|
|
"title": "Num Failed",
|
|
"default": 0
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"num_docs"
|
|
],
|
|
"title": "TaskProcessingMeta"
|
|
},
|
|
"TaskStatusResponse": {
|
|
"properties": {
|
|
"task_id": {
|
|
"type": "string",
|
|
"title": "Task Id"
|
|
},
|
|
"task_type": {
|
|
"$ref": "#/components/schemas/TaskType"
|
|
},
|
|
"task_status": {
|
|
"type": "string",
|
|
"title": "Task Status"
|
|
},
|
|
"task_position": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Task Position"
|
|
},
|
|
"task_meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/TaskProcessingMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"task_id",
|
|
"task_type",
|
|
"task_status"
|
|
],
|
|
"title": "TaskStatusResponse"
|
|
},
|
|
"TaskType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"convert",
|
|
"chunk"
|
|
],
|
|
"title": "TaskType"
|
|
},
|
|
"TextItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BaseMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"enum": [
|
|
"caption",
|
|
"checkbox_selected",
|
|
"checkbox_unselected",
|
|
"footnote",
|
|
"page_footer",
|
|
"page_header",
|
|
"paragraph",
|
|
"reference",
|
|
"text",
|
|
"empty_value"
|
|
],
|
|
"title": "Label"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"orig": {
|
|
"type": "string",
|
|
"title": "Orig"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"formatting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Formatting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"hyperlink": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "path"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Hyperlink"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref",
|
|
"label",
|
|
"orig",
|
|
"text"
|
|
],
|
|
"title": "TextItem",
|
|
"description": "TextItem."
|
|
},
|
|
"TitleItem": {
|
|
"properties": {
|
|
"self_ref": {
|
|
"type": "string",
|
|
"pattern": "^#(?:/([\\w-]+)(?:/(\\d+))?)?$",
|
|
"title": "Self Ref"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"children": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/RefItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Children",
|
|
"default": []
|
|
},
|
|
"content_layer": {
|
|
"$ref": "#/components/schemas/ContentLayer",
|
|
"default": "body"
|
|
},
|
|
"meta": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BaseMeta"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"const": "title",
|
|
"title": "Label",
|
|
"default": "title"
|
|
},
|
|
"prov": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ProvenanceItem"
|
|
},
|
|
"type": "array",
|
|
"title": "Prov",
|
|
"default": []
|
|
},
|
|
"orig": {
|
|
"type": "string",
|
|
"title": "Orig"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"title": "Text"
|
|
},
|
|
"formatting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Formatting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"hyperlink": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "path"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Hyperlink"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"self_ref",
|
|
"orig",
|
|
"text"
|
|
],
|
|
"title": "TitleItem",
|
|
"description": "TitleItem."
|
|
},
|
|
"TransformersModelType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"automodel",
|
|
"automodel-vision2seq",
|
|
"automodel-causallm",
|
|
"automodel-imagetexttotext"
|
|
],
|
|
"title": "TransformersModelType"
|
|
},
|
|
"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"
|
|
},
|
|
"VlmModelApi": {
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"format": "uri",
|
|
"title": "Url",
|
|
"description": "Endpoint which accepts openai-api compatible requests.",
|
|
"examples": [
|
|
"http://localhost:8000/v1/chat/completions",
|
|
"http://localhost:1234/v1/chat/completions"
|
|
]
|
|
},
|
|
"headers": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object",
|
|
"title": "Headers",
|
|
"description": "Headers used for calling the API endpoint. For example, it could include authentication headers.",
|
|
"default": {}
|
|
},
|
|
"params": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "Params",
|
|
"description": "Model parameters.",
|
|
"default": {},
|
|
"examples": [
|
|
{
|
|
"max_completion_tokens": 800,
|
|
"model": "ibm-granite/granite-docling-258M"
|
|
},
|
|
{
|
|
"max_completion_tokens": 800,
|
|
"model": "ibm-granite/granite-vision-3.3-2b"
|
|
}
|
|
]
|
|
},
|
|
"timeout": {
|
|
"type": "number",
|
|
"title": "Timeout",
|
|
"description": "Timeout for the API request.",
|
|
"default": 60
|
|
},
|
|
"concurrency": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"title": "Concurrency",
|
|
"description": "Maximum number of concurrent requests to the API.",
|
|
"default": 1,
|
|
"examples": [
|
|
1
|
|
]
|
|
},
|
|
"prompt": {
|
|
"type": "string",
|
|
"title": "Prompt",
|
|
"description": "Prompt used when calling the vision-language model.",
|
|
"default": "Convert this page to docling.",
|
|
"examples": [
|
|
"Convert this page to docling.",
|
|
"Convert this page to markdown. Do not miss any text and only output the bare markdown!"
|
|
]
|
|
},
|
|
"scale": {
|
|
"type": "number",
|
|
"title": "Scale",
|
|
"description": "Scale factor of the images used.",
|
|
"default": 2
|
|
},
|
|
"response_format": {
|
|
"$ref": "#/components/schemas/ResponseFormat",
|
|
"description": "Type of response generated by the model."
|
|
},
|
|
"temperature": {
|
|
"type": "number",
|
|
"title": "Temperature",
|
|
"description": "Temperature parameter controlling the reproducibility of the result.",
|
|
"default": 0,
|
|
"examples": [
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"url",
|
|
"response_format"
|
|
],
|
|
"title": "VlmModelApi"
|
|
},
|
|
"VlmModelLocal": {
|
|
"properties": {
|
|
"repo_id": {
|
|
"type": "string",
|
|
"title": "Repo Id",
|
|
"description": "Repository id from the Hugging Face Hub."
|
|
},
|
|
"prompt": {
|
|
"type": "string",
|
|
"title": "Prompt",
|
|
"description": "Prompt used when calling the vision-language model.",
|
|
"default": "Convert this page to docling.",
|
|
"examples": [
|
|
"Convert this page to docling.",
|
|
"Convert this page to markdown. Do not miss any text and only output the bare markdown!"
|
|
]
|
|
},
|
|
"scale": {
|
|
"type": "number",
|
|
"title": "Scale",
|
|
"description": "Scale factor of the images used.",
|
|
"default": 2
|
|
},
|
|
"response_format": {
|
|
"$ref": "#/components/schemas/ResponseFormat",
|
|
"description": "Type of response generated by the model."
|
|
},
|
|
"inference_framework": {
|
|
"$ref": "#/components/schemas/InferenceFramework",
|
|
"description": "Inference framework to use."
|
|
},
|
|
"transformers_model_type": {
|
|
"$ref": "#/components/schemas/TransformersModelType",
|
|
"description": "Type of transformers auto-model to use.",
|
|
"default": "automodel"
|
|
},
|
|
"extra_generation_config": {
|
|
"additionalProperties": true,
|
|
"type": "object",
|
|
"title": "Extra Generation Config",
|
|
"description": "Config from https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.GenerationConfig",
|
|
"default": {
|
|
"max_new_tokens": 800,
|
|
"do_sample": false
|
|
},
|
|
"examples": [
|
|
{
|
|
"do_sample": false,
|
|
"max_new_tokens": 800
|
|
}
|
|
]
|
|
},
|
|
"temperature": {
|
|
"type": "number",
|
|
"title": "Temperature",
|
|
"description": "Temperature parameter controlling the reproducibility of the result.",
|
|
"default": 0,
|
|
"examples": [
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"repo_id",
|
|
"response_format",
|
|
"inference_framework"
|
|
],
|
|
"title": "VlmModelLocal"
|
|
},
|
|
"VlmModelType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"smoldocling",
|
|
"smoldocling_vllm",
|
|
"granite_vision",
|
|
"granite_vision_vllm",
|
|
"granite_vision_ollama",
|
|
"got_ocr_2",
|
|
"granite_docling",
|
|
"granite_docling_vllm"
|
|
],
|
|
"title": "VlmModelType"
|
|
},
|
|
"ZipTarget": {
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"const": "zip",
|
|
"title": "Kind",
|
|
"default": "zip"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "ZipTarget"
|
|
},
|
|
"ocr_engines_enum": {
|
|
"type": "string",
|
|
"enum": [
|
|
"auto",
|
|
"easyocr",
|
|
"ocrmac",
|
|
"rapidocr",
|
|
"tesserocr",
|
|
"tesseract"
|
|
],
|
|
"title": "ocr_engines_enum"
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"APIKeyAuth": {
|
|
"type": "apiKey",
|
|
"in": "header",
|
|
"name": "X-Api-Key"
|
|
}
|
|
}
|
|
}
|
|
} |