PHPackages                             mkang-dev/baiduai - 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. mkang-dev/baiduai

ActiveLibrary[API Development](/categories/api)

mkang-dev/baiduai
=================

百度 AI 开放平台 php-sdk 原96qbhy 进行改动分析修复

v1.0(3y ago)331[1 issues](https://github.com/master-start/baiduai/issues)MITPHPPHP &gt;=7.2.5

Since Apr 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/master-start/baiduai)[ Packagist](https://packagist.org/packages/mkang-dev/baiduai)[ RSS](/packages/mkang-dev-baiduai/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

百度 AI 开放平台 php-sdk
==================

[](#百度-ai-开放平台-php-sdk)

> 支持 composer、laravel/lumen/thinkphp/hyperf

要求
--

[](#要求)

requirements

- composer
- php &gt;= 7.1
- ext-json &gt;= 1.0

安装
--

[](#安装)

install

```
$ composer require mkang-dev/baidu-aip
```

使用
--

[](#使用)

usage

```
require 'vendor/autoload.php';

$config = [
      'use'          => 'default',
      'debug'        => true,
      'applications' => [
          'default' => [
              'app_id'     => 'your app id',
              'api_key'    => 'your api key',
              'secret_key' => 'your secret key',
          ],
          'your app' => [
              'app_id'     => 'your app id',
              'api_key'    => 'your api key',
              'secret_key' => 'your secret key',
          ],
      ]
  ];

$aip = new \Mkang\BaiduAIP\BaiduAIP($config);

var_dump(json_encode($aip->image_censor->antiSpam('测试')));
var_dump(json_encode($aip->use('your app')->image_censor->antiSpam('测试')));
```

> sdk支持多应用，使用 use 切换当前应用配置。

API
---

[](#api)

- `$aip->image_censor` 图像审核服务，对应百度AI开放平台中视觉技术的 [图像审核](http://ai.baidu.com/docs#/ImageCensoring-PHP-SDK/top) API
- `$aip->image_classify` 图像识别服务，对应百度AI开放平台中视觉技术的 [图像识别](http://ai.baidu.com/docs#/ImageClassify-PHP-SDK/top) API
- `$aip->image_search` 图像搜索服务，对应百度AI开放平台中视觉技术的 [图像搜索](http://ai.baidu.com/docs#/ImageSearch-PHP-SDK/top) API
- `$aip->image_process` 图像效果增强服务，对应百度AI开放平台中视觉技术的 [图像效果增强](https://cloud.baidu.com/doc/IMAGEPROCESS/s/nk3bcloer) API
- `$aip->body_analysis` 人体分析服务，对应百度AI开放平台中视觉技术的 [人体分析](http://ai.baidu.com/docs#/BodyAnalysis-PHP-SDK/top) API
- `$aip->face` 人脸识别服务，对应百度AI开放平台中视觉技术的 [人脸识别](http://ai.baidu.com/docs#/Face-Detect-V3/top) API
- `$aip->ocr` 文字识别服务，对应百度AI开放平台中视觉技术的 [文字识别](http://ai.baidu.com/docs#/OCR-PHP-SDK/top) API
- `$aip->nlp` 自然语言处理服务，对应百度AI开放平台中的 [自然语言](http://ai.baidu.com/docs#/NLP-PHP-SDK/top) API
- `$aip->speech` 百度语音服务，对应百度AI开放平台中的 [百度语音](http://ai.baidu.com/docs#/ASR-Online-PHP-SDK/top) API
- `$aip->kg` 讲真这个我也不知道干什么的，但是官方SDK有

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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

1121d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71afaa1c42849ed33fa011bf1a8805772765a86107795e21ba08ee4e4dda2afc?d=identicon)[kangdev](/maintainers/kangdev)

---

Top Contributors

[![master-start](https://avatars.githubusercontent.com/u/80869920?v=4)](https://github.com/master-start "master-start (6 commits)")

---

Tags

ai

### Embed Badge

![Health badge](/badges/mkang-dev-baiduai/health.svg)

```
[![Health](https://phpackages.com/badges/mkang-dev-baiduai/health.svg)](https://phpackages.com/packages/mkang-dev-baiduai)
```

###  Alternatives

[wordpress/mcp-adapter

Adapter for Abilities API, letting WordPress abilities to be used as MCP tools, resources or prompts

74855.8k1](/packages/wordpress-mcp-adapter)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[gemini-api-php/client

API client for Google's Gemini API

216221.4k5](/packages/gemini-api-php-client)[chriskonnertz/deeply

DeepLy is a PHP client for the DeepL.com translation API

230116.2k8](/packages/chriskonnertz-deeply)[moe-mizrak/laravel-openrouter

Laravel package for OpenRouter (A unified interface for LLMs)

153107.2k2](/packages/moe-mizrak-laravel-openrouter)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-client)

PHPackages © 2026

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