PHPackages                             php-vision/ya-ocr-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. php-vision/ya-ocr-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

php-vision/ya-ocr-sdk
=====================

HTTP client for Yandex Cloud Vision OCR (sync/async)

1.0.0(3mo ago)441MITPHPPHP ^8.4

Since Jan 6Pushed 3mo agoCompare

[ Source](https://github.com/php-vision/ya-ocr-sdk)[ Packagist](https://packagist.org/packages/php-vision/ya-ocr-sdk)[ RSS](/packages/php-vision-ya-ocr-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (6)Used By (0)

Yandex Cloud Vision OCR PHP Client
==================================

[](#yandex-cloud-vision-ocr-php-client)

HTTP client for **Yandex Cloud Vision OCR** (sync + async). Designed as a small, predictable, PSR-friendly Composer library with clear errors, DTOs, and optional concurrency via a runner interface.

[![Tests status](https://github.com/php-vision/ya-ocr-sdk/actions/workflows/ci-test.yml/badge.svg)](https://github.com/php-vision/ya-ocr-sdk/actions)[![Latest Stable Version](https://camo.githubusercontent.com/1f76a2ab12a25572bc8e5e877c787e36a812ab492a537f3a8320524148816e61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d766973696f6e2f79612d6f63722d73646b2e737667)](https://packagist.org/packages/php-vision/ya-ocr-sdk)[![License](https://camo.githubusercontent.com/b840865c6e03cf37bc7481ba958c27ecc48efc17d8639cb33704c9709c3ff4fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068702d766973696f6e2f79612d6f63722d73646b2e737667)](https://packagist.org/packages/php-vision/ya-ocr-sdk)

Features
--------

[](#features)

- Sync OCR (`recognizeText`)
- Async OCR (`startTextRecognition` + polling with `wait` / `waitMany`)
- PSR-18 transport + PSR-17 factories
- Deterministic DTOs with raw payload/meta
- Typed exceptions
- No hard dependency on event loops (optional concurrency via runner)

Requirements
------------

[](#requirements)

- PHP 8.4+
- PSR-18 HTTP client
- PSR-17 factories

Installation
------------

[](#installation)

```
composer require php-vision/ya-ocr-vision-client
```

You must also install a PSR-18 client and PSR-17 factories, for example:

```
composer require guzzlehttp/guzzle nyholm/psr7
```

Authentication
--------------

[](#authentication)

Two options:

- **IAM Token**
    Use `Authorization: Bearer `.
- **API Key**
    Use `Authorization: Api-Key ` (no `folderId` header).

This library only signs requests and forwards headers; it does not call IAM endpoints.

Quick Start (Sync)
------------------

[](#quick-start-sync)

```
