image-generation

Generate base64-encoded images from text prompts using z-ai-web-dev-sdk.

1|Updated Aug 3, 2025
One-click install
npx skills add https://github.com/eesha000009-dev/Exam-Prep100 --skill image-generation-eesha000009-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: image-generation
Source: https://github.com/eesha000009-dev/Exam-Prep100/tree/main/skills/image-generation
Command: npx skills add https://github.com/eesha000009-dev/Exam-Prep100 --skill image-generation-eesha000009-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires z-ai-web-dev-sdk, and includes scripts (resource) components.

What problem does it solve?

This Skill removes the manual effort of producing visual assets by converting text prompts into ready-to-use images, enabling fast iteration for design, marketing, and product teams.

Core Features & Use Cases

  • Text-to-Image Generation: Produce base64-encoded images from natural-language prompts using the z-ai-web-dev-sdk.
  • Multiple Sizes & Orientations: Support a predefined set of image sizes for hero banners, portraits, landscape, and social assets.
  • CLI & Backend Integration: Provide a command-line tool and backend service examples for single, batch, and cached generation workflows.
  • Production Patterns: Includes examples for retry logic, caching, file writing, and Express.js API integration for serving generated images.

Quick Start

Generate a 1440x720 hero banner from the prompt "Modern tech hero banner, blue gradient" and save it to ./assets/hero.png using the image generation skill.

Frequently Asked Questions about image-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images from text prompts in a Node.js backend?

Generate images from text prompts in a Node.js backend by applying the z-ai-web-dev-sdk to process natural-language inputs and return base64-encoded image outputs ready for web application integration.

Can I batch process multiple text-to-image generation requests?

Yes, you can batch process multiple text-to-image generation requests using the provided CLI tool and backend service examples, which support batch pipelines alongside caching and retry logic for deterministic visual asset production.

Does this image generation approach support predefined sizes for social assets?

Yes, this image generation approach supports a predefined set of multiple sizes and orientations, allowing you to produce specific visual assets like hero banners, portraits, and landscape formats for websites and marketing.

What is the best way to serve generated images through an API endpoint?

The best way to serve generated images through an API endpoint is to implement the included Express.js integration examples, handling base64 decoding, server-side caching, and retry logic to deliver deterministic image outputs reliably.

Do I need the z-ai-web-dev-sdk to create high-quality images from text prompts?

Yes, you need the z-ai-web-dev-sdk installed on the server side to create high-quality images from text prompts, as it provides the core generation engine and handles the base64 encoding required for the outputs.

Why does my text-to-image pipeline need retry logic and caching?

Your text-to-image pipeline needs retry logic and caching to ensure deterministic image outputs and prevent service disruptions, handling temporary generation failures and avoiding redundant processing for repeated prompt requests.