NovelAI Python SDK

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, Character References, ControlNet, etc.
- Utilities: Built-in PIL/Pillow integration, SSE streaming.
Comparison with Alternatives
| Feature | novelai-sdk | novelai-api | novelai-python |
|---|---|---|---|
| Type Safety (Pydantic v2) | ✅ | ❌ | ✅ |
| Async Support | ✅ | ✅ | ✅ |
| Image Generation | ✅ | ✅ | ✅ |
| Text Generation | 🚧 | ✅ | ✅ |
| Character Reference | ✅ | ❌ | ❌ |
| Multi-Character Positioning | ✅ | ❌ | ✅ |
| ControlNet / Vibe Transfer | ✅ | ❌ | ✅ |
| SSE Streaming | ✅ | ❌ | ✅ |
| Python 3.13+ | ✅ | ❌ | ❌ |
| Active Maintenance | ✅ | ✅ | ⚠️ |
✅ Supported | ❌ Not supported | 🚧 Planned | ⚠️ Limited maintenance
Where to Start?
- Getting Started: From installation to your first generation.
- Authentication: How to set up your API key.
- Examples: Practical usage examples.
Links
Disclaimer
This is an unofficial client library. Not affiliated with NovelAI. Requires an active NovelAI subscription.