Red Ink - A one-stop Xiaohongshu image-and-text generator based on the Nano Banana Pro, "One Sentence, One Image: Generate Xiaohongshu Text and Images."
Red Ink - A one-stop Xiaohongshu image-and-text generator based on the Nano Banana Pro, "One Sentence, One Image: Generate Xiaohongshu Text and Images."
✨ Showcase
Type One Sentence, Get Complete Image & Text Posts
Step 1: Smart Outline Generation
Features:
✏️ Edit content for each page
Reorder pages (not recommended)
✨ Custom description per page (highly recommended)
Step 2: Cover Page Generation
Cover Highlights:
Matches your personal style
Accurate text rendering
Visually consistent and coordinated
Step 3: Batch Content Page Generation
Generation Notes:
⚡ Concurrent generation for all pages (up to 15 by default)
⚠️ Disable high concurrency in settings if your API doesn't support it
Regenerate individual pages you're not satisfied with
️ Tech Stack
Backend
Technology
Description
Language
Python 3.11+
Framework
Flask
Package Manager
uv
Text AI
Gemini 3
Image AI
Nano Banana Pro
Frontend
Technology
Description
Framework
Vue 3 + TypeScript
Build Tool
Vite
State Management
Pinia
Styling
Modern CSS
Deployment
Option 1: Docker (Recommended)
The simplest way — one command to start:
bash
docker run -d -p 12398:12398 -v ./history:/app/history -v ./output:/app/output histonemax/redink:latest
Web UI (Recommended): Visual configuration via the Settings page after starting the service
YAML Files: Edit config files directly
Text Generation Config
Config file: text_providers.yaml
yaml
# Active provideractive_provider:openaiproviders:# OpenAI or compatible APIopenai:type:openai_compatibleapi_key:sk-xxxxxxxxxxxxxxxxxxxxbase_url:https://api.openai.com/v1model:gpt-4o# Google Gemini (native API)gemini:type:google_geminiapi_key:AIzaxxxxxxxxxxxxxxxxxxxxxxxxxmodel:gemini-2.0-flash
Image Generation Config
Config file: image_providers.yaml
yaml
# Active provideractive_provider:geminiproviders:# Google Gemini image generationgemini:type:google_genaiapi_key:AIzaxxxxxxxxxxxxxxxxxxxxxxxxxmodel:gemini-3-pro-image-previewhigh_concurrency:false# OpenAI compatible APIopenai_image:type:image_apiapi_key:sk-xxxxxxxxxxxxxxxxxxxxbase_url:https://your-api-endpoint.commodel:dall-e-3high_concurrency:false
High Concurrency Mode
Off (default): Images generated one by one — suitable for GCP $300 trial accounts or rate-limited APIs
On: Images generated in parallel (up to 15 simultaneously) — faster but requires API support for high concurrency
⚠️ Not recommended for GCP $300 trial accounts — may trigger rate limits and cause generation failures.
⚠️ Notes
API Quota Limits:
Be aware of Gemini and image generation API call quotas
GCP trial accounts should keep high concurrency disabled
Generation Time:
Outline generation usually takes 15-30 seconds
Image generation takes time — please be patient (don't leave the page)
Contributing
Issues and Pull Requests are welcome!
If this project helps you, please give it a Star ⭐
Changelog
v1.4.3 (2026-06-30)
✨ Default outline length changed to 5 pages when the user does not specify a page count
✨ Added clearer outline generation loading copy: "please wait, this step usually takes 15-30 seconds"
️ Modularized image provider logic with reusable provider policy, API client, response extractor, rate limiter, and history image merger
Fixed GPT Image and Nano Banana compatible image APIs by omitting response_format by default and supporting b64_json, data URLs, and temporary image URLs
Added per-record image generation recovery so refreshes or retries reuse existing images instead of spending upstream quota again
Protected history records from empty image overwrites and status regressions; history reads can self-heal from task image folders
✨ Added structured Problem Details-style API errors and reusable frontend error cards with copyable diagnostics
Fixed provider connection tests for reasoning models that return reasoning_content or reasoning tokens without final content
Added backend coverage for image API compatibility, history merging, structured errors, cached generation, and reasoning-model connection tests
v1.4.2 (2026-03-15)
✨ Added English README as default with language toggle (中文/English)
✨ Added AI-generated English banner and showcase grid images