当前位置: 首页 > Skill >

Dlazy Picture Book

Dlazy Picture Book

Dlazy Picture Book

绘本、故事书、儿童书、插图故事、睡前故事书——从主题创作完整绘本:撰写分页故事,生成配图

1.3.5 2026.11.24 243
获取Skill文件查看使用说明
作 者:林澄 许可证: 更新时间:2026.11.24
本文目录展开

dlazy-picture-book

English · 中文

picture book, storybook, children's book, illustrated story, bedtime story book, 绘本——create a complete picture book from a theme: write the paged story, generate style-consistent illustrations page by page with dlazy gpt-image-2, generate matching background music with dlazy elevenlabs-music, then assemble a self-contained HTML book with image-left / text-right spreads, page turning, and background music. Defaults to 10 pages.

Trigger Keywords

  • picture book / storybook
  • children's book / illustrated story
  • bedtime story / story book
  • 绘本 / 图画书
  • make me a picture book about ...

Authentication

All dlazy requests require a dLazy API key. The recommended way to authenticate is:

dlazy login

This runs a device-code flow (also works in remote shells) and automatically saves your API key to the local CLI config — no manual copy/paste required.

Alternative: Set the Key Manually

dlazy auth set YOUR_API_KEY

The CLI saves the key in your user config directory (~/.dlazy/config.json on macOS/Linux, %USERPROFILE%.dlazyconfig.json on Windows), with file permissions restricted to your OS user account. You can also supply the key per-invocation via the DLAZY_API_KEY environment variable.

Getting Your API Key Manually

  1. Sign in or create an account at dlazy.com
  2. Go to dlazy.com/dashboard/organization/api-key
  3. Copy the key shown in the API Key section

Each key is scoped to your dLazy organization and can be rotated or revoked at any time from the same dashboard.

About & Provenance

  • CLI source code: github.com/dlazyai/cli
  • Maintainer: dlazyai
  • npm package: @dlazy/cli
  • Homepage: dlazy.com

Run on demand without a global install:

npx @dlazy/cli@1.2.3 <command>

Review the GitHub source before installing.

How It Works

Illustrations are generated by dlazy gpt-image-2 and background music by dlazy elevenlabs-music; both are thin clients over the dLazy hosted API:

  • Prompts and parameters are sent to the dLazy API (api.dlazy.com) for inference.
  • Local reference images are uploaded to dLazy media storage (files.dlazy.com); result URLs are also hosted there.

The story text, page composition, and HTML assembly happen locally — you (the agent) write the story and call this skill's scripts/build_book.py to inject the content into assets/template.html, producing a self-contained HTML. Standard SaaS pattern; the skill does not access network or filesystem beyond what the dLazy CLI handles.

What the output looks like

A folder you can open directly; index.html is the book:

<book-title>/
├── index.html        ← the finished book (image-left/text-right, page turning, BGM)
├── book.json         ← content data (title, per-page image+text, music)
├── images/           ← cover.png, page-01.png … page-10.png
└── music/            ← bgm.mp3

Reading experience: cover (large image + title + "Start reading") → spreads (illustration on the left in 3:4, story text on the right; turn pages with arrow keys / click left-right / bottom dots) → end page. A background-music toggle sits top-right. On mobile it becomes image-top / text-bottom.

Images and music are referenced by relative paths, so the whole folder is portable and works offline.

Workflow

A picture book is story + image + sound as one whole; quality comes from keeping the three coordinated. Do the steps in order — each sets up the next.

Step 0: Confirm the brief

Before starting, align on these (fill sensible defaults for anything unstated and say so — don't interrogate the user):

  • Theme / core: what's the story, what does it convey (courage, sharing, friendship…)?
  • Page count: defaults to 10; the user may specify otherwise.
  • Audience age: defaults to 3–6. Drives text difficulty and sentence length.
  • Art style: defaults to warm, healing watercolor children's-book style. Could also be flat illustration, crayon, Pixar-style 3D, etc.
  • Protagonist: give it a concrete look (e.g. "a little fox in a red scarf") — it must stay consistent on every page.

Step 1: Write the paged story into book.json

Write the whole book's text first, then generate images, so the visuals follow one narrative thread.

  • A full arc: opening (introduce hero + world) → setting out / a wish → a problem → a turn → a warm ending. Spread this across the 10 pages.
  • 1–3 sentences per page, spoken and vivid, good to read aloud. Shorter for younger readers.
  • Also note a visual description for each page (what to draw) — you'll need it next.

Write book.json first (image/music paths as placeholders that will already be correct once generated):

{
  "title": "The Little Fox's Star Lantern",
  "subtitle": "A warm story about sharing",
  "cover_image": "images/cover.png",
  "music": "music/bgm.mp3",
  "pages": [
    { "image": "images/page-01.png", "text": "Deep in the forest lived a little fox in a red scarf…" },
    { "image": "images/page-02.png", "text": "…" }
  ]
}

Step 2: Generate illustrations page by page (keep character + style consistent)

Consistency is where picture books fail — the same fox can't look different on every page. Use the first page as a style anchor:

  1. Generate page 1 first, writing the character look, art style, palette, and composition in full detail. This sets the visual baseline for the whole book.

    dlazy gpt-image-2 --quality low --size 1024x1536 
      --prompt "Children's book illustration, warm watercolor style, 3:4 portrait. An orange little fox in a red scarf lies on a windowsill gazing at the round moon outside, nighttime, soft warm lamplight, healing childlike mood, clean negative space."
    
  2. Pass page 1 as the reference image via --images on every later page so the hero and style carry over; only the scene changes:

    dlazy gpt-image-2 --quality low --size 1024x1536 
      --images images/page-01.png 
      --prompt "Same orange fox in a red scarf, same watercolor style and palette. This page: the fox shoulders a small backpack and walks into the forest under the moonlight. 3:4 portrait."
    
  3. The result URL is at result.outputs[0].url. Download it into images/ with curl:

    curl -L -o images/page-01.png "<returned url>"
    

On parameters: --quality low is low quality (fast, cheap, plenty for small book art); --size 1024x1536 is the closest small portrait to 3:4 (gpt-image-2 has no exact 3:4 tier; the template crops to 3:4 so it looks right).

Cover: same idea — use page 1 as reference to generate a more atmospheric hero image into images/cover.png.

Execution discipline (important): run one generation command at a time — wait for it to return and download before the next — don't fire all 10 image commands at once or chain them with &/&&. This is both because later pages need the previous image as a reference and because &/&& error out under Windows PowerShell.

Step 3: Generate background music

Write one music prompt from the story's mood; give it enough length to cover a read-through (60–90s for a bedtime story is fine, it loops):

dlazy elevenlabs-music --duration 75 
  --prompt "Gentle, soothing children's bedtime music, soft piano and music box, dreamy and warm, a background for reading a picture book aloud, no vocals."

Download the result into music/bgm.mp3 with curl the same way.

Step 4: Assemble the HTML

Make sure the paths in book.json match the files you actually downloaded, then run this skill's build script:

python3 <this-skill-dir>/scripts/build_book.py book.json -o index.html

It injects book.json into assets/template.html to produce a self-contained index.html. Keep index.html next to images/ and music/.

Step 5: Deliver

Tell the user the output folder path, that double-clicking index.html opens the book, and that the top-right button toggles the music. Share the cover image URL for a quick preview.

Command cheatsheet

Illustration · gpt-image-2 (full help: dlazy gpt-image-2 -h)

Flag Picture-book usage
--prompt Scene description (character + scene + style + "3:4 portrait")
--images Reference image (page-1 path) to keep character/style consistent, up to 5
--quality low (small book art, fast and cheap)
--size 1024x1536 (closest small portrait to 3:4)

Background music · elevenlabs-music (full help: dlazy elevenlabs-music -h)

Flag Picture-book usage
--prompt Mood description (instruments, emotion, "no vocals", good for reading aloud)
--duration Seconds; 60–90 is fine for a bedtime story, it loops

Results are always at result.outputs[0].url; download with curl -L -o <local path> "<url>".

Error Handling

Code Error Type Example Message
401 Unauthorized (No API Key) ok: false, code: "unauthorized", message: "API key is missing or invalid"
501 Missing required parameter error: required option '--prompt <prompt>' not specified
502 Local file read error Error: Image file not found: C:pathtoyourfile
503 API request failed (no balance) ok: false, code: "insufficient_balance"
503 API request failed (server error) HTTP status code error (500 server crash)
504 Asynchronous task execution failed === Generation Failed === / {Specific error reason returned by backend, e.g. "Prompt violates safety policy"}

AGENT CRITICAL INSTRUCTION:

  1. If the result returns code: "insufficient_balance", you MUST explicitly tell the user their credits are insufficient and guide them to recharge: https://dlazy.com/dashboard/organization/settings?tab=credits
  2. If the result returns code: "unauthorized" or indicates a missing API key, you MUST tell the user to get their API key from https://dlazy.com/dashboard/organization/api-key and save it with dlazy auth set <key>, then resume.
  3. If one image is rejected for violating the safety policy, rewrite that page's prompt (drop sensitive/violent/photoreal-person content) and retry — don't abandon the whole book.

Tips

Visit https://dlazy.com for more information.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,017
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,005
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,003
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,003
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,002
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,001
Skill 文件
  • SKILL.md
    • dlazy-picture-book
    • Trigger Keywords
    • Authentication
      • Alternative: Set the Key Manually
      • Getting Your API Key Manually
    • About & Provenance
    • How It Works
    • What the output looks like
    • Workflow
      • Step 0: Confirm the brief
      • Step 1: Write the paged story into book.json
      • Step 2: Generate illustrations page by page (keep character + style consistent)
      • Step 3: Generate background music
      • Step 4: Assemble the HTML
      • Step 5: Deliver
    • Command cheatsheet
    • Error Handling
    • Tips
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期