PHPackages                             ctexthuang/aip\_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. [API Development](/categories/api)
4. /
5. ctexthuang/aip\_sdk

ActiveLibrary[API Development](/categories/api)

ctexthuang/aip\_sdk
===================

baidu sdk for php

v1.0.0(3mo ago)03MITPHP

Since Jan 30Pushed 3mo agoCompare

[ Source](https://github.com/ctexthuang/package_php_aip_sdk)[ Packagist](https://packagist.org/packages/ctexthuang/aip_sdk)[ RSS](/packages/ctexthuang-aip-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Baidu AIP SDK for PHP
=====================

[](#baidu-aip-sdk-for-php)

This is a PHP SDK for Baidu AI Platform (Baidu AIP).

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

[](#installation)

You can install the package via composer:

```
composer require ctexthuang/aip_sdk
```

Usage
-----

[](#usage)

### Initialization

[](#initialization)

All AI services use the same initialization method. You need to obtain the `App ID`, `API Key`, and `Secret Key` from the Baidu AI Console.

```
use ctexthuang\aip_sdk\AipFace;
// or other services like:
// use ctexthuang\aip_sdk\AipOcr;
// use ctexthuang\aip_sdk\AipNlp;

$appId = 'YOUR_APP_ID';
$apiKey = 'YOUR_API_KEY';
$secretKey = 'YOUR_SECRET_KEY';

$client = new AipFace($appId, $apiKey, $secretKey);
```

### Available Services

[](#available-services)

The SDK supports the following services. Replace `AipFace` with the corresponding class name to use other services.

- **Face Recognition**: `ctexthuang\aip_sdk\AipFace`
- **OCR (Optical Character Recognition)**: `ctexthuang\aip_sdk\AipOcr`
- **NLP (Natural Language Processing)**: `ctexthuang\aip_sdk\AipNlp`
- **Image Content Censor**: `ctexthuang\aip_sdk\AipImageCensor`
- **Text Content Censor**: `ctexthuang\aip_sdk\AipContentCensor`
- **Image Classification**: `ctexthuang\aip_sdk\AipImageClassify`
- **Image Search**: `ctexthuang\aip_sdk\AipImageSearch`
- **Image Processing**: `ctexthuang\aip_sdk\AipImageProcess`
- **Speech Recognition**: `ctexthuang\aip_sdk\AipSpeech`
- **Body Analysis**: `ctexthuang\aip_sdk\AipBodyAnalysis`
- **Knowledge Graph**: `ctexthuang\aip_sdk\AipKg`

### Example: Face Detection

[](#example-face-detection)

```
$image = file_get_contents('path/to/image.jpg');
$imageType = 'BASE64';
$image = base64_encode($image);

// Detect face
$result = $client->detect($image, $imageType);
print_r($result);
```

### Example: OCR General Basic

[](#example-ocr-general-basic)

```
use ctexthuang\aip_sdk\AipOcr;

$client = new AipOcr($appId, $apiKey, $secretKey);

$image = file_get_contents('path/to/image.jpg');
$result = $client->basicGeneral($image);
print_r($result);
```

License
-------

[](#license)

MIT

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance81

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

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

Unknown

Total

1

Last Release

100d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd9e29ba99c32e51a6d73f46ac586f1bc2e1d322e370f54b88566cc0d6bb5b95?d=identicon)[ctexthuang](/maintainers/ctexthuang)

---

Top Contributors

[![ctexthuang](https://avatars.githubusercontent.com/u/24536224?v=4)](https://github.com/ctexthuang "ctexthuang (1 commits)")

### Embed Badge

![Health badge](/badges/ctexthuang-aip-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/ctexthuang-aip-sdk/health.svg)](https://phpackages.com/packages/ctexthuang-aip-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M270](/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.1M452](/packages/google-gax)

PHPackages © 2026

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