← 返回
未分类 Key 中文

Civitai API

Query the Civitai public REST API to search models, inspect creators, fetch model or version details, reverse-lookup models by hash, list images or tags, and...
查询 Civitai 公共 REST API,搜索模型、检查创作者、获取模型或版本详情、通过哈希逆向查找模型、列出图像或标签等。
stanestane stanestane 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 358
下载
💾 0
安装
1
版本
#latest

概述

Civitai API

Use this skill to work with Civitai from the local workspace without re-deriving endpoints and auth each time.

Quick start

Store the token in the workspace .env file as:

CIVITAI_API_KEY=...

Use the bundled script:

python .\skills\civitai-api\scripts\civitai.py models --query "flux lora" --limit 5
python .\skills\civitai-api\scripts\civitai.py model 12345
python .\skills\civitai-api\scripts\civitai.py version 67890
python .\skills\civitai-api\scripts\civitai.py by-hash SHA256_OR_AUTOV2_HASH
python .\skills\civitai-api\scripts\civitai.py creators --query "someuser"
python .\skills\civitai-api\scripts\civitai.py tags --query anime
python .\skills\civitai-api\scripts\civitai.py images --model-id 12345 --limit 10
python .\skills\civitai-api\scripts\civitai.py download-url 67890

Workflow

1. Find the thing

When the user has a vague name or concept, start with:

python .\skills\civitai-api\scripts\civitai.py models --query "search text" --limit 10

Useful optional filters include --types, --tag, --username, --sort, --period, --cursor, and --nsfw true|false.

2. Expand the record

Once you have a model id, inspect the full model payload:

python .\skills\civitai-api\scripts\civitai.py model <modelId>

Use this to pull:

  • version ids
  • files and hashes
  • tags
  • creator info
  • images
  • download URLs already present in the payload

3. Inspect a specific version

When the user already knows the version id, or you need file-level details:

python .\skills\civitai-api\scripts\civitai.py version <modelVersionId>

4. Reverse-lookup by hash

When the user has a local file hash and wants to identify it:

python .\skills\civitai-api\scripts\civitai.py by-hash <hash>

5. Build a direct download URL

When the user wants an authenticated download URL, build it with:

python .\skills\civitai-api\scripts\civitai.py download-url <modelVersionId>

Optional download selectors:

  • --type
  • --format
  • --size
  • --fp

Use the generated URL directly in a browser or another download tool. Treat the resulting URL as sensitive because it may include ?token=....

Pagination note

Civitai search endpoints may use cursor-based pagination. When the response includes metadata.nextCursor, pass that value back with --cursor instead of forcing --page on search queries.

Auth rules

  • Prefer Authorization: Bearer for JSON API calls.
  • Use ?token= only for direct download URLs.
  • Keep tokens in .env, not in the skill files.

References

Read references/api-notes.md when you need a compact reminder of endpoints, auth, filters, and workflow hints.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 16:38 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,164 📥 936,209
professional

Game Design Emotional Canvas

stanestane
定义、细化并评估游戏、功能、活动、地区或内容主题的情感认同、感觉、氛围与基调。用于塑造游戏。
★ 0 📥 562
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 865 📥 344,926