One-Click Generation of Xiaohongshu Notes! Using TikHub API + Coze + Claude to Convert Douyin Video Content
In the new media era dominated by short videos, cross-platform content operation has become a high-frequency and essential requirement. Today, we will build a highly practical AI workflow tool:
Input a Douyin video link, and automatically generate a Xiaohongshu-style note.
🧩 Tools Used
| Tool | Function |
|---|---|
| TikHub API | Retrieves Douyin video information, including title (desc), author, etc. |
| Coze Intelligent Agent | Manages automation workflows, processes structured input |
| Claude (Anthropic) | Language understanding and generation, responsible for rewriting into a Xiaohongshu-style note |
| (Optional) ffmpeg + whisper | Video-to-speech transcription (for supplementing content in long videos) |
🎯 Project Goals
- User inputs a Douyin video link or ID.
- The system automatically calls the TikHub API to retrieve the video title (desc).
- Extracts video audio (optional) and transcribes it.
- Uses Claude to rewrite it into a Xiaohongshu note format.
- Outputs a formatted graphic draft that can be directly published to Xiaohongshu.
🧱 Step-by-Step Breakdown
✅ Step 1: Calling the TikHub Interface to Retrieve Video Information
API Address:
1GET https://api.tikhub.io/api/v1/tiktok/app/v3/handler_video_info
2Example Code (Python):
1import requests
2
3headers = {
4 "Authorization": "Bearer YOUR_API_KEY"
5}
6
7params = {
8 "aweme_id": "7212321872392121343"
9}
10
11res = requests.get(
12 "https://api.tikhub.io/api/v1/tiktok/app/v3/handler_video_info",
13 params=params,
14 headers=headers
15)
16
17desc = res.json()["data"]["aweme_detail"]["desc"]
18print("Video Description:", desc)
19✅ Step 2 (Optional): Transcribing the Video
If you want to extract more information than just the video title, use the whisper model to transcribe the video audio:
1ffmpeg -i input.mp4 -vn -acodec pcm_s16le audio.wav
2whisper audio.wav --language ChineseThe output is the complete text script, which can be fed into Claude to enrich the context.
✅ Step 3: Calling Claude to Rewrite into Xiaohongshu Style
You can manage the workflow through Coze or directly call the Claude API.
Prompt Example:
1You are a seasoned Xiaohongshu blogger, skilled at writing high-quality lifestyle and "grass-planting" notes.
2
3Please write a Xiaohongshu graphic note based on the following Douyin video content, including:
41. Title (attractive, preferably with emoji)
52. Body (easy-to-understand, friendly, clear paragraphs)
63. Reasons for recommendation or usage experience
74. Add relevant hashtags at the end
8
9[Original Video Description]:
10"{desc}"
11
12[Transcription Content]:
13"{transcribe_result}"Output Example:
📌 Xiaohongshu Note Generation Example
Title: 🌿 5 Minutes Daily, This Homemade Green Bean Water Is Really Effective!
Body:
Recently, I've been feeling a bit hot and getting pimples. My mom recommended drinking green bean water every morning. At first, I thought it was pretty ordinary, but after drinking it for three days, my skin actually looked brighter!
My method is simple: soak the green beans overnight, then boil them in water the next day, filter out the residue, and refrigerate overnight. It's great for clearing heat and detoxifying!
This recipe is said to be recommended by many TCM practitioners as a summer cooling drink. It's perfect for busy office workers!
Recommendation:
- Low cost
- Easy to make
- A cup every morning, and I feel refreshed all day!
Tags:
#Green Bean Water #Summer Drink #Homemade Healthy Drink #Recommended Lifestyle Items
🌀 Workflow Integration (Coze + TikHub + Claude)
1[User Input Douyin Link]
2 ↓
3[TikHub Retrieves desc]
4 ↓
5[Optional: Whisper Transcribes Audio]
6 ↓
7[Coze Integrates Claude Call]
8 ↓
9[Generates Xiaohongshu Note Content]💡 Advanced Features
- Schedule batch retrieval of Douyin content → Generate X Xiaohongshu drafts daily
- Automate publishing to Xiaohongshu (can integrate with third-party automation interfaces)
- Support user-specified styles ("more colloquial/more literary style")
🔚 Summary
By combining TikHub + Claude + Coze, we can easily build a powerful cross-platform content migration tool, automatically generating high-quality Xiaohongshu notes from Douyin, saving operation teams 90% of content writing time.
📌 项目适合:
- Social media blogger operation assistance
- AI creation tool development
- Private domain grass-planting team efficiency improvement