remove_background
Remove Background
Remove the background from an image.
Uses Brainiall Cutout engine segmentation to precisely separate foreground from background.
Returns a base64-encoded image with transparent background (PNG) or white
background (WebP). Sub-500ms latency on GPU.
Args:
image_base64: Base64-encoded image data (PNG, JPEG, or WebP).
output_format: Output format -- 'png' (with transparency) or 'webp'.
Returns:
dict with keys:
- image_base64 (str): Base64-encoded result image
- format (str): Output image format
- original_size (dict): Original width and height
- processing_ms (int): Processing time in milliseconds
輸入參數image_base64必填output_format
upscale_image
Upscale Image
Upscale image resolution with the Brainiall image-upscaling engine.
Enhances image resolution by 2x or 4x with the GPU-accelerated Brainiall image-upscaling engine
super-resolution. Processes in tiles (256x256) to manage VRAM.
Maximum output dimension: 8192x8192.
Args:
image_base64: Base64-encoded image data (PNG, JPEG, or WebP).
scale: Upscale factor -- 2 or 4 (default: 4).
Returns:
dict with keys:
- image (str): Base64-encoded upscaled image
- format (str): Output image format
- width (int): Output width
- height (int): Output height
- scale (int): Scale factor applied
- processing_time_ms (float): Processing time in milliseconds
輸入參數scaleimage_base64必填
Restore and enhance faces in an image with the Brainiall face-restoration engine.
Detects all faces via RetinaFace, restores quality (fixes blur, noise,
compression artifacts), and pastes them back. Optionally enhances the
background with the Brainiall image-upscaling engine. GPU-accelerated, sub-3s latency.
Args:
image_base64: Base64-encoded image data containing faces (PNG, JPEG, WebP).
upscale: Output upscale factor -- 1 to 4 (default: 2).
enhance_background: Whether to enhance background with the Brainiall image-upscaling engine (default: true).
Returns:
dict with keys:
- image (str): Base64-encoded restored image
- format (str): Output image format
- width (int): Output width
- height (int): Output height
- upscale (int): Scale factor applied
- processing_time_ms (float): Processing time in milliseconds
輸入參數upscaleimage_base64必填enhance_background
check_image_service
Check Image Service
Check health status of Image API services and loaded models.
Returns:
dict with keys:
- status (str): 'healthy' or error state
- models (dict): Loaded model status per capability
- version (str): API version
無需輸入參數。
document_query
Ask Question About Document
Ask a natural-language question about a document image; returns a grounded answer plus the supporting line.
Returns found:false rather than guessing when the document doesn't contain the answer.
Returns:
dict with keys: answer (str|null), found (bool), supporting_text (str|null), text (str).
輸入參數image必填question必填
document_tables
Extract Tables From Document
Reconstruct every table in a document image into headers and rows.
Returns:
dict with keys: table_count (int), tables (list of {title, headers, rows, row_count, column_count}); [] if there are no tables.
輸入參數image必填
document_to_markdown
Document to Markdown (Layout)
Return the document as structured Markdown (headings, tables, lists, code blocks, math).
Brainiall Doc Layout engine. The single API for converting documents to LLM-friendly format.
輸入參數pdf必填page_range
run_skillsets
Skillsets Enrichment Pipeline
Run a multi-skill enrichment pipeline over a document image or text in one call.
Brainiall Skillsets engine. Returns per-skill outputs ready for indexing or RAG.
輸入參數textimageskills
understand_content
Multimodal Content Understanding
Multimodal extraction. Send an image, text, or both; define your schema of fields; get structured JSON.
Brainiall Content Understanding engine. Unified multimodal field extraction over images and text.
輸入參數textimagefield_schema