KosmoKrator

data

Mindee CLI for AI Agents

Use the Mindee CLI from KosmoKrator to call Mindee tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Mindee CLI Setup

Mindee can be configured headlessly with `kosmokrator integrations:configure mindee`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure mindee --enable --read allow --write ask --json
kosmokrator integrations:doctor mindee --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call mindee.mindee_predict_document '{"account":"example_account","api_name":"example_api_name","api_version":"example_api_version","document":"example_document","file_name":"example_file_name","options":"example_options"}' --json
Provider shortcut
kosmo integrations:mindee mindee_predict_document '{"account":"example_account","api_name":"example_api_name","api_version":"example_api_version","document":"example_document","file_name":"example_file_name","options":"example_options"}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs mindee --json
kosmo integrations:docs mindee.mindee_predict_document --json
kosmo integrations:schema mindee.mindee_predict_document --json
kosmo integrations:search "Mindee" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

mindee.mindee_predict_document

Parse a document synchronously with any Mindee product endpoint using account, api_name, and api_version.

Write write
Parameters
account, api_name, api_version, document, file_name, options
Generic call
kosmo integrations:call mindee.mindee_predict_document '{"account":"example_account","api_name":"example_api_name","api_version":"example_api_version","document":"example_document","file_name":"example_file_name","options":"example_options"}' --json
Shortcut
kosmo integrations:mindee mindee_predict_document '{"account":"example_account","api_name":"example_api_name","api_version":"example_api_version","document":"example_document","file_name":"example_file_name","options":"example_options"}' --json

mindee.mindee_predict_document_async

Send a document to a Mindee asynchronous prediction endpoint and return the queued job response.

Write write
Parameters
account, api_name, api_version, document, file_name, options
Generic call
kosmo integrations:call mindee.mindee_predict_document_async '{"account":"example_account","api_name":"example_api_name","api_version":"example_api_version","document":"example_document","file_name":"example_file_name","options":"example_options"}' --json
Shortcut
kosmo integrations:mindee mindee_predict_document_async '{"account":"example_account","api_name":"example_api_name","api_version":"example_api_version","document":"example_document","file_name":"example_file_name","options":"example_options"}' --json

mindee.mindee_get_async_prediction

Retrieve a Mindee asynchronous prediction job status, or the completed document redirect when the job has finished.

Read read
Parameters
account, api_name, api_version, job_id
Generic call
kosmo integrations:call mindee.mindee_get_async_prediction '{"account":"example_account","api_name":"example_api_name","api_version":"example_api_version","job_id":"example_job_id"}' --json
Shortcut
kosmo integrations:mindee mindee_get_async_prediction '{"account":"example_account","api_name":"example_api_name","api_version":"example_api_version","job_id":"example_job_id"}' --json

mindee.mindee_parse_invoice

Parse an invoice document (PDF or image) and extract structured data including supplier, line items, totals, dates, and tax details.

Write write
Parameters
document, file_name, options
Generic call
kosmo integrations:call mindee.mindee_parse_invoice '{"document":"example_document","file_name":"example_file_name","options":"example_options"}' --json
Shortcut
kosmo integrations:mindee mindee_parse_invoice '{"document":"example_document","file_name":"example_file_name","options":"example_options"}' --json

mindee.mindee_parse_receipt

Parse an expense receipt (PDF or image) and extract structured data including merchant, line items, totals, dates, and category.

Write write
Parameters
document, file_name, options
Generic call
kosmo integrations:call mindee.mindee_parse_receipt '{"document":"example_document","file_name":"example_file_name","options":"example_options"}' --json
Shortcut
kosmo integrations:mindee mindee_parse_receipt '{"document":"example_document","file_name":"example_file_name","options":"example_options"}' --json

mindee.mindee_parse_passport

Parse a passport document (PDF or image) and extract structured data including full name, date of birth, nationality, passport number, and expiry date.

Write write
Parameters
document, file_name, options
Generic call
kosmo integrations:call mindee.mindee_parse_passport '{"document":"example_document","file_name":"example_file_name","options":"example_options"}' --json
Shortcut
kosmo integrations:mindee mindee_parse_passport '{"document":"example_document","file_name":"example_file_name","options":"example_options"}' --json

mindee.mindee_parse_custom

Parse a document using a custom Mindee API endpoint. Requires an endpoint_id from your custom model trained in the Mindee API builder.

Write write
Parameters
endpoint_id, document, file_name, options
Generic call
kosmo integrations:call mindee.mindee_parse_custom '{"endpoint_id":"example_endpoint_id","document":"example_document","file_name":"example_file_name","options":"example_options"}' --json
Shortcut
kosmo integrations:mindee mindee_parse_custom '{"endpoint_id":"example_endpoint_id","document":"example_document","file_name":"example_file_name","options":"example_options"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

mindee.mindee_predict_document 6 parameters
Schema command
kosmo integrations:schema mindee.mindee_predict_document --json
ParameterTypeRequiredDescription
account string yes Mindee account name, usually "mindee" for off-the-shelf APIs.
api_name string yes Mindee API name such as invoices or expense_receipts.
api_version string yes Mindee API version such as v4, v5, or v1.
document string yes File path, URL, or base64-encoded document content.
file_name string no Optional filename for multipart or base64 uploads.
options object no Additional query parameters for the Mindee endpoint.
mindee.mindee_predict_document_async 6 parameters
Schema command
kosmo integrations:schema mindee.mindee_predict_document_async --json
ParameterTypeRequiredDescription
account string yes Mindee account name.
api_name string yes Mindee API name.
api_version string yes Mindee API version.
document string yes File path, URL, or base64-encoded document content.
file_name string no Optional filename for multipart or base64 uploads.
options object no Additional query parameters for the Mindee endpoint.
mindee.mindee_get_async_prediction 4 parameters
Schema command
kosmo integrations:schema mindee.mindee_get_async_prediction --json
ParameterTypeRequiredDescription
account string yes Mindee account name.
api_name string yes Mindee API name.
api_version string yes Mindee API version.
job_id string yes Mindee asynchronous job ID.
mindee.mindee_parse_invoice 3 parameters
Schema command
kosmo integrations:schema mindee.mindee_parse_invoice --json
ParameterTypeRequiredDescription
document string yes The document to parse — either a file path or a base64-encoded string of the file content.
file_name string no Optional filename for the document (used when providing base64 content).
options object no Additional query parameters for the Mindee endpoint.
mindee.mindee_parse_receipt 3 parameters
Schema command
kosmo integrations:schema mindee.mindee_parse_receipt --json
ParameterTypeRequiredDescription
document string yes The receipt document to parse — either a file path or a base64-encoded string of the file content.
file_name string no Optional filename for the document (used when providing base64 content).
options object no Additional query parameters for the Mindee endpoint.
mindee.mindee_parse_passport 3 parameters
Schema command
kosmo integrations:schema mindee.mindee_parse_passport --json
ParameterTypeRequiredDescription
document string yes The passport document to parse — either a file path or a base64-encoded string of the file content.
file_name string no Optional filename for the document (used when providing base64 content).
options object no Additional query parameters for the Mindee endpoint.
mindee.mindee_parse_custom 4 parameters
Schema command
kosmo integrations:schema mindee.mindee_parse_custom --json
ParameterTypeRequiredDescription
endpoint_id string yes The custom endpoint ID from your Mindee dashboard (e.g., "username/endpoint_name/v1").
document string yes The document to parse — either a file path or a base64-encoded string of the file content.
file_name string no Optional filename for the document (used when providing base64 content).
options object no Additional query parameters for the Mindee endpoint.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.