Skip to main content

NovelAI shim and image CLI for OpenClaw-friendly usage.

Project description

🎨 NovelAI OpenClaw Adaptor

A seamless shim to connect NovelAI's API to OpenClaw using the OpenAI format.

"Solving the core pain point of integrating NovelAI with OpenClaw by providing a simple, OpenAI-compatible local proxy."

License: MIT Python 3.10+

Quick Start · How It Works · 简体中文 · 日本語

Preview 1 Preview 2 Preview 3 Preview 4
Preview 5 Preview 6 Preview 7 Preview 8

Why NovelAI OpenClaw Adaptor? 🌟

The core pain point for many users is that NovelAI's API cannot be directly integrated into OpenClaw, as OpenClaw expects the standard OpenAI API format.

To solve this, we created a shim (adaptor) that acts as a middleman. It translates OpenAI-formatted requests from OpenClaw into NovelAI-compatible requests, and returns the generated images seamlessly.

Additionally, it supports a simplified generation method: you can just pass your prompt directly to generate images without complex configurations!

Quick Start 🚀

📥 Install:

pip install novelai-openclaw-adaptor

⚙️ Initialize config:

novelai-config init

One-line init example:

novelai-config init --language en --api-key "YOUR_NOVELAI_API_KEY" --text-model glm-4-6 --image-output-dir "./images" --image-model nai-diffusion-4-5-full --force

▶️ Start the text model shim:

novelai-shim

🖼️ Generate an image:

novelai-image --prompt "1girl, solo, masterpiece, best quality"

Help:

novelai-config --help
novelai-shim --help
novelai-image --help

Connect to OpenClaw:

Tell OpenClaw directly:

Help me install novelai-openclaw-adaptor and add a new model provider "novelai": pip install novelai-openclaw-adaptor && novelai-config --help

Supported Models

Text models exposed by the shim:

  • glm-4-6
  • erato
  • kayra
  • clio
  • krake
  • euterpe
  • sigurd
  • genji
  • snek

Image models supported by the image CLI:

  • nai-diffusion-4-5-full
  • nai-diffusion-4-5-curated
  • nai-diffusion-4-full
  • nai-diffusion-4-curated
  • nai-diffusion-3
  • nai-diffusion-3-furry

How It Works ✨

  1. Local Proxy: The adaptor runs locally and provides an OpenAI-compatible endpoint (e.g., http://localhost:xxxx/v1).
  2. Format Translation: When OpenClaw sends an OpenAI-style request, the adaptor translates it into NovelAI's specific parameters.
  3. Simple Prompting: You can simply pass the prompt string to generate images.
  4. Configuration: In OpenClaw, set the base_url to your local adaptor address, for example http://127.0.0.1:11434/v1, and configure the model name as required.

License 📄

This project is released under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

novelai_openclaw_adaptor-0.1.4.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

novelai_openclaw_adaptor-0.1.4-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file novelai_openclaw_adaptor-0.1.4.tar.gz.

File metadata

  • Download URL: novelai_openclaw_adaptor-0.1.4.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for novelai_openclaw_adaptor-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8354d4df4a8a211d9c2d39efad889d7bfa8cc3f6624100c64a606c9ed1eec45d
MD5 bb4b8e6515718ec87f99d75c12544551
BLAKE2b-256 cd850574d1222d4564c8c0ae004b5afcb283c876de7786cbbe62001b3d30e4b8

See more details on using hashes here.

File details

Details for the file novelai_openclaw_adaptor-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for novelai_openclaw_adaptor-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c889d52b7c14043397b80ea9441f76e2a079b26a2f86c5bc351dac3dcdd0c7dc
MD5 d6ca71ac720d25926974c27d86086eb6
BLAKE2b-256 f351d40437c2f0e40c8a9ed37922a9bc9c664a35bf509e0665919ba5ff151b60

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page