PHPackages                             ihome/wujie-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. [API Development](/categories/api)
4. /
5. ihome/wujie-ai

ActiveLibrary[API Development](/categories/api)

ihome/wujie-ai
==============

wujie-ai api sdk

v1.0.2(2y ago)14392MITPHPPHP &gt;=7.0

Since Aug 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ihome520/wujie-ai)[ Packagist](https://packagist.org/packages/ihome/wujie-ai)[ RSS](/packages/ihome-wujie-ai/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

 Wujie-Ai
==========

[](#-wujie-ai-)

无界AI 文生图、图生图、视频生视频相关接口SDK扩展包

[![Latest Stable Version](https://camo.githubusercontent.com/133a48c4971f3db7a451a456231011473b3ff7eeb68718487da57b9ff5511e96/68747470733a2f2f706f7365722e707567782e6f72672f69686f6d652f77756a69652d61692f762f737461626c65)](https://packagist.org/packages/ihome/wujie-ai)[![Total Downloads](https://camo.githubusercontent.com/3354044978de0bafff48d2d23e4917e6a0c492be8b8a3b5495bbb1478ed0b2de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c616e67756167652d7068702d626c7565)](https://packagist.org/packages/ihome/wujie-ai)[![Latest Unstable Version](https://camo.githubusercontent.com/ddaa2d3c6bf2bcaa3be4059cf579e8a6f51bb4626a4eeb44be6981a9eb2f5c74/68747470733a2f2f706f7365722e707567782e6f72672f69686f6d652f77756a69652d61692f762f756e737461626c65)](https://packagist.org/packages/ihome/wujie-ai)[![License](https://camo.githubusercontent.com/ead29424076a9590df908aec7b03768c394e8619de20ff7650b79a1e9fb75447/68747470733a2f2f706f7365722e707567782e6f72672f69686f6d652f77756a69652d61692f6c6963656e7365)](https://packagist.org/packages/ihome/wujie-ai)[![License](https://camo.githubusercontent.com/8337be7dc7879f2a57933b237fbe70168d09f0d39a8f8a8365f057d35f07d15a/68747470733a2f2f706f7365722e707567782e6f72672f69686f6d652f77756a69652d61692f726571756972652f706870)](https://packagist.org/packages/ihome/wujie-ai)

### 安装

[](#安装)

```
$ composer require ihome/wujie-ai -vvv
```

### 配置文件

[](#配置文件)

- 建议在使用的框架中，如ThinkPHP、Laravel等对应的config目录下新增 wujie.php 内容如下：

```

```

- 在 `.env` 文件上，新增

```
WUJIE_AI_APP_ID=xxxxxxxxxxxx
WUJIE_AI_PRIVATE_KEY=xxxxxxxxxxxxx
WUJIE_AI_BASE_URL=https://www.abc.com # 注意地址不含最后的斜杠

```

### 如何使用

[](#如何使用)

> 使用前，请向[无界AI](https://www.wujieai.com/)申请相关APPID、秘钥，这里假设你已经申请过了，如果没有申请，可以到官网找客服进行申请。

```
$config = [
    'appId' => config('wujie.app_id'),
    'privateKey' => config('wujie.private_key'),
    'baseUrl' => config('wujie.base_url'),
];

// 获取无界AI工厂实例
$wujie = WujieAiFactory::create($config);

// 获取数据 如果你使用了全局错误异常处理，此处可以不包 try-catch
try {
    // 文生图 & 图生图
    $result = $wujie->image->create([
                    'model_code' => 22,
                    'prompt' => '一个漂亮的年轻女孩，洛丽塔服装，长头发，瓜子脸，在原野上，手持法杖'
                ]); // 文生图，图生图根据官网参数传递
    $result = $wujie->image->baseModelInfos(); // 获取基础模型列表
    $result = $wujie->image->styleModelDefaultResource(); // 获取基础风格模型列表
    $result = $wujie->image->defaultResource(['model' => 22]); // 获取模型的预设资源
    $result = $wujie->image->priceInfos(['model' => 22,'uc_prompt' => '模糊，混乱', 'prompt' => '一个精致的现代风格女孩']); // 计算作画成本
    $result = $wujie->image->generatingInfo(['2C633CD85DW0D869AXSYYCDADE3CWXAA']);// 作画结果查询
    $result = $wujie->image->info(['key' => '2C633CD85DW0D869AXSYYCDADE3CWXAA']);// 作画成功后的图片详情查询

    // 视频生视频
    $result = $wujie->video->create([
                    'origin_video_url' => 'http://www.google.com/youtube/abc.mp4',
                    'video_duration' => 10,
                    'model_code' => 22,
              ]);  // 用视频生成另外一个风格的视频
    $result = $wujie->video->info(['key' => '2C633CD85DW0D869AXSYYCDADE3CWXAA']);// 视频生成成功后的视频详情查询
    $result = $wujie->video->generatingInfo(['2C633CD85DW0D869AXSYYCDADE3CWXAA']);// 视频生成结果查询
    $result = $wujie->video->optionMenu(); // 获取视频生视频模型列表及价格表
    $result = $wujie->video->waitTime(['modelCode' => 22]); // 视频生视频模型排队情况查询

    var_dump($result);
} catch (\Exception $e) {
    logger()->error('wujie', ['error' => $e->getMessage()]);
    // 其他业务逻辑处理
}
```

如有任何问题或者建议，欢迎在`Issues`中留言提出。。。

### 致谢

[](#致谢)

超哥的扩展包教程：[LX2 PHP 扩展包实战教程 - 从入门到发布](https://learnku.com/courses/creating-package)

### Other

[](#other)

如果您喜欢，欢迎Star，体验AI绘画，欢迎使用AIyaaa

[![](https://camo.githubusercontent.com/e7c5f93c1905d9743324aad445a55d4cfe9d7857037d6dcdc4e57676aca9c52d/68747470733a2f2f63646e2d75732e696d67732e6d6f652f323032332f30382f30352f363463646231323034616538302e6a7067)](https://cdn-us.imgs.moe/2023/08/05/64cdb1204ae80.jpg)

### License

[](#license)

MIT

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

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

Every ~0 days

Total

2

Last Release

1011d ago

### Community

Maintainers

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

---

Top Contributors

[![ihome520](https://avatars.githubusercontent.com/u/31379279?v=4)](https://github.com/ihome520 "ihome520 (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ihome-wujie-ai/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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