PHPackages                             clarifai/clarifai-php-grpc - 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. [API Development](/categories/api)
4. /
5. clarifai/clarifai-php-grpc

ActiveLibrary[API Development](/categories/api)

clarifai/clarifai-php-grpc
==========================

Clarifai PHP gRPC client

12.2.11(1mo ago)1128.3k—7.1%1[2 issues](https://github.com/Clarifai/clarifai-php-grpc/issues)[1 PRs](https://github.com/Clarifai/clarifai-php-grpc/pulls)Apache-2.0PHPCI passing

Since Jul 29Pushed 1mo ago10 watchersCompare

[ Source](https://github.com/Clarifai/clarifai-php-grpc)[ Packagist](https://packagist.org/packages/clarifai/clarifai-php-grpc)[ Docs](https://clarifai.com/)[ RSS](/packages/clarifai-clarifai-php-grpc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (248)Used By (0)

[![image](https://private-user-images.githubusercontent.com/445122/375428760-895da6c0-874d-45f0-a3b7-26ad07f14a37.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUzNTQ3NTMsIm5iZiI6MTc3NTM1NDQ1MywicGF0aCI6Ii80NDUxMjIvMzc1NDI4NzYwLTg5NWRhNmMwLTg3NGQtNDVmMC1hM2I3LTI2YWQwN2YxNGEzNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwNVQwMjAwNTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yODExYTliMGU0YWZlYmMxNWRkMDU2NzBmNjllYWFkMjI0NDYwY2YwMWRlYWJhNTY0YzY2NmIxOTQ4YmNkNjRlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.BiB9dxpfYIU70Ey6rxc8PmJTpp2jrjx8GrUCZjhTaMY)](https://private-user-images.githubusercontent.com/445122/375428760-895da6c0-874d-45f0-a3b7-26ad07f14a37.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUzNTQ3NTMsIm5iZiI6MTc3NTM1NDQ1MywicGF0aCI6Ii80NDUxMjIvMzc1NDI4NzYwLTg5NWRhNmMwLTg3NGQtNDVmMC1hM2I3LTI2YWQwN2YxNGEzNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwNVQwMjAwNTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yODExYTliMGU0YWZlYmMxNWRkMDU2NzBmNjllYWFkMjI0NDYwY2YwMWRlYWJhNTY0YzY2NmIxOTQ4YmNkNjRlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.BiB9dxpfYIU70Ey6rxc8PmJTpp2jrjx8GrUCZjhTaMY)

Clarifai PHP gRPC Client
========================

[](#clarifai-php-grpc-client)

This is the official Clarifai gRPC PHP client for interacting with our powerful recognition [API](https://docs.clarifai.com). Clarifai provides a platform for data scientists, developers, researchers and enterprises to master the entire artificial intelligence lifecycle. Gather valuable business insights from images, video and text using computer vision and natural language processing.

- Try the Clarifai demo at:
- Sign up for a free account at:
- Read the documentation at:

[![Latest Stable Version](https://camo.githubusercontent.com/5c2a8bc1a627fef10e77b964adaded5840621463a42c34752728680c799a8613/68747470733a2f2f706f7365722e707567782e6f72672f636c6172696661692f636c6172696661692d7068702d677270632f76657273696f6e)](https://packagist.org/packages/clarifai/clarifai-php-grpc)

Installation
============

[](#installation)

```
composer require clarifai/clarifai-php-grpc

```

See also [how add gRPC to your PHP installation](https://grpc.io/docs/languages/php/quickstart/).

Versioning
----------

[](#versioning)

This library doesn't use semantic versioning. The first two version numbers (`X.Y` out of `X.Y.Z`) follow the API (backend) versioning, and whenever the API gets updated, this library follows it.

The third version number (`Z` out of `X.Y.Z`) is used by this library for any independent releases of library-specific improvements and bug fixes.

Getting started
---------------

[](#getting-started)

Construct the client and setup your API key or Personal Access Token in the metadata variable.

```
require ‘vendor/autoload.php’;
use Clarifai\ClarifaiClient;

$client = ClarifaiClient::grpc();
$metadata = ['Authorization' => ['Key {MY_CLARIFAI_API_KEY_OR_PAT}']];
```

Predict concepts in an image:

```
use Clarifai\Api\Data;
use Clarifai\Api\Image;
use Clarifai\Api\Input;
use Clarifai\Api\PostModelOutputsRequest;
use Clarifai\Api\Status\StatusCode;

[$response, $status] = $client->PostModelOutputs(
    new PostModelOutputsRequest([
        'model_id' => 'aaa03c23b3724a16a56b629203edc62c',  // This is the ID of the publicly available General model.
        'inputs' => [
            new Input([
                'data' => new Data([
                    'image' => new Image([
                        'url' => 'https://samples.clarifai.com/dog2.jpeg'
                    ])
                ])
            ])
        ]
    ]),
    $metadata
)->wait();

if ($status->code !== 0) throw new Exception("Error: {$status->details}");
if ($response->getStatus()->getCode() != StatusCode::SUCCESS) {
    throw new Exception("Failure response: " . $response->getStatus()->getDescription() . " " .
        $response->getStatus()->getDetails());
}

echo "Predicted concepts:\n";
foreach ($response->getOutputs()[0]->getData()->getConcepts() as $concept) {
    echo $concept->getName() . ": " . number_format($concept->getValue(), 2) . "\n";
}
```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance85

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 67.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~3 days

Total

243

Last Release

55d ago

Major Versions

7.9.0 → 8.6.02022-06-20

8.11.0 → 9.0.02023-01-06

9.11.5 → 10.0.02024-01-08

10.11.2 → 11.0.02025-01-08

11.11.8 → 12.0.02026-01-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/195a278eac0ca9afd0fa4f00d390204d8d962c5f7c642f43aad66afe11b2d428?d=identicon)[clarifai](/maintainers/clarifai)

---

Top Contributors

[![clarifai-prod](https://avatars.githubusercontent.com/u/13002180?v=4)](https://github.com/clarifai-prod "clarifai-prod (202 commits)")[![rok-clarifai](https://avatars.githubusercontent.com/u/61063406?v=4)](https://github.com/rok-clarifai "rok-clarifai (34 commits)")[![aleksander-clarifai](https://avatars.githubusercontent.com/u/72006155?v=4)](https://github.com/aleksander-clarifai "aleksander-clarifai (26 commits)")[![YvetteZ2017](https://avatars.githubusercontent.com/u/30578017?v=4)](https://github.com/YvetteZ2017 "YvetteZ2017 (17 commits)")[![YvetteClarifai](https://avatars.githubusercontent.com/u/60231494?v=4)](https://github.com/YvetteClarifai "YvetteClarifai (13 commits)")[![clarifai-fmarceau](https://avatars.githubusercontent.com/u/108883925?v=4)](https://github.com/clarifai-fmarceau "clarifai-fmarceau (4 commits)")[![travertischio](https://avatars.githubusercontent.com/u/8041974?v=4)](https://github.com/travertischio "travertischio (1 commits)")[![tot-ra](https://avatars.githubusercontent.com/u/445122?v=4)](https://github.com/tot-ra "tot-ra (1 commits)")[![jeffreytoffoli](https://avatars.githubusercontent.com/u/59623770?v=4)](https://github.com/jeffreytoffoli "jeffreytoffoli (1 commits)")[![aruex](https://avatars.githubusercontent.com/u/43998747?v=4)](https://github.com/aruex "aruex (1 commits)")

---

Tags

aiclarifaiclarifai-clientgrpcphpapiartificial intelligencetext recognitionimage recognitionclarifaivideo recognition

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/clarifai-clarifai-php-grpc/health.svg)

```
[![Health](https://phpackages.com/badges/clarifai-clarifai-php-grpc/health.svg)](https://phpackages.com/packages/clarifai-clarifai-php-grpc)
```

###  Alternatives

[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[clarifai/clarifai-php

Clarifai PHP Client

21133.0k](/packages/clarifai-clarifai-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)[spiral/grpc-client

gRPC client

41140.3k2](/packages/spiral-grpc-client)[passkit/passkit-php-grpc-sdk

PHP gRPC SDK for Apple Wallet and Google Pay Membership / Loyalty / Access Cards, Coupons, Flights &amp; Event-Tickets.

132.0k](/packages/passkit-passkit-php-grpc-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
