PHPackages                             aoxiang/baidu-aip - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. aoxiang/baidu-aip

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aoxiang/baidu-aip
=================

百度 AI 开放平台 php-sdk

v1.2(5y ago)012MITPHPPHP &gt;=7.1

Since Jan 16Pushed 5y agoCompare

[ Source](https://github.com/aoxiang594/baidu-aip-sdk)[ Packagist](https://packagist.org/packages/aoxiang/baidu-aip)[ RSS](/packages/aoxiang-baidu-aip/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (10)Used By (0)

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

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

> 支持 composer、laravel/lumen

基于 修改了一小部分。增加新闻摘要接口

要求
--

[](#要求)

requirements

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

安装
--

[](#安装)

install

```
$ composer require 96qbhy/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 \Qbhy\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->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有

php吹水交流群请添加: 873213948
[qbhy/baidu-aip](https://github.com/qbhy/baidu-aip-sdk)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~92 days

Recently: every ~183 days

Total

9

Last Release

1935d ago

Major Versions

v0.1.4 → v1.02020-06-11

### Community

Maintainers

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

---

Top Contributors

[![qbhy0715](https://avatars.githubusercontent.com/u/16954340?v=4)](https://github.com/qbhy0715 "qbhy0715 (19 commits)")[![qbhy](https://avatars.githubusercontent.com/u/24204533?v=4)](https://github.com/qbhy "qbhy (13 commits)")[![iMuduo](https://avatars.githubusercontent.com/u/5443624?v=4)](https://github.com/iMuduo "iMuduo (8 commits)")[![9yearfish](https://avatars.githubusercontent.com/u/11186536?v=4)](https://github.com/9yearfish "9yearfish (2 commits)")[![liuchuandeo](https://avatars.githubusercontent.com/u/34733984?v=4)](https://github.com/liuchuandeo "liuchuandeo (1 commits)")

---

Tags

ai

### Embed Badge

![Health badge](/badges/aoxiang-baidu-aip/health.svg)

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

###  Alternatives

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[codewithkyrian/transformers

State-of-the-art Machine Learning for PHP. Run Transformers in PHP

749231.8k5](/packages/codewithkyrian-transformers)[maestroerror/laragent

Power of AI Agents in your Laravel project

630106.4k](/packages/maestroerror-laragent)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[davmixcool/php-sentiment-analyzer

PHP Sentiment Analyzer is a lexicon and rule-based sentiment analysis tool that is used to understand sentiments in a sentence using VADER (Valence Aware Dictionary and sentiment Reasoner).

138151.7k1](/packages/davmixcool-php-sentiment-analyzer)[symfony/ai-platform

PHP library for interacting with AI platform provider.

51927.7k134](/packages/symfony-ai-platform)

PHPackages © 2026

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