Use this skill for Mindee V2 integrations with the official Python SDK.
- Use the official
mindeePython SDK. - Focus on SDK-based integration patterns only.
- Do not suggest direct HTTP calls, cURL, or non-SDK integrations.
- Do not use undocumented SDK internals.
- Use: https://docs.mindee.com/extraction-models/sdk-integration/extraction-result.md
- Use this page for accessing dynamic fields from
response.inference.result.fields. - Use this page for examples of
SimpleField,ObjectField,ListField, confidence, and locations.
- Use: https://docs.mindee.com/split-models/sdk-integration/split-result.md
- Use this page for iterating over
response.inference.result.splits. - Use this page for
document_type,page_range, and optional chained extraction results.
- Use: https://docs.mindee.com/crop-models/sdk-integration/crop-result.md
- Use this page for iterating over
response.inference.result.crops. - Use this page for
object_type, crop location, polygon data, and optional chained extraction results.
- Use: https://docs.mindee.com/classification-models/sdk-integration/classification-result.md
- Use this page for accessing
response.inference.result.classification. - Use this page for
document_typeand optional chained extraction results.
- Use: https://docs.mindee.com/raw-text-ocr-models/sdk-integration/ocr-result.md
- Use this page for iterating over
response.inference.result.pages. - Use this page for page text, words, and word polygon data.
When answering questions, follow this order:
- Initialize the SDK client.
- Configure
model_idand other inference parameters. - Load the input source.
- Optionally adjust the file before upload.
- Send with polling or webhooks.
- Process the response.
- Handle errors and retries.
- Base answers on the documentation above.
- Prefer documented SDK methods and patterns.
- Use environment variables for API keys in production.
- Reuse a client instance when possible.
- Prefer polling for simple examples.
- Prefer webhooks for production or high-volume workflows.
- If a feature is not documented, say it is not officially supported.
- If a user asks for code, keep examples minimal and working.
- Use Python examples only.
- Use the official
mindeepackage. - Show imports explicitly.
- Include the exact documented class and method names.
- Use placeholders like
MY_API_KEY,MY_MODEL_ID, and/path/to/file.pdf. - Keep samples focused on one task.
Use:
Client(api_key="MY_API_KEY")frommindee.v2Client()withMINDEE_V2_API_KEYenvironment variable- Context manager:
with Client() as client:
Use:
PathInput— load from a file pathBytesInput— load from raw bytes (requiresfilename)Base64Input— load from a base64 string (requiresfilename)FileInput— load from a binary file object (BinaryIO)URLInputSource— load from a remote HTTPS URL
Use:
client.enqueue_and_get_result(ResponseClass, input_source, params)for pollingclient.enqueue(input_source, params)for webhooks
Use:
response.inference— access the inference resultLocalResponse(payload).deserialize_response(ResponseClass)for webhook payloadsresponse.is_valid_hmac_signature(secret_key, signature)for HMAC validation
Use:
input_source.apply_page_options(page_options)— trim or remove pagesinput_source.compress(quality=85)— compress before uploadinput_source.fix_pdf()— repair broken PDFsinput_source.has_source_text()— check for embedded textPageOptions(page_indexes=[...], operation="KEEP_ONLY", on_min_pages=0)
- Direct REST examples
- cURL examples
- Manual authentication header construction
- Bearer token examples for API keys
- Non-Python examples
- V1 examples unless the user explicitly asks for V1
Ask for only what is needed:
- input type: local file or URL
- delivery pattern: polling or webhook
- model ID
- runtime context: web server, worker, or script
- Be concise.
- Answer with runnable examples when code is requested.
- Link to the most relevant doc section.
- Do not overwhelm the user with every option.
- Start with the documented default path.
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on the documentation URL with the ask query parameter.
Include python+sdk+-+ at the beginning of the question to get answers specific to this library:
GET https://docs.mindee.com/integrations.md?ask=python+sdk+-+<question>
The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.