关于 Book Cover Generation
Book Cover Generation 是基于 each::sense API 的封面生成技能,面向作者和出版设计者,可制作多种类型与格式的图稿,并通过会话延续系列视觉风格。
主要功能
- 01生成小说与非虚构类封面
- 02制作电子书和有声书封面
- 03按类型匹配视觉风格
- 04跨系列保持视觉一致性
适用场景
- 01为悬疑或浪漫小说设计封面
- 02制作方形有声书封面
- 03探索电子书系列的统一设计
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ eachlabs/ skills --skill book-cover-generation安装后在 Claude Code 中输入/book-cover-generation确认已加载。
附带文件references/SSE-EVENTS.md
详细介绍
书籍封面生成
使用 each::sense API 生成惊艳的书籍封面、电子书封面和有声书封面图。创作符合类型特点的设计,展现书籍精髓并吸引读者。
概述
each::sense API 支持 AI 驱动的书籍封面生成,包括:
- 小说封面:惊悚、爱情、科幻、奇幻、文学小说
- 非虚构类封面:自助、商业、回忆录、传记、历史
- 电子书封面:针对在线市场优化的数字设计
- 有声书封面:适用于音频平台的方形封面图
- 类型专属风格:符合读者预期和市场惯例的设计
- 系列一致性:在书籍系列中保持视觉品牌一致
快速入门
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a book cover for a psychological thriller titled \"The Silent Witness\" by Sarah Mitchell. Dark, moody atmosphere with a shadowy figure standing at a window. Include space for the title at the top."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
书籍封面类型
| 类型 | 视觉风格 | 关键元素 |
|---|---|---|
| 惊悚/悬疑 | 黑暗、紧张 | 阴影、剪影、戏剧性光线 |
| 爱情 | 温暖、动人 | 情侣、柔和光线、亲密场景 |
| 科幻 | 未来感、宇宙风 | 太空、科技、异世界景观 |
| 奇幻 | 魔幻、史诗感 | 神话生物、魔法场景 |
| 自助 | 简洁、鼓舞人心 | 极简设计、振奋人心的图像 |
| 商业 | 专业、大胆 | 简洁的排版空间、企业美学 |
| 回忆录 | 个人化、真实 | 摄影元素、亲密感 |
| 儿童读物 | 色彩缤纷、活泼 | 插画、角色、鲜艳色彩 |
使用案例
惊悚/悬疑封面
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Design a book cover for a crime thriller called \"Dead End Road\". Show an abandoned car on a foggy rural road at night, headlights cutting through mist. Ominous atmosphere with dark blues and blacks. Leave clear space at the top third for the title text."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
爱情小说封面
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a contemporary romance book cover. A couple silhouetted against a sunset on a beach, warm golden and pink tones. Romantic and dreamy atmosphere. The composition should have open space at the top for the title and bottom for author name. Soft, painterly style."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
科幻/奇幻封面
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate an epic fantasy book cover showing a lone warrior standing on a cliff overlooking a vast magical kingdom with floating islands and a massive dragon silhouette in the stormy sky. Rich purples, deep blues, and golden highlights. Epic cinematic composition with title space at top."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
自助/商业书籍
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Design a minimalist self-help book cover. Abstract representation of personal growth - a small seedling transforming into a flourishing tree. Clean white background with teal and gold accents. Modern, professional aesthetic with plenty of negative space for large typography."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
回忆录/传记
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a memoir book cover with a nostalgic, vintage feel. An old photograph-style image of a weathered wooden porch with a rocking chair, faded sepia tones blending into modern color. Evokes memory and reflection. Elegant, literary design with space for a centered title."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
儿童读物封面
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Design a colorful children's book cover featuring a brave little fox wearing a red scarf, exploring an enchanted forest with glowing mushrooms and friendly woodland creatures. Whimsical illustration style with bright, cheerful colors. Large clear area at top for playful title text."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
食谱封面
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a cookbook cover with a rustic, appetizing aesthetic. A beautifully arranged overhead shot of fresh Mediterranean ingredients - olive oil, tomatoes, herbs, artisan bread on a worn wooden table. Warm, inviting lighting. Clean space at top for title and bottom for subtitle."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
诗集
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Design an artistic poetry book cover. Abstract watercolor imagery with flowing shapes suggesting nature and emotion - soft petals, flowing water, gentle gradients. Muted earth tones with touches of deep rose. Ethereal, contemplative mood. Minimalist composition with centered title area."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
有声书封面(方形格式)
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a square audiobook cover for a historical fiction novel set in 1920s Paris. Show the Eiffel Tower at twilight with art deco styling, a mysterious woman in silhouette wearing a cloche hat. Rich golds, deep burgundy, and midnight blue. Bold, legible design that works at small sizes. Square 1:1 aspect ratio."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}'
电子书系列(风格统一)
使用 session_id 在书籍系列中保持视觉一致性:
# First book in series
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create the first book cover for a urban fantasy series. A city skyline at night with magical energy swirling through the streets, a hooded figure with glowing eyes. Dark purples and electric blues with neon accents. Consistent banner area at top for series branding and title."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "fantasy-series-covers",
"mode": "max"
}'
# Second book - same session for consistency
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create the second book cover in the same urban fantasy series style. Same hooded figure now standing in an ancient underground chamber with mystical runes glowing on the walls. Maintain the same color palette of dark purples, electric blues, and neon accents. Same banner layout for series consistency."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "fantasy-series-covers",
"mode": "max"
}'
书籍封面最佳实践
类型惯例
遵循既定的类型视觉语言,满足读者预期:
- 惊悚类读者期待黑暗、紧张的图像
- 爱情类读者喜欢动人、亲密的场景
- 科幻类读者期待未来感或宇宙元素
- 商业类读者偏好简洁、专业的设计
预留标题空间
务必明确指定文字放置区域:
- 为标题预留顶部三分之一的空间
- 在底部留出作者姓名的位置
- 印刷版需考虑书脊区域
- 避免将重要图像放在文字覆盖的区域
缩略图测试
针对多种查看尺寸进行设计:
- 封面在较小尺寸下(在线商店中)也必须易于识别
- 使用高对比度和醒目的元素
- 避免使用缩略图尺寸下会消失的精细细节
- 在不同尺寸下测试文字的易读性
印刷版与数字版
考虑最终格式:
- 印刷版:考虑出血、书脊和封底
- 电子书:针对屏幕查看进行优化
- 有声书:采用方形格式,并确保在极小尺寸下也适用
提示词技巧
情绪与氛围
具体描述情绪基调:
- “阴森紧张”与“黑暗神秘”
- “温暖浪漫”与“热情奔放”
- “奇趣活泼”与“魔幻迷人”
排版空间
务必提及文字放置需求:
- “在顶部三分之一处留出清晰区域,用于放置标题文字”
- “在上方区域留出负空间,用于放置大号字体”
- “构图应适合放置居中的标题和副标题”
类型预期
参考特定类型的元素:
- “具有现代感的经典惊悚风格”
- “当代爱情小说封面风格”
- “沿袭主要奇幻出版商传统的史诗奇幻风格”
调色板
指定适合类型的颜色:
- 惊悚:深蓝、黑色、深红
- 爱情:暖金色、粉色、柔和的浅色调
- 科幻:冷蓝色、紫色、霓虹点缀
- 自助:简洁的白色、鼓舞人心的色彩、极简调色板
模式选择
Max 模式
以下情况使用 "mode": "max":
- 最终版书籍封面
- 专业出版品质
- 复杂细致的场景
- 可直接印刷的作品
Eco 模式
以下情况使用 "mode": "eco":
- 快速探索概念
- 测试不同方向
- 迭代草稿
- 注重预算的项目
多轮对话
使用 session_id 在多个请求之间保持上下文:
# Initial cover concept
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a book cover for a cozy mystery novel set in a small bookshop. Show a charming bookstore exterior at dusk with warm light glowing from windows, a cat sitting in the doorway, autumn leaves scattered on the cobblestone."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "cozy-mystery-cover",
"mode": "max"
}'
# Request variation
curl -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create another version with the same bookshop but from an interior perspective, looking out through the window at the evening street. Keep the cozy, inviting atmosphere and the cat somewhere in the scene."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "cozy-mystery-cover",
"mode": "max"
}'
错误处理
在实现中处理常见错误:
# Check for API key
if [ -z "$EACHLABS_API_KEY" ]; then
echo "Error: EACHLABS_API_KEY environment variable not set"
exit 1
fi
# Make request with error handling
response=$(curl -s -w "\n%{http_code}" -X POST "https://eachsense-agent.core.eachlabs.run/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a minimalist book cover with abstract geometric shapes in blue and gold."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max"
}')
http_code=$(echo "$response" | tail -n1)
body=$(echo "$response" | sed '$d')
if [ "$http_code" -ne 200 ]; then
echo "Error: API returned status $http_code"
echo "$body"
exit 1
fi
echo "$body"
相关技能
评论
支持 Markdown