{"id":18448703,"url":"https://github.com/mindee/mindee-api-php","last_synced_at":"2025-07-08T14:09:33.971Z","repository":{"id":209662221,"uuid":"496945840","full_name":"mindee/mindee-api-php","owner":"mindee","description":"Mindee API Helper Library for PHP","archived":false,"fork":false,"pushed_at":"2025-06-04T07:53:07.000Z","size":2394,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-06T16:03:15.132Z","etag":null,"topics":["api-client","composer","php7","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mindee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-27T09:57:58.000Z","updated_at":"2025-06-04T07:47:13.000Z","dependencies_parsed_at":"2024-01-05T18:29:09.598Z","dependency_job_id":"68334b67-aa3f-40bb-b0c6-86f64d8426ad","html_url":"https://github.com/mindee/mindee-api-php","commit_stats":null,"previous_names":["mindee/mindee-api-php"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/mindee/mindee-api-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindee%2Fmindee-api-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindee%2Fmindee-api-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindee%2Fmindee-api-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindee%2Fmindee-api-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mindee","download_url":"https://codeload.github.com/mindee/mindee-api-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindee%2Fmindee-api-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264284398,"owners_count":23584679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","composer","php7","php8"],"created_at":"2024-11-06T07:16:48.439Z","updated_at":"2025-07-08T14:09:33.950Z","avatar_url":"https://github.com/mindee.png","language":"PHP","readme":"[![License: MIT](https://img.shields.io/github/license/mindee/mindee-api-php)](https://opensource.org/licenses/MIT) [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mindee/mindee-api-php/unit-test.yml)](https://github.com/mindee/mindee-api-php) [![Packagist Version](https://img.shields.io/packagist/v/mindee/mindee)](https://packagist.org/packages/mindee/mindee) [![Downloads](https://img.shields.io/packagist/dm/mindee/mindee)](https://packagist.org/packages/mindee/mindee)\n\n# Mindee API Helper Library for PHP\nQuickly and easily connect to Mindee's API services using PHP.\n\n## Quick Start\nHere's the TL;DR of getting started.\n\nFirst, get an [API Key](https://developers.mindee.com/docs/create-api-key)\n\nIf you do not have them, you'll need the following packages on your system:\n* [php-curl](https://www.php.net/manual/en/curl.installation.php)\n* [php-json](https://www.php.net/manual/en/json.installation.php) (not necessary for versions \u003e= 8.0.0)\n* [php-fileinfo](https://www.php.net/manual/en/fileinfo.installation.php)\n\nThen, install this library:\n```shell\ncomposer require mindee/mindee\n```\n\nFinally, PHP away!\n\n### Loading a File and Parsing It\n\n#### Global Documents\n```php\n\u003c?php\n\nuse Mindee\\Client;\nuse Mindee\\Product\\Invoice\\InvoiceV4;\n\n// Init a new client\n$mindeeClient = new Client(\"my-api-key\");\n\n// Load a file from disk\n$inputSource = $mindeeClient-\u003esourceFromPath(\"/path/to/the/file.ext\");\n\n// Parse the file\n$apiResponse = $mindeeClient-\u003eparse(InvoiceV4::class, $inputSource);\n\n// Print a brief summary of the parsed data\necho strval($apiResponse-\u003edocument);\n```\n\n**Note:** Files can also be loaded from:\n\nA PHP `File` compatible file:\n```php\n$inputDoc = $mindeeClient-\u003esourceFromFile($myFile);\n```\n\nA URL (`HTTPS` only):\n```php\n$inputDoc = $mindeeClient-\u003esourceFromUrl(\"https://files.readme.io/a74eaa5-c8e283b-sample_invoice.jpeg\");\n```\n\nA base64-encoded string, making sure to specify the extension of the file name:\n```php\n$inputDoc = $mindeeClient-\u003esourceFromB64($myInputString, \"my-file-name.ext\");\n```\n\nRaw bytes, making sure to specify the extension of the file name:\n```php\n$inputDoc = $mindeeClient-\u003esourceFromBytes($myRawBytesSequence, \"my-file-name.ext\");\n```\n\n#### Region-Specific Documents\n```php\nuse Mindee\\Client;\nuse Mindee\\Product\\Us\\BankCheck\\BankCheckV1;\n\n// Init a new client\n$mindeeClient = new Client(\"my-api-key\");\n\n// Load a file from disk\n$inputSource = $mindeeClient-\u003esourceFromPath(\"/path/to/the/file.ext\");\n\n// Parse the file\n$apiResponse = $mindeeClient-\u003eparse(BankCheckV1::class, $inputSource);\n\n// Print a brief summary of the parsed data\necho strval($apiResponse-\u003edocument);\n```\n\n#### Custom Documents (docTI \u0026 Custom APIs)\n\n```php\nuse Mindee\\Client;\nuse Mindee\\Product\\Generated\\GeneratedV1;\n\n// Init a new client\n$mindeeClient = new Client(\"my-api-key\");\n\n// Load a file from disk\n$inputSource = $mindeeClient-\u003esourceFromPath(\"/path/to/the/file.ext\");\n\n// Parse the file\n$apiResponse = $mindeeClient-\u003eparse(GeneratedV1::class, $inputSource);\n\n// Print a brief summary of the parsed data\necho strval($apiResponse-\u003edocument);\n```\n\n## Full PDF support\n\nSome features such as Invoice Splitter auto-extraction \u0026 Multi Receipts auto-extraction require the [ImageMagick](https://www.php.net/manual/en/imagick.setup.php) library, which in turn requires [GhostScript](https://www.ghostscript.com/).\n\n### Unix\n\nImageMagick is usually bundled with most installations. If not, you can install it using your distribution's package manager.\n\nMore details [here](https://imagemagick.org/script/advanced-linux-installation.php).\n\nGhostscript can be installed from the [website download page](https://ghostscript.com/releases/gsdnld.html), or if using an apt compatible distribution:\n```bash\nsudo apt-get update\nsudo apt-get install -y ghostscript\n```\n\nIn some cases, you might also want to authorize the ImageMagick policy to edit PDF files:\n\n```bash\nDQT='\"'\nSRC=\"rights=${DQT}none${DQT} pattern=${DQT}PDF${DQT}\"\nRPL=\"rights=${DQT}read|write${DQT} pattern=${DQT}PDF${DQT}\"\nsudo sed -i \"s/$SRC/$RPL/\" /etc/ImageMagick-6/policy.xml\n```\n\n### MacOS\n\nBrew will be required for this install.\n\n```bash\nbrew update\nbrew install imagemagick\npecl install imagick # Might not be needed in some instances. Do not try to install before installing PHP \u0026 Pecl.\n```\n\n### Windows\nYou can install [Ghostscript](https://ghostscript.com/releases/gsdnld.html) by downloading it, or simply by using [Chocolatey](https://chocolatey.org/).\n\n```\nchoco install ghostscript --version 10.03.1 -y\n```\n\n**⚠️ Important note if you are using Windows** \nThe `gs` alias might not be available by default, but it is possible to bind it fairly simply by either adding `gswin32c.exe` or `gswin64c.exe` to your `$PATH` and then adding a symlink in powershell using:\n\n```\nNew-Item -ItemType SymbolicLink -Path \"C:\\Windows\\gs.exe\" -Target \"C:\\Program Files\\gs\\gs10.03.1\\bin\\gswin64c.exe\"\nNew-Item -ItemType SymbolicLink -Path \"C:\\Windows\\gs\" -Target \"C:\\Program Files\\gs\\gs10.03.1\\bin\\gswin64c.exe\"\n```\n## Further Reading\nComplete details on the working of the library are available in the following guides:\n\n* [Getting started](https://developers.mindee.com/docs/php-getting-started)\n* [PHP Command Line Interface (CLI)](https://developers.mindee.com/docs/php-cli)\n* [PHP Generated APIs](https://developers.mindee.com/docs/php-generated-api)\n* [PHP Custom APIs (API Builder - Deprecated)](https://developers.mindee.com/docs/php-api-builder)\n* [PHP Invoice OCR](https://developers.mindee.com/docs/php-invoice-ocr)\n* [PHP Receipt OCR](https://developers.mindee.com/docs/php-receipt-ocr)\n* [PHP Financial Document OCR](https://developers.mindee.com/docs/php-financial-document-ocr)\n* [PHP Passport OCR](https://developers.mindee.com/docs/php-passport-ocr)\n* [PHP Resume OCR](https://developers.mindee.com/docs/php-resume-ocr)\n* [PHP International Id OCR](https://developers.mindee.com/docs/php-international-id-ocr)\n* [PHP FR Bank Account Detail OCR](https://developers.mindee.com/docs/php-fr-bank-account-details-ocr)\n* [PHP FR Carte Grise OCR](https://developers.mindee.com/docs/php-fr-carte-grise-ocr)\n* [PHP FR Health Card OCR](https://developers.mindee.com/docs/php-fr-health-card-ocr)\n* [PHP FR ID Card OCR](https://developers.mindee.com/docs/php-fr-carte-nationale-didentite-ocr)\n* [PHP US Bank Check OCR](https://developers.mindee.com/docs/php-us-bank-check-ocr)\n* [PHP Barcode Reader API](https://developers.mindee.com/docs/php-barcode-reader-ocr)\n* [PHP Cropper API](https://developers.mindee.com/docs/php-cropper-ocr)\n* [PHP Invoice Splitter API](https://developers.mindee.com/docs/php-invoice-splitter-ocr)\n* [PHP Multi Receipts Detector API](https://developers.mindee.com/docs/php-multi-receipts-detector-ocr)\n\nYou can view the source code on [GitHub](https://github.com/mindee/mindee-api-php).\n\nYou can also take a look at the\n**[Reference Documentation](https://mindee.github.io/mindee-api-php)**.\n\n## License\nCopyright © Mindee\n\nAvailable as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Questions?\n[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindee%2Fmindee-api-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindee%2Fmindee-api-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindee%2Fmindee-api-php/lists"}