civitai-orchestration
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCivitai Orchestration
Civitai Orchestration
Interact with the Civitai Orchestration API to query workflows, view job details, and retrieve generation results.
与Civitai Orchestration API交互,查询工作流、查看任务详情并获取生成结果。
Quick Start
快速开始
bash
undefinedbash
undefinedQuery workflows for a specific user
查询特定用户的工作流
node .claude/skills/civitai-orchestration/civitai-client.js user 12345
node .claude/skills/civitai-orchestration/civitai-client.js user 12345
Get a specific workflow by ID
通过ID获取特定工作流
node .claude/skills/civitai-orchestration/civitai-client.js workflow <workflowId>
node .claude/skills/civitai-orchestration/civitai-client.js workflow <workflowId>
Get job details with scan results (hive_csam_score, etc.)
获取包含扫描结果的任务详情(如hive_csam_score等)
node .claude/skills/civitai-orchestration/civitai-client.js job <jobId>
node .claude/skills/civitai-orchestration/civitai-client.js job <jobId>
Get step details from a workflow
获取工作流中的步骤详情
node .claude/skills/civitai-orchestration/civitai-client.js step <workflowId> <stepName>
node .claude/skills/civitai-orchestration/civitai-client.js step <workflowId> <stepName>
Download result images/videos from a workflow
下载工作流生成的图像/视频结果
node .claude/skills/civitai-orchestration/civitai-client.js results <workflowId>
undefinednode .claude/skills/civitai-orchestration/civitai-client.js results <workflowId>
undefinedSearching & Filtering
搜索与筛选
By User ID
按用户ID筛选
bash
undefinedbash
undefinedGet workflows for user 12345
获取用户12345的工作流
node civitai-client.js user 12345
node civitai-client.js user 12345
With options
带参数选项
node civitai-client.js user 12345 --take=5 --excludeFailed
undefinednode civitai-client.js user 12345 --take=5 --excludeFailed
undefinedBy Workflow ID
按工作流ID筛选
bash
undefinedbash
undefinedDirect lookup by workflow ID
通过工作流ID直接查询
node civitai-client.js workflow 0-019be44b-181e-7a7e-ab1b-b58dc7610dca
undefinednode civitai-client.js workflow 0-019be44b-181e-7a7e-ab1b-b58dc7610dca
undefinedBy Date Range
按日期范围筛选
Note: Date filtering may have limited functionality depending on API access level.
bash
undefined注意: 根据API访问权限,日期筛选功能可能受限。
bash
undefinedWorkflows from the last 7 days
查询过去7天的工作流
node civitai-client.js workflows --from=2024-01-15 --to=2024-01-22
node civitai-client.js workflows --from=2024-01-15 --to=2024-01-22
Workflows from a specific day
查询特定一天的工作流
node civitai-client.js workflows --from=2024-01-20 --to=2024-01-20
node civitai-client.js workflows --from=2024-01-20 --to=2024-01-20
Dates are assumed to be UTC. Add Z suffix for explicit UTC:
日期默认采用UTC时区,可添加Z后缀明确指定:
node civitai-client.js workflows --from=2024-01-20T06:00:00Z --to=2024-01-20T12:00:00Z
**Alternative:** Use `--oldest` to get workflows from oldest first, then paginate:
```bashnode civitai-client.js workflows --from=2024-01-20T06:00:00Z --to=2024-01-20T12:00:00Z
**替代方案:** 使用`--oldest`参数按从旧到新排序,然后进行分页:
```bashGet oldest workflows first
先获取最早的工作流
node civitai-client.js workflows --oldest --take=50
undefinednode civitai-client.js workflows --oldest --take=50
undefinedBy Tags
按标签筛选
Tags are set when workflows are created. Common tag patterns:
bash
undefined标签在创建工作流时设置,常见标签模式:
bash
undefinedFilter by a specific tag
按特定标签筛选
node civitai-client.js workflows --tag=user:12345
node civitai-client.js workflows --tag=user:12345
Note: Multiple tags can be specified (AND logic)
注意:可指定多个标签(逻辑与)
node civitai-client.js workflows --tag=project:myproject --tag=type:image
undefinednode civitai-client.js workflows --tag=project:myproject --tag=type:image
undefinedBy Metadata Search
按元数据搜索
The option searches workflow metadata:
--querybash
undefined使用选项搜索工作流元数据:
--querybash
undefinedSearch metadata for a string
在元数据中搜索"portrait"
node civitai-client.js workflows --query="portrait"
undefinednode civitai-client.js workflows --query="portrait"
undefinedBy Status
按状态筛选
The API supports excluding failed workflows but not filtering by specific status:
bash
undefinedAPI支持排除失败的工作流,但不支持按特定状态筛选:
bash
undefinedExclude failed/canceled workflows (get only succeeded/processing)
排除失败/已取消的工作流(仅获取成功/处理中的任务)
node civitai-client.js workflows --excludeFailed
node civitai-client.js workflows --excludeFailed
Include all statuses (default behavior)
包含所有状态(默认行为)
node civitai-client.js workflows
**Note:** To find specific statuses, retrieve workflows and filter client-side, or use metadata/tags when creating workflows for better filtering.node civitai-client.js workflows
**注意:** 如需查找特定状态的任务,可获取工作流后在客户端进行筛选,或在创建工作流时使用元数据/标签以便更好地筛选。Pagination
分页
bash
undefinedbash
undefinedGet 50 results
获取50条结果
node civitai-client.js workflows --take=50
node civitai-client.js workflows --take=50
Get next page using cursor from previous response
使用上一次响应中的cursor获取下一页
node civitai-client.js workflows --take=20 --cursor=<nextCursor>
undefinednode civitai-client.js workflows --take=20 --cursor=<nextCursor>
undefinedCombined Filters
组合筛选
bash
undefinedbash
undefinedSuccessful workflows for a specific tag, excluding failures
获取特定标签下的成功工作流,排除失败任务
node civitai-client.js workflows
--tag=user:12345
--excludeFailed
--take=50
--tag=user:12345
--excludeFailed
--take=50
node civitai-client.js workflows
--tag=user:12345
--excludeFailed
--take=50
--tag=user:12345
--excludeFailed
--take=50
Get workflows with metadata search
结合元数据搜索的工作流
node civitai-client.js workflows
--query="portrait"
--excludeFailed
--take=20
--query="portrait"
--excludeFailed
--take=20
undefinednode civitai-client.js workflows
--query="portrait"
--excludeFailed
--take=20
--query="portrait"
--excludeFailed
--take=20
undefinedCommands Reference
命令参考
test
test
Test API connection and verify credentials.
bash
node civitai-client.js test测试API连接并验证凭证。
bash
node civitai-client.js testuser
user
Query workflows for a specific user by their Civitai user ID.
bash
node civitai-client.js user <userId> [options]Options:
| Option | Description |
|---|---|
| Number of results (max 10 per API limit) |
| Filter by tag |
| Search workflow metadata |
| Exclude failed/canceled workflows |
| Sort from oldest to newest |
通过Civitai用户ID查询特定用户的工作流。
bash
node civitai-client.js user <userId> [options]选项:
| 选项 | 描述 |
|---|---|
| 返回结果数量(API限制最多10条) |
| 按标签筛选 |
| 搜索工作流元数据 |
| 排除失败/已取消的工作流 |
| 按从旧到新排序 |
workflows
workflows
List and search workflows with optional filters.
bash
node civitai-client.js workflows [options]Options:
| Option | Description |
|---|---|
| Filter by tag (can specify multiple) |
| Search workflow metadata |
| Exclude failed/canceled workflows |
| Sort from oldest to newest |
| Number of results (default: 20) |
| Pagination cursor |
| Start date (may have limited support) |
| End date (may have limited support) |
列出并搜索工作流,支持可选筛选条件。
bash
node civitai-client.js workflows [options]选项:
| 选项 | 描述 |
|---|---|
| 按标签筛选(可指定多个) |
| 搜索工作流元数据 |
| 排除失败/已取消的工作流 |
| 按从旧到新排序 |
| 返回结果数量(默认:20) |
| 分页游标 |
| 开始日期(支持可能受限) |
| 结束日期(支持可能受限) |
workflow
workflow
Get details of a specific workflow.
bash
node civitai-client.js workflow <workflowId> [--wait]Options:
| Option | Description |
|---|---|
| Wait/poll for completion (with timeout) |
获取特定工作流的详情。
bash
node civitai-client.js workflow <workflowId> [--wait]选项:
| 选项 | 描述 |
|---|---|
| 等待/轮询工作流完成(带超时) |
job
job
Get details of a specific job including scan results from event context.
This is useful for investigating content moderation results - the contains scan scores like and .
lastEvent.contexthive_csam_scorehive_vlm_summarybash
node civitai-client.js job <jobId> [--raw]Options:
| Option | Description |
|---|---|
| Output raw JSON instead of formatted summary |
Example output:
Job Summary:
ID: 58de87d7-d594-4d71-ae43-dd8fc1bcbd23
Type: TextToImageV2
Workflow ID: 8484131-20260121222126332
Prompt Classification: sexual, young, scan
Results (2 blob(s)):
- JNFDW54JNTATNW42HACYCWSQP0.jpeg (available: true)
Last Event:
Type: Succeeded
Provider: ValdiAI
Event Context (scan results, metrics):
** hive_csam_score: 0.00 %, 0.00 %
** hive_vlm_summary: X, No_Child获取特定任务的详情,包括事件上下文的扫描结果。
此命令适用于调查内容审核结果 - 包含扫描分数,如和。
lastEvent.contexthive_csam_scorehive_vlm_summarybash
node civitai-client.js job <jobId> [--raw]选项:
| 选项 | 描述 |
|---|---|
| 输出原始JSON而非格式化摘要 |
示例输出:
Job Summary:
ID: 58de87d7-d594-4d71-ae43-dd8fc1bcbd23
Type: TextToImageV2
Workflow ID: 8484131-20260121222126332
Prompt Classification: sexual, young, scan
Results (2 blob(s)):
- JNFDW54JNTATNW42HACYCWSQP0.jpeg (available: true)
Last Event:
Type: Succeeded
Provider: ValdiAI
Event Context (scan results, metrics):
** hive_csam_score: 0.00 %, 0.00 %
** hive_vlm_summary: X, No_Childstep
step
Get details of a specific step within a workflow.
bash
node civitai-client.js step <workflowId> <stepName>获取工作流中特定步骤的详情。
bash
node civitai-client.js step <workflowId> <stepName>results
results
Download or view results (images/videos) from a workflow.
bash
node civitai-client.js results <workflowId> [--download] [--dir=<path>]Options:
| Option | Description |
|---|---|
| Download result files |
| Download directory (default: ./civitai-downloads) |
查看或下载工作流生成的图像/视频结果。
bash
node civitai-client.js results <workflowId> [--download] [--dir=<path>]选项:
| 选项 | 描述 |
|---|---|
| 下载结果文件 |
| 下载目录(默认:./civitai-downloads) |
blob
blob
Get a blob (image/video) by ID with optional NSFW handling.
bash
node civitai-client.js blob <blobId> [--download] [--nsfw]通过ID获取二进制对象(图像/视频),支持NSFW内容处理选项。
bash
node civitai-client.js blob <blobId> [--download] [--nsfw]Environment Variables
环境变量
Stored in :
.claude/skills/civitai-orchestration/.envenv
CIVITAI_API_TOKEN=your_bearer_token
CIVITAI_API_URL=https://orchestration-new.civitai.com存储在中:
.claude/skills/civitai-orchestration/.envenv
CIVITAI_API_TOKEN=your_bearer_token
CIVITAI_API_URL=https://orchestration-new.civitai.comAPI Reference
API参考
Workflow Query Parameters
工作流查询参数
The workflows endpoint supports these query parameters:
- - Array of tags to filter by
tags - - Search workflow metadata
query - /
fromDate- Date range (ISO 8601) - may have limited supporttoDate - - Pagination cursor
cursor - - Number of results (default: 100)
take - - Exclude failed/expired/canceled workflows (boolean)
excludeFailed - - Sort oldest to newest (boolean)
ascending
工作流端点支持以下查询参数:
- - 用于筛选的标签数组
tags - - 搜索工作流元数据
query - /
fromDate- 日期范围(ISO 8601格式)- 支持可能受限toDate - - 分页游标
cursor - - 结果数量(默认:100)
take - - 是否排除失败/过期/已取消的工作流(布尔值)
excludeFailed - - 按从旧到新排序(布尔值)
ascending
Workflow Statuses
工作流状态
| Status | Description |
|---|---|
| Workflow being prepared |
| Scheduled for execution |
| Currently running |
| Completed successfully |
| Failed with error |
| Was canceled |
| Timed out |
| Deleted |
| 状态 | 描述 |
|---|---|
| 工作流准备中 |
| 已调度待执行 |
| 执行中 |
| 执行成功 |
| 执行失败 |
| 已取消 |
| 已超时 |
| 已删除 |
Step Types (Recipes)
步骤类型(任务模板)
Image/Video generation steps you might encounter:
- - Text to image generation
textToImage - - General image generation
imageGen - - Video generation
videoGen - - Video upscaling/enhancement
videoEnhancement - - Extract frames from video
videoFrameExtraction - - Upscale video
videoUpscaler - - Frame interpolation
videoInterpolation - - Convert image formats
convertImage - - ComfyUI workflow execution
comfy
你可能会遇到的图像/视频生成步骤:
- - 文本转图像生成
textToImage - - 通用图像生成
imageGen - - 视频生成
videoGen - - 视频增强/超分
videoEnhancement - - 从视频中提取帧
videoFrameExtraction - - 视频超分
videoUpscaler - - 帧插值
videoInterpolation - - 图像格式转换
convertImage - - 执行ComfyUI工作流
comfy
Examples
示例
Query a user's recent image generations
查询用户近期的图像生成任务
bash
undefinedbash
undefinedGet user 12345's recent workflows
获取用户12345的近期工作流
node civitai-client.js user 12345
node civitai-client.js user 12345
Exclude failed jobs
排除失败任务
node civitai-client.js user 12345 --excludeFailed
undefinednode civitai-client.js user 12345 --excludeFailed
undefinedGet workflow and view results
获取工作流并查看结果
bash
undefinedbash
undefinedGet workflow details
获取工作流详情
node civitai-client.js workflow abc123-def456
node civitai-client.js workflow abc123-def456
View/download results
查看并下载结果
node civitai-client.js results abc123-def456 --download --dir=./my-images
undefinednode civitai-client.js results abc123-def456 --download --dir=./my-images
undefinedPaginate through workflows
分页查询工作流
bash
undefinedbash
undefinedFirst page
第一页
node civitai-client.js workflows --take=10
node civitai-client.js workflows --take=10
Next page (use cursor from previous response)
下一页(使用上一次响应中的cursor)
node civitai-client.js workflows --take=10 --cursor=<nextCursor>
undefinednode civitai-client.js workflows --take=10 --cursor=<nextCursor>
undefinedError Handling
错误处理
| Error Code | Meaning |
|---|---|
| 401 | Invalid or expired token - check CIVITAI_API_TOKEN |
| 404 | Workflow/Job not found |
| 429 | Rate limited - wait before retrying |
| 422 | Invalid parameters |
| 错误码 | 含义 |
|---|---|
| 401 | 令牌无效或过期 - 检查CIVITAI_API_TOKEN |
| 404 | 工作流/任务不存在 |
| 429 | 请求频率超限 - 稍后重试 |
| 422 | 参数无效 |
Output
输出说明
The command displays workflow summaries including:
user- Workflow ID, status, timestamps
- Step types (textToImage, videoGen, comfy, etc.)
- Prompts for text-to-image generations
For raw JSON output, use the workflow command:
bash
node civitai-client.js workflow <workflowId>user- 工作流ID、状态、时间戳
- 步骤类型(如textToImage等)
- 文本转图像生成的提示词
如需原始JSON输出,可使用workflow命令:
bash
node civitai-client.js workflow <workflowId>