PHPackages                             guigald/google-cloud-vision-php - 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. guigald/google-cloud-vision-php

ActivePackage[API Development](/categories/api)

guigald/google-cloud-vision-php
===============================

A simple php library for the google cloud vision API

0273PHP

Since May 18Pushed 3y agoCompare

[ Source](https://github.com/LionGuilherme/google-cloud-vision-lion)[ Packagist](https://packagist.org/packages/guigald/google-cloud-vision-php)[ RSS](/packages/guigald-google-cloud-vision-php/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

google-cloud-vision-php
=======================

[](#google-cloud-vision-php)

Overview
========

[](#overview)

Performs Label detection, face detection, Logo detection, explicit content detection, landmark detection, optical character recogition and web detection on images. You can read more about Google cloud vision here

Getting Started
===============

[](#getting-started)

You will need a google account to use this API so if you do not already have an account with google, head over there and create one

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

[](#installation)

```
composer require wapnen/google-cloud-vision-php
```

Enable the API
--------------

[](#enable-the-api)

To start using the google cloud vision api, follow the instructions here to enable the api for your google account

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

[](#authentication)

You must set up an Api key to authenticate your requests. Follow the instructions here  to set up an API key for your project on google cloud platform console

Usage
=====

[](#usage)

```

```

Note : You can create as many as 16 Annotate image requests to be sent with the request object

The function `setImageUri();` takes a Google Cloud Storage image location, or publicly-accessible image URL. Alternatively you can use `setImage();` which takes a base64 encoded image string.

You can set as many features as are available to the annotateImageRequest by calling the `setFeature();` function on the annotateImageRequest which takes any of the following enum parameters ; TYPE\_UNSPECIFIED, FACE\_DETECTION, LANDMARK\_DETECTION, LOGO\_DETECTION, LABEL\_DETECTION, TEXT\_DETECTION, DOCUMENT\_TEXT\_DETECTION, SAFE\_SEARCH\_DETECTION, IMAGE\_PROPERTIES, CROP\_HINTS, WEB\_DETECTION.

Optionally, you can set the image context for each annotateImageRequest object like so

```
$annotateImageRequest1 = new AnnotateImageRequest()
$annotateImageRequest1->setImageContext();
$annotateImageRequest1->getImageContext()->setCropHintsParams([1.333]); //array
$annotateImageRequest1->getImageContext()->setWebDetectionParams(false);  //boolean
$annotateImageRequest1->getImageContext()->setLanguageHints([]); //array

```

Finally, the GoogleCloudVision request object takes an array of AnnotateImageRequest objects as the first parameter and the api key as the second parameter

### Response object

[](#response-object)

If successful, you will receive a json object response in the format below;

```
{
  "responses": [
    {
      object(AnnotateImageResponse)
    }
  ]
}

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 90.9% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a6bc832282efdcbc6640b74e6ef35bdda60808f3ce50fb962df339364b35fc4?d=identicon)[guigald](/maintainers/guigald)

---

Top Contributors

[![wapnen](https://avatars.githubusercontent.com/u/18328614?v=4)](https://github.com/wapnen "wapnen (10 commits)")[![LionGuilherme](https://avatars.githubusercontent.com/u/87143671?v=4)](https://github.com/LionGuilherme "LionGuilherme (1 commits)")

### Embed Badge

![Health badge](/badges/guigald-google-cloud-vision-php/health.svg)

```
[![Health](https://phpackages.com/badges/guigald-google-cloud-vision-php/health.svg)](https://phpackages.com/packages/guigald-google-cloud-vision-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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