← 返回
未分类 Key

Text-to-Carousel

Generate professional social media carousel images (Instagram, LinkedIn, TikTok, Xiaohongshu) from text content, articles, or URLs. Use when asked to create...
根据文本内容、文章或URL生成专业社交媒体轮播图片(Instagram、LinkedIn、TikTok、小红书)。当被要求创建时使用。
jiangyisheng9-bot jiangyisheng9-bot 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 316
下载
💾 0
安装
1
版本
#latest

概述

Text-to-Carousel

Generate professional carousel images from text content using Gemini image generation API.

Requirements

  • Gemini API key with billing enabled (check TOOLS.md or ask user)
  • Model: gemini-3-pro-image-preview (REQUIRED for correct Chinese/CJK text rendering)
  • VPN: May need US VPN if Gemini returns location errors

Workflow

1. Gather Input

Determine carousel content from one of:

  • Direct text/bullet points from user
  • Article URL (fetch and extract key points)
  • WordPress post (fetch via API)
  • User-provided topic (generate content)

Collect:

  • Brand info: name, colors, style (check TOOLS.md for known brands)
  • Product image: URL or path (for CTA slide)
  • Slide count: default 6 slides
  • Size: default 1024x1024
  • Language: detect from content

2. Plan Slide Structure

For health/product carousels, use this proven 6-slide structure:

#TypePurpose
------------------
1CoverHook + brand + topic
2ProblemWhy reader should care
3SolutionHow product/topic solves it
4DetailsKey features, data, ingredients
5Social ProofTestimonials, results, evidence
6CTAProduct image + buy/contact

For other structures, see references/prompt-patterns.md.

3. Write Prompts

For each slide, write a Gemini prompt following these rules:

Design prompt structure:

Create a [SIZE] [STYLE_PRESET] Instagram slide for [BRAND].

LAYOUT:
- Background: [COLORS/GRADIENT]
- [ELEMENT DESCRIPTIONS WITH EXACT TEXT]
- "[SLIDE_NUM] / [TOTAL]" bottom right

CRITICAL: All Chinese/CJK text must be exactly as written above.

Key rules:

  • Specify EXACT text to render — quote every Chinese character
  • Include slide number (e.g., "01 / 06")
  • Reference brand name and consistent color palette
  • For CTA slide with product image: attach the image via inlineData in API call
  • For style presets and templates, read references/prompt-patterns.md

4. Generate Images

Use scripts/generate_carousel.py or call Gemini API directly:

import urllib.request, json, base64

API_KEY = "..."  # from TOOLS.md
MODEL = "gemini-3-pro-image-preview"  # REQUIRED for CJK text
url = f"https://generativelanguage.googleapis.com/v1beta/models/{MODEL}:generateContent?key={API_KEY}"

parts = [{"text": prompt}]
# For CTA slide with product image:
# parts.insert(0, {"inlineData": {"mimeType": "image/jpeg", "data": base64_image}})

payload = {
    "contents": [{"parts": parts}],
    "generationConfig": {"responseModalities": ["image", "text"]}
}

data = json.dumps(payload).encode("utf-8")
req = urllib.request.Request(url, data=data, headers={"Content-Type": "application/json"})
resp = urllib.request.urlopen(req, timeout=180)
result = json.loads(resp.read())

Add 5-second delay between slides to avoid rate limits.

5. Verify Output

After generation, verify each slide with vision model:

  • Chinese/CJK text accuracy (character-level check)
  • Design consistency across slides
  • Product image visibility on CTA slide
  • Brand elements present (logo, colors, slide numbers)

If text is garbled, regenerate that slide. Pro model rarely fails on Chinese but verify anyway.

Model Selection Guide

ModelChinese TextDesign QualitySpeedUse When
----------------------------------------------------
gemini-3-pro-image-preview✅ Perfect✅ HighSlowerDefault choice — CJK content
gemini-2.5-flash-image❌ Garbled✅ HighFastEnglish-only content
gemini-3.1-flash-image-preview⚠️ Untested✅ HighFastTry for English content

Common Issues

ProblemSolution
-------------------
429 quota exceededCheck billing is linked to correct GCP project
Location not supportedUse US VPN
Chinese text garbledSwitch to gemini-3-pro-image-preview
Product image not matchingAttach actual product image via inlineData
Inconsistent design across slidesInclude brand color hex codes and style description in every prompt

File Structure

text-to-carousel/
├── SKILL.md                          # This file
├── scripts/
│   └── generate_carousel.py          # Batch generation script (config-driven)
└── references/
    └── prompt-patterns.md            # Design presets, slide templates, tips

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-21 14:25 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 331 📥 93,866
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 218 📥 47,706
design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 430 📥 116,998