PHPackages                             justmd5/tencent-ai - 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. justmd5/tencent-ai

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

justmd5/tencent-ai
==================

腾讯AI开放平台sdk

v0.9.0(4y ago)72267181MITPHPPHP &gt;=7.0

Since Jun 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/justmd5/tencent-ai)[ Packagist](https://packagist.org/packages/justmd5/tencent-ai)[ Fund](https://justmd5.com/donate.jpg)[ Patreon](https://www.patreon.com/justmd5)[ RSS](/packages/justmd5-tencent-ai/feed)WikiDiscussions master Synced 2w ago

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

> 📢 请注意！由于腾讯原有免费API已关闭，该项目目前已属于不可用状态

腾讯AI开放平台 SDK
============

[](#腾讯ai开放平台-sdk)

Tencent AI open platform sdk

[![styleci](https://camo.githubusercontent.com/ba787a74e269fcf5240bb41e843893d4c8aca7acda5201aba691412d691f1847/68747470733a2f2f7374796c6563692e696f2f7265706f732f3133383436373331382f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/138467318)[![PHP from Packagist](https://camo.githubusercontent.com/287282c0ad31c619fc515a2ed886b01048f8bed493c62320591f9842513ea322/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a7573746d64352f74656e63656e742d61692e737667)](https://packagist.org/packages/justmd5/tencent-ai)[![GitHub stars](https://camo.githubusercontent.com/4bb756120a3f3a6b4053e77f223b902a9e5f57d0ee642a493cb8e591f9deabc3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6a7573746d64352f74656e63656e742d61692e7376673f7374796c653d736f6369616c266c6162656c3d5374617273)](https://packagist.org/packages/justmd5/tencent-ai)[![Latest Stable Version](https://camo.githubusercontent.com/c4db7f3fe5599bc1741c7d140049103b5e93694c29ba6bda570cf5b17ac7de3d/68747470733a2f2f706f7365722e707567782e6f72672f6a7573746d64352f74656e63656e742d61692f762f737461626c652e737667)](https://packagist.org/packages/justmd5/tencent-ai)[![Latest Unstable Version](https://camo.githubusercontent.com/833d8183cd9acbcbcc3b95f5063dfa24871b5d22099a53317193eaaa1ddcd5ab/68747470733a2f2f706f7365722e707567782e6f72672f6a7573746d64352f74656e63656e742d61692f762f756e737461626c652e737667)](https://packagist.org/packages/justmd5/tencent-ai)[![](https://camo.githubusercontent.com/25e80014074f47218e035a16179adc4eacf230d7d58af4ced691dff88e9fa91d/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466a7573746d643525324674656e63656e742d61692e7376673f747970653d736869656c64)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjustmd5%2Ftencent-ai?ref=badge_shield) [![License](https://camo.githubusercontent.com/77347adfd623766404d2da0cbac41cf09fd6f060984878b7ffd42f05f1f283dc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a7573746d64352f74656e63656e742d61692e737667)](https://packagist.org/packages/justmd5/tencent-ai)

 **Special thanks to the generous sponsorship by:**

 [ ![](https://camo.githubusercontent.com/fa7e89c93b46924d5cd6bc754a22692553b32022257f8d682434e48c2d3a3a2b/68747470733a2f2f692e6c6f6c692e6e65742f323031382f30332f32312f356162323233623735636466612e706e67) ](https://www.jetbrains.com/?from=justmd5/tencent-ai)

### Requirement

[](#requirement)

1. PHP &gt;= 7.0
2. **[Composer](https://getcomposer.org/)**
3. ext-curl 拓展
4. ext-json 拓展

### 安装

[](#安装)

`composer require justmd5/tencent-ai`

### 使用

[](#使用)

```
$config  = [
    'appKey'    => '1106944xxx',
    'appSecret' => 'dsgnbnWnX8Yxxxxxx',
    'debug'     => true,//true show debug info
];
$AI      = new \Justmd5\TencentAi\Ai($config);
```

### 接口调用示例

[](#接口调用示例)

> [智能闲聊](https://ai.qq.com/doc/nlpchat.shtml) url: [https://api.ai.qq.com/fcgi-bin/nlp/nlp\_textchat](https://api.ai.qq.com/fcgi-bin/nlp/nlp_textchat)请求示例1：

```
$params = [
'question'=>'腾讯人工智能',
'session'=>123,
];
try {
    dd($AI->nlp->request('textchat', $params));
} catch (\Justmd5\TencentAi\Exception\NotFoundException $e) {
    dd($e);
}

```

> [看图说话](https://ai.qq.com/doc/imgtotext.shtml) url: [https://api.ai.qq.com/fcgi-bin/vision/vision\_imgtotext](https://api.ai.qq.com/fcgi-bin/vision/vision_imgtotext)请求示例2：

```
$params = [
//image 支持两种传递参数方式
//  'image'      => base64_encode(file_get_contents(__DIR__ . '/1571126902_843200.jpg')),//old
    'image'      => __DIR__ . '/1571126902_843200.jpg',//new
    'session_id' => time(),
];
try {
    var_dump($AI->vision->request('imgtotext', $params));
} catch (\Justmd5\TencentAi\Exception\NotFoundException $e) {
    print_r($e->getMessage());
} catch (\Justmd5\TencentAi\Exception\IllegalParameterException $e) {
    print_r($e->getMessage());
}

```

### 文档

[](#文档)

[Tencent AI](https://ai.qq.com) · [Official Documents](https://ai.qq.com/doc/index.shtml)

### 帮助

[](#帮助)

qq群

[![](https://camo.githubusercontent.com/b1f2ca6747507f62eeea098b1166cc22ff13aa0151f08ce31fb3a6a36037e6e3/68747470733a2f2f7773312e73696e61696d672e636e2f6d773639302f626331646663366167793166736d67337a616b36636a32306630306b6b3765692e6a7067)](https://camo.githubusercontent.com/b1f2ca6747507f62eeea098b1166cc22ff13aa0151f08ce31fb3a6a36037e6e3/68747470733a2f2f7773312e73696e61696d672e636e2f6d773639302f626331646663366167793166736d67337a616b36636a32306630306b6b3765692e6a7067)

### Todo

[](#todo)

- parameter verify

### Stargazers over time

[](#stargazers-over-time)

[![Stargazers over time](https://camo.githubusercontent.com/bebf2c239d40e214456fde408a82176cac1275f5e1b1c02ba356657e730444b0/68747470733a2f2f7374617263686172742e63632f6a7573746d64352f74656e63656e742d61692e737667)](https://starchart.cc/justmd5/tencent-ai)

### 感谢

[](#感谢)

- thanks to [hanson/foundation-sdk](https://github.com/Hanson/foundation-sdk)

### 源码列表

[](#源码列表)

SDK 联系人 QQ语言实现接口源代码&amp;SDK 地址783021975JAVAALL1361653339GolangALL1280827369NodeJS非全部接口实现

1109527533Python非全部接口实现(完善中)

1928881525.NET(C#)OCR接口实现人脸模块接口实现

[https://gitee.com/ch\_1928881525/Tentcent.Ai](https://gitee.com/ch_1928881525/Tentcent.Ai)910139966PHPALLLicense
-------

[](#license)

MIT

[![FOSSA Status](https://camo.githubusercontent.com/8be7d6d6dc88b3a87c13891c70ce9c148823b8a8e89bcf5519dc2f0881af21d4/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466a7573746d643525324674656e63656e742d61692e7376673f747970653d6c61726765)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjustmd5%2Ftencent-ai?ref=badge_large)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Every ~104 days

Recently: every ~219 days

Total

14

Last Release

1569d ago

### Community

Maintainers

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

---

Top Contributors

[![justmd5](https://avatars.githubusercontent.com/u/4120960?v=4)](https://github.com/justmd5 "justmd5 (20 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (1 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")

---

Tags

aiai-apiai-sdkqq-aiqq-ai-sdksdktencenttencent-aitencent-ai-sdksdkAI SDKtencenttencent-ai

### Embed Badge

![Health badge](/badges/justmd5-tencent-ai/health.svg)

```
[![Health](https://phpackages.com/badges/justmd5-tencent-ai/health.svg)](https://phpackages.com/packages/justmd5-tencent-ai)
```

###  Alternatives

[aws/aws-crt-php

AWS Common Runtime for PHP

423319.4M9](/packages/aws-aws-crt-php)[mohamed-ashraf-elsaed/claude-agent-sdk-laravel

Anthropic Claude Agent SDK for PHP &amp; Laravel — build AI agents with tool use, sandboxing, MCP servers, subagents, hooks, and structured output via the Claude Code CLI

171.1k](/packages/mohamed-ashraf-elsaed-claude-agent-sdk-laravel)

PHPackages © 2026

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