JiMeng CLI Text-to-Image
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_c1d16043/jimeng-cli-text2image.
About this skill
The Problem It Solves
When building automated workflows or intelligent agent applications, there is often a need for a reliable, programmable method to generate images. Interacting directly with an image generation model's API involves complex authentication, parameter validation, and state management. This skill encapsulates the JiMeng text-to-image capability into a standardized Command-Line Interface (CLI), allowing you to integrate image generation into terminals, scripts, or any environment that supports CLI invocation via the dreamina text2image command. This lets you focus on business logic rather than underlying protocols.
How the Skill Works
The core of this skill is providing a parameter contract and operational guide for the dreamina text2image command. The workflow is primarily divided into three stages:
- Validation and Preparation: Before submitting a task, run
dreamina text2image -hto confirm the parameters, models (e.g.,5.0Pro), and resolution matrix supported by the current CLI version. This ensures your command is valid both syntactically and by business rules. - Task Submission: Construct and submit the generation request. This is a critical step where you must explicitly specify
--resolution_type=1k|2k|4k, and ensure that--widthand--heightare provided as a pair of positive integers and cannot be used simultaneously with the--ratioparameter. The submission command consumes account credits and returns asubmit_id, which is the unique identifier for subsequent queries. - Polling and Result Retrieval: Use the
submit_idto repeatedly call the query command. The status progresses fromquerying(received) to a final state of eithersuccessorfail. On success, you can specify--download_dirto download the generated files. On failure, thefail_reasonis reported for diagnostics.
Boundaries and Key Considerations
Please clearly understand the scope and constraints of this skill:
- Text-to-Image Only: This skill should not be used for image-to-image, video generation, or pure prompt creation. Dedicated skills like jimeng-cli-image2image or jimeng-prompt-* exist for those scenarios.
- Parameter Rules are Mandatory: --resolution_type is a required parameter (per v1.4.15 rules); omitting it will cause the request to be rejected. Additionally, custom width/height and preset aspect ratio (--ratio) are mutually exclusive.
- Model Identifier is a Token: In commands, the model name must use its token format (e.g., 5.0Pro), not the human-readable display name (e.g., 5.0 Pro).
- Understand Asynchronous Status: A status of querying means the task has been received but is not the final success state. You must continue polling until an explicit success or fail is returned.
- Credit Consumption: Each successful submission consumes credits. This cost should be clearly communicated to the user prior to the operation.
Use Cases
- When a marketing team needs to programmatically generate product visuals or ad creatives via an automation script, submitting requests with specific parameters and handling the asynchronous polling for results.
- For a prompt engineer working extensively in a terminal, who needs to rapidly test various prompts, models (e.g., `5.0Pro`), and resolution settings to compare image outputs efficiently.
- During the integration of image generation into a larger data pipeline, where a reliable CLI command with clear submission IDs and success/failure states is required for orchestration.
Best For
- Backend engineers developing an image generation module for an intelligent agent or internal toolchain, who need a reliable CLI interface instead of raw API calls.
- Developers or researchers who prefer working in the terminal for efficiency and need to rapidly generate and test image prompts directly from the command line or within scripts.
- System architects who need to embed image generation into automated pipelines (like content factories or data visualization) and require that step to have asynchronous processing and robust error feedback.
Related Skills
Convert Chinese or natural-language requests into paste-ready English image prompts for ChatGPT's web UI, covering generation, editing, multi-image references, and exact text without performing image generation.
A creative AI image workflow for style transfer, reference-based creation, scene replacement, series expansion, material conversion, era shifts, composition rework, lineart conversion, and cartoonization.
Translates star-inspired football memories and fan resonance into compliant original IP poster concepts while avoiding real names, likenesses, official badges, and event logos.
Extracts real web page colors, typography, components, layouts, and interaction styles with a Playwright script to produce a verifiable design guideline.