{"openapi":"3.1.0","info":{"title":"Flexbone OCR API","description":"Extract text from JPEG, PNG, and GIF images without retaining uploads or results.","version":"1.0.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/extract-text":{"post":{"summary":"Extract Text","operationId":"extract_text_extract_text_post","parameters":[{"name":"metadata","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Metadata"}},{"name":"normalize","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Normalize"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_text_extract_text_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unsupported Media Type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Gateway Timeout"}}}},"/extract-text/batch":{"post":{"summary":"Extract Text Batch","operationId":"extract_text_batch_extract_text_batch_post","parameters":[{"name":"metadata","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Metadata"}},{"name":"normalize","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Normalize"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_text_batch_extract_text_batch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Request Entity Too Large"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BatchErrorItem":{"properties":{"success":{"type":"boolean","title":"Success","default":false},"error":{"$ref":"#/components/schemas/ErrorDetail"},"processing_time_ms":{"type":"integer","minimum":0.0,"title":"Processing Time Ms"},"index":{"type":"integer","minimum":0.0,"title":"Index"},"status_code":{"type":"integer","maximum":599.0,"minimum":400.0,"title":"Status Code"}},"type":"object","required":["error","processing_time_ms","index","status_code"],"title":"BatchErrorItem"},"BatchResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"results":{"items":{"anyOf":[{"$ref":"#/components/schemas/BatchSuccessItem"},{"$ref":"#/components/schemas/BatchErrorItem"}]},"type":"array","title":"Results"},"processing_time_ms":{"type":"integer","minimum":0.0,"title":"Processing Time Ms"}},"type":"object","required":["results","processing_time_ms"],"title":"BatchResponse"},"BatchSuccessItem":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"text":{"type":"string","title":"Text"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"processing_time_ms":{"type":"integer","minimum":0.0,"title":"Processing Time Ms"},"normalized_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized Text"},"metadata":{"anyOf":[{"$ref":"#/components/schemas/ImageMetadata"},{"type":"null"}]},"index":{"type":"integer","minimum":0.0,"title":"Index"},"status_code":{"type":"integer","title":"Status Code","default":200}},"type":"object","required":["text","confidence","processing_time_ms","index"],"title":"BatchSuccessItem"},"Body_extract_text_batch_extract_text_batch_post":{"properties":{"images":{"items":{"type":"string","format":"binary"},"type":"array","title":"Images","description":"One to five images, up to 10 MiB each"}},"type":"object","required":["images"],"title":"Body_extract_text_batch_extract_text_batch_post"},"Body_extract_text_extract_text_post":{"properties":{"image":{"type":"string","format":"binary","title":"Image","description":"JPEG, PNG, or GIF image, up to 10 MiB"}},"type":"object","required":["image"],"title":"Body_extract_text_extract_text_post"},"ErrorDetail":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorDetail"},"ErrorResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":false},"error":{"$ref":"#/components/schemas/ErrorDetail"},"processing_time_ms":{"type":"integer","minimum":0.0,"title":"Processing Time Ms"}},"type":"object","required":["error","processing_time_ms"],"title":"ErrorResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"}},"type":"object","title":"HealthResponse"},"ImageMetadata":{"properties":{"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"byte_size":{"type":"integer","title":"Byte Size"},"color_mode":{"type":"string","title":"Color Mode"},"format":{"type":"string","title":"Format"}},"type":"object","required":["width","height","byte_size","color_mode","format"],"title":"ImageMetadata"},"SuccessResponse":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"text":{"type":"string","title":"Text"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"processing_time_ms":{"type":"integer","minimum":0.0,"title":"Processing Time Ms"},"normalized_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized Text"},"metadata":{"anyOf":[{"$ref":"#/components/schemas/ImageMetadata"},{"type":"null"}]}},"type":"object","required":["text","confidence","processing_time_ms"],"title":"SuccessResponse"},"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"}}}}