承接 ctexthuang/aip_sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ctexthuang/aip_sdk

最新稳定版本:v1.0.0

Composer 安装命令:

composer require ctexthuang/aip_sdk

包简介

baidu sdk for php

README 文档

README

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

Installation

You can install the package via composer:

composer require ctexthuang/aip_sdk

Usage

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

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

$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

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

MIT

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固