civitai

Custom n8n nodes for Civitai API integration

Package Information

Released: 6 mo ago
Downloads: 4 weekly / 17 monthly
Latest Version: 1.0.0
Author: Community Developer

Available Nodes

Documentation generating…

Documentation

n8n-nodes-civitai

This is an n8n community node package that provides integration with the Civitai API. It allows you to interact with Civitai's models, images, creators, and tags directly from your n8n workflows.

Features

  • Model Operations: Get all models, get a specific model, retrieve model versions, and search by hash
  • Image Operations: Get all images, retrieve specific images
  • Creator Operations: Get all creators
  • Tag Operations: Get all tags
  • Authentication: Secure API key-based authentication

Installation

Using n8n UI

  1. Go to Settings → Community Nodes
  2. Click Install a community node
  3. Enter the package name: n8n-nodes-civitai
  4. Click Install

Using npm

npm install n8n-nodes-civitai

Setup

Prerequisites

Configuration

  1. In n8n, create a new credential of type Civitai API
  2. Enter your Civitai API key in the API Key field
  3. Save the credential
  4. Use the credential in your Civitai node

Usage

Example Workflow

  1. Add a Civitai node to your workflow
  2. Select your Civitai API credential
  3. Choose a Resource (Model, Image, Creator, or Tag)
  4. Choose an Operation (Get, Get All, etc.)
  5. Configure the operation parameters as needed
  6. Execute the workflow

Available Operations

Models

  • Get All: Retrieve a paginated list of models
    • Parameters: limit, page, sort (HighestRated, MostDownloaded, Newest)
  • Get: Retrieve a specific model by ID
    • Parameters: modelId
  • Get Model Version: Retrieve a specific model version
    • Parameters: versionId
  • Get Model Version By Hash: Retrieve a model version by its hash
    • Parameters: hash

Images

  • Get: Retrieve a specific image by ID
    • Parameters: imageId
  • Get All: Retrieve all images

Creators

  • Get All: Retrieve all creators

Tags

  • Get All: Retrieve all tags

Development

Prerequisites

  • Node.js 22 or higher
  • npm or pnpm

Installation

npm install

Build

npm run build

Development Mode

npm run dev

This will start n8n with your node loaded, allowing you to test it in real-time.

Linting

npm run lint
npm run lint:fix

Troubleshooting

Authentication Errors

  • Ensure your API key is valid and hasn't expired
  • Check that your Civitai account has API access enabled

Rate Limiting

  • Civitai API has rate limits. If you encounter rate limit errors, consider adding delays between requests

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues, questions, or suggestions, please open an issue on the GitHub repository.

Resources

Discussion