This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.0.1 instead.
Reason given by maintainers: Superseded by 1.0.1. The allow_nsfw option was removed: AnimeAPI does not generate adult content.
nonebot-plugin-animeapi
为 NoneBot2 机器人提供动漫图片生成,由 AnimeAPI 驱动。AnimeAPI 是最便宜的动漫图片 API 之一:每张 $0.003,预付余额 $5 起、永不过期,无订阅。新账号免费 3 张,无需绑卡。
安装
使用 nb-cli(推荐):
nb plugin install nonebot-plugin-animeapi
或使用包管理器安装后,在 pyproject.toml 的 [tool.nonebot] 中加入 plugins = ["nonebot_plugin_animeapi"]:
pip install nonebot-plugin-animeapi
配置
在 .env 中填写密钥(以 ank_ 开头),密钥在 https://animeapi.ai/dashboard/api-keys 创建:
ANIMEAPI_KEY=ank_xxxxxxxx
| 配置项 | 默认 | 说明 |
|---|---|---|
ANIMEAPI_KEY |
空 | AnimeAPI 密钥(必填) |
ANIMEAPI_MODEL |
anime |
每张 anime $0.003、ultra $0.01、ultra-max $0.02 |
ANIMEAPI_ORIENTATION |
portrait |
portrait(竖)、square(方)、landscape(横),价格相同 |
ANIMEAPI_ALLOW_NSFW |
false |
默认关闭 NSFW 输出。被标记的图片会被拒绝并退款,不会发到聊天中 |
ANIMEAPI_ENHANCE |
true |
自动把提示词改写为标签(anime 模型) |
ANIMEAPI_COOLDOWN |
30 |
每位用户两次生成之间的间隔(秒),0 为不限制 |
ANIMEAPI_ALLOW_MODEL_OVERRIDE |
false |
是否允许用户用 -m 选择模型。默认关闭,避免用户选用更贵的模型 |
ANIMEAPI_SHOW_PROMPT |
false |
同时发送模型实际收到的标签 |
ANIMEAPI_LANGUAGE |
zh |
机器人回复语言:zh、en、ja |
ANIMEAPI_TIMEOUT |
120 |
等待 AnimeAPI 的秒数 |
使用
/anime 雨天公交站打着红伞的女孩
/anime -o landscape 秋天的神社,落叶纷飞
/anime -m ultra a cafe chalkboard that reads OPEN LATE
直接用自然语言描述即可,AnimeAPI 会自动改写为 anime 模型使用的标签。指令别名:/animeapi。命令前缀取决于你的 COMMAND_START。
通过 nonebot-plugin-alconna 发送图片,支持 OneBot、QQ、Telegram、Discord、Kook、飞书等适配器。
用户可能看到的提示
| 情况 | 回复 |
|---|---|
| 余额不足 | 提示管理员前往 https://animeapi.ai/dashboard/billing 充值 |
| 密钥无效或已撤销 | 提示管理员检查密钥 |
| 模型拒绝了提示词 | 显示原因,不扣费 |
| 冷却中 | 显示剩余秒数 |
| AnimeAPI 繁忙 | 提示稍后重试;失败的图片会退款 |
链接
- AnimeAPI:https://animeapi.ai · 文档 · API 参考
- 许可证:MIT
Metadata
Release files for nonebot-plugin-animeapi 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_animeapi-1.0.0.tar.gz | 10.0 kB | Without provenance | Details for nonebot_plugin_animeapi-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_animeapi-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_animeapi-1.0.0-py3-none-any.whl |
Total release size: 20.3 kB
Release files / nonebot_plugin_animeapi-1.0.0.tar.gz
| Download URL | nonebot_plugin_animeapi-1.0.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51bd725ff82fe48a187776d7e20d9382bd2c917865bc91a9106734258895dd99
|
|
BLAKE2b-256 checksum How to use checksums |
0377b080acc2ada3528678e6267c1ee7ccd3de49043d3541999eb59f188f5146
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Omarchy","version":"4.5.0","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / nonebot_plugin_animeapi-1.0.0-py3-none-any.whl
| Download URL | nonebot_plugin_animeapi-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
252e5799acf61d64ba84436bcc616a53fc86cee563272801290d8beaa0089436
|
|
BLAKE2b-256 checksum How to use checksums |
125a1092b3ddaa8c5fa0ca8aa55d8fc360a79aa2303744abcfc20a285be878cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Omarchy","version":"4.5.0","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for nonebot-plugin-animeapi 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.