NovelAI SDKNovelAI SDKunofficial

Overview

A modern, type-safe Python SDK for NovelAI's image generation API.

intro

PyPI version Python Version License Code style: ruff

A modern, type-safe Python SDK for NovelAI's image generation API. Designed for Developer Experience (DX) with full Pydantic v2 validation and complete type hints.

Key Features

  • Type Safety: Python 3.10+ support, robust validation with Pydantic v2.
  • High-Level API: Intuitive and easy-to-use interface.
  • Modern Features: Support for V4 models, Precise Reference (Character Reference), ControlNet, etc.
  • Utilities: Built-in PIL/Pillow integration, SSE streaming.

Comparison with Alternatives

Featurenovelai-sdknovelai-apinovelai-python
Type Safety (Pydantic v2)✅❌✅
Async Support✅✅✅
Image Generation✅✅✅
Text Generation🚧✅✅
Precise Reference✅❌❌
Multi-Character Positioning✅❌✅
ControlNet / Vibe Transfer✅❌✅
SSE Streaming✅❌✅
Python 3.10+✅❌❌
Active Maintenance✅✅⚠️

✅ Supported · ❌ Not supported · 🚧 Planned · ⚠️ Limited maintenance

Data Model Architecture

The library is designed with two distinct layers of data models:

Model Architecture

  1. User Model (Recommended): User-friendly models with sensible defaults and automatic validation.
  2. API Model: Direct 1:1 mapping to NovelAI's API endpoints, primarily used internally.

Where to Start?

Disclaimer

This is an unofficial client library. Not affiliated with NovelAI. Requires an active NovelAI subscription.

On this page