jackwener / jackwener/xiaohongshu-cli

支持文字生成图片(text2img)命令

Open
#69 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.6k
Forks
272
PR merge metrics
No merged PRs in 30d

Description

小红书创作平台有「文字配图」功能,通过接口 `POST /api/galaxy/v2/creator/post/inspiration/text2imgv3` 可根据文字生成多风格封面图片(基础/弥散/插图/简约/涂写等)。

目前 CLI 缺少这个能力,希望新增 `xhs text2img` 命令,支持:
- 输入文字,返回各风格图片 URL
- `--download` 下载图片到本地目录
- `--page` 翻页获取更多风格
- 复用现有 `_creator_post` + `_search_request_id`,自动接入反风控(限速/重试/验证码冷却)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing _creator_post and _search_request_id entry points and inspect how current CLI commands handle requests, retries, and rate limits. Implement the xhs text2img command against POST /api/galaxy/v2/creator/post/inspiration/text2imgv3, including style URLs, --download, and --page; done means generated images can be listed and optionally saved while reusing the existing anti-risk controls.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.