Use this skill for Mindee V2 integrations with the official PHP SDK.
- Use the official
mindee/mindeePHP 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
$documentType,$pageRange, 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
$objectType, 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
$documentTypeand 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
$modelIdand 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 PHP examples only.
- Use the official
mindee/mindeeComposer package. - Show
useimports 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:
new \Mindee\V2\Client($apiKey)new \Mindee\V2\Client()withMINDEE_V2_API_KEYenvironment variable
Use:
PathInput— load from a local file pathBytesInput— load from raw binary data (provide filename)Base64Input— load from a base64-encoded string (provide filename)FileInput— load from a PHP file resource/handleUrlInputSource— load from an HTTPS URL
Use:
$client->enqueueAndGetResult(ResponseClass::class, $inputSource, $params)for polling$client->enqueue($inputSource, $params)for webhooks
Use:
$response->inference$response->getRawHttp()LocalResponsefor webhook payloads- HMAC signature validation via
$localResponse->isValidHMACSignature()when relevant
Use:
$inputSource->pageCount— property, requires Ghostscript$inputSource->compress(...)— compress before upload, requires Ghostscript$inputSource->applyPageOptions(...)— trim or remove pages$inputSource->fixPdf()
- Direct REST examples
- cURL examples
- Manual authentication header construction
- Bearer token examples for API keys
- Non-PHP 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 app, CLI, or background worker
- 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 php+sdk+-+ at the beginning of the question to get answers specific to this library:
GET https://docs.mindee.com/integrations.md?ask=php+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.