Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

nonebot-plugin-animeapi

为 NoneBot2 机器人提供动漫图片生成,由 AnimeAPI 驱动。AnimeAPI 是最便宜的动漫图片 API 之一:每张 $0.003,预付余额 $5 起、永不过期,无订阅。新账号免费 3 张,无需绑卡。

简体中文 · English · 日本語

安装

使用 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_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 的秒数

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 繁忙 提示稍后重试;失败的图片会退款

链接

Metadata

Release files for nonebot-plugin-animeapi 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-animeapi 1.0.1
File Size Uploaded Provenance Actions
nonebot_plugin_animeapi-1.0.1.tar.gz 9.8 kB Without provenance Details for nonebot_plugin_animeapi-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-animeapi 1.0.1
File Interpreter ABI Platform Actions
nonebot_plugin_animeapi-1.0.1-py3-none-any.whl Python 3 none any Details for nonebot_plugin_animeapi-1.0.1-py3-none-any.whl

Total release size: 19.7 kB

Release files / nonebot_plugin_animeapi-1.0.1.tar.gz

Download URL nonebot_plugin_animeapi-1.0.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fbf8ff44b660f24bc19a2e7bb3ffed857fa7f06b235f74adcc0d63f53a16869e
BLAKE2b-256 checksum
How to use checksums
e774533005082b5ee77004652b0955fc55aa1b7005572d09407e5dc7bc3d4f7a
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.1-py3-none-any.whl

Download URL nonebot_plugin_animeapi-1.0.1-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
457592ce773e7da1b118ae5fa966d812d8cb452629d2cb12f136d46fe6bab1ff
BLAKE2b-256 checksum
How to use checksums
2ce74cc4905c892f6e3aabbd2e6e6274042f4fdb6a908d55a5ee9646fb087373
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.1

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page