civitai-orchestration

Query Civitai Orchestration workflows, jobs, and generation results via API.

7.2k|734|Updated Oct 11, 2022
One-click install
npx skills add https://github.com/civitai/civitai --skill civitai-orchestration
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: civitai-orchestration
Source: https://github.com/civitai/civitai/tree/main/.claude/skills/civitai-orchestration
Command: npx skills add https://github.com/civitai/civitai --skill civitai-orchestration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dotenv.

What problem does it solve?

Investigating image and video generation jobs on the Civitai Orchestration platform requires manual API calls and JSON parsing. This Skill provides a command-line client to query workflows, inspect job details including content moderation scan results, and download generated media without writing custom API code.

Core Features & Use Cases

  • Workflow Querying: Search workflows by user ID, tags, metadata text, date range, or status with pagination support.
  • Job Inspection: Retrieve job details including prompt classification and moderation scan results like hive_csam_score and hive_vlm_summary from event context.
  • Result Retrieval: View or download generated images and videos from workflows or individual blobs, with optional NSFW handling.
  • Use Case: A trust-and-safety analyst investigating a flagged generation can run the job command with a job ID to immediately see the prompt classification, Hive scan scores, and resulting blob availability.

Quick Start

Ask the assistant to look up the details and scan results for a specific Civitai Orchestration job ID using the civitai-orchestration skill.

Frequently Asked Questions about civitai-orchestration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Civitai Orchestration workflows for a specific user?▼

Run the client with the user command followed by the Civitai user ID, for example node civitai-client.js user 12345. This uses the manager endpoint and requires an API token with Manager role. You can add options like --take, --tag, and --excludeFailed to filter results.

How do I view content moderation scan results for a generation job?▼

Use the job command with the job ID to fetch detailed job information. The output includes the lastEvent context containing scan fields such as hive_csam_score, hive_vlm_summary, blocked_reason, and nsfwLevel, plus prompt classification flags.

What authentication does the Civitai Orchestration API require?▼

The API requires a bearer token set as the CIVITAI_API_TOKEN environment variable, stored in the skill's .env file. Querying other users' workflows requires a token with Manager role; the consumer endpoints only return your own workflows.

Can I filter Civitai workflows by a specific status like failed or succeeded?▼

The API does not support filtering by an exact status value. It only offers an excludeFailed boolean to remove failed, canceled, and expired workflows. To isolate a specific status, retrieve workflows and filter client-side, or use tags and metadata when creating workflows.

How do I download generated images or videos from a workflow?▼

Use the results command with the workflow ID and the --download flag, optionally specifying --dir for the output directory. The client iterates through workflow steps, finds output blobs, and downloads each file with an inferred extension such as .png, .webp, or .mp4.

Why does a Civitai API request return a 401 or 429 error?▼

A 401 means the CIVITAI_API_TOKEN is invalid or expired, so verify the token in the .env file. A 429 indicates rate limiting, so wait before retrying. A 404 means the workflow or job ID does not exist, and 422 indicates invalid request parameters.