Jimeng T2I: Text-to-Image Generation with Jimeng in Agents

Introduction

In conversational development environments, “generating an image from a description” often requires switching to a web console or integrating HTTP calls manually. Prompts, sizes, reference images, and result URLs are scattered across multiple steps, making it difficult for an Agent to execute according to a unified convention. If you are already using dLazy’s hosted generation API, you might want the Skill to solely encapsulate “Jimeng Text-to-Image” into a reproducible CLI call. jimeng t2i is a community Skill designed for this specific need.

What is this

jimeng t2i (coordinate @user_f95f21b8/dlazy-jimeng-t2i) is a community Skill on SkillHub categorized under design-media, currently at version 1.0.9. The official description is: Text-to-image generation with Jimeng, quickly converting text to high-quality images.

The Skill本体 follows the standard SKILL.md format and was published by user_f95f21b8. It relies on the @dlazy/cli maintained by dlazyai to call the dLazy hosted API, integrating Jimeng’s text-to-image capabilities. The SkillHub page marks requires_api_key=true, so a dLazy API Key must be configured before use.

Core Features

The following capabilities are derived from the SKILL.md / SKILL-cn.md files within the Skill package (v1.0.9):

  1. Text-to-Image: Submit a prompt via --prompt. It calls the backend through dlazy jimeng-t2i, with the default model identifier being jimeng-t2i-v40.
  2. Optional Reference Images: Supports --images, accepting up to 10 images as URLs or local paths (local files will be uploaded to files.dlazy.com via the CLI).
  3. Multiple Output Sizes: --size offers various resolution options (default 1440*2560). For the full list of options, refer to the -h output in the usage section below.
  4. Debugging and Asynchronous Mode: --dry-run prints the payload and cost estimate without making an actual request; --no-wait returns a generateId immediately, which can be polled using dlazy status <generateId> --wait.
  5. Agent Trigger Words: The documentation lists keywords such as jimeng, 即梦 (Jimeng), 文生图 (text-to-image), and generate image to facilitate invoking this Skill during conversations.

On success, the CLI returns JSON containing image URLs (hosted on files.dlazy.com) in result.outputs.

Installation and Activation

1. Install SkillHub CLI (if not already installed)

Check or install according to the SkillHub installation documentation:

command -v skillhub && skillhub --version

If not installed, run:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install the Skill to the current Agent’s skills directory

During installation, you must use --dir to point to the skills directory recognized by your current client; otherwise, the default ./skills/ location may not be loaded. Common path examples provided in SkillHub documentation:

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

Installation command:

skillhub install @user_f95f21b8/dlazy-jimeng-t2i --dir ~/.cursor/skills/

You can also let the AI follow the prompts on the official page to complete the installation for the same coordinate, referencing https://skillhub.cn/install/skillhub.md.

3. Install and configure dLazy CLI

The Skill metadata requires npm / npx on the local machine and pins the CLI version to 1.0.9:

npm install -g @dlazy/cli@1.0.9

Alternatively, without global installation, call it on demand:

npx @dlazy/cli@1.0.9 <command>

Configure the API Key (written to ~/.dlazy/config.json, or use the environment variable DLAZY_API_KEY):

dlazy auth set YOUR_API_KEY

The Key needs to be created or copied from the dlazy.com console API Key page.

Typical Usage

The core instruction for the Agent side is to execute dlazy jimeng-t2i to obtain results. First, check the help:

dlazy jimeng-t2i -h

Summary of common parameters (consistent with official documentation):

  --prompt [prompt]                    Prompt
  --images [images...]                 Reference images [image: url or local path] (max 10)
  --size [size]                        Size [default: 1440*2560]
  --dry-run                            Print payload and cost estimate, do not call API
  --no-wait                            Async task returns generateId immediately
  --timeout <seconds>                  Max time to wait for async completion (default 1800)

Basic text-to-image example:

dlazy jimeng-t2i --prompt 'City skyline at sunset, cyberpunk style'

For usage with reference images, the official example is (note that the example uses the singular form --image, which coexists with --images in -h; refer to your local dlazy jimeng-t2i -h for accuracy):

dlazy jimeng-t2i --prompt 'Prompt content' --image '/path/to/image.png'

You can use --dry-run before calling to verify parameters and estimated consumption.

Use Cases and Notes

Who is it for

  • Teams or individuals who have already activated the dLazy API and wish to drive Jimeng text-to-image generation via natural language within Cursor, Claude Code, or other clients that support Skills.
  • Automation workflows requiring the Agent to uniformly use the dlazy command and output structured JSON (containing image URLs).

Limitations and Notes

  1. Dependencies and Network: Requires the Node ecosystem (npm/npx) and access to api.dlazy.com and files.dlazy.com; prompts and uploaded media will be sent to the dLazy server. Please read the dlazy.com terms of service before use.
  2. Billing and Balance: API usage is billed to the dLazy account; if insufficient_balance is returned, you need to top up in the console (documentation link: https://dlazy.com/dashboard/organization/settings?tab=credits).
  3. Authentication Failure: unauthorized indicates a missing or invalid Key. You need to re-run dlazy auth set or set DLAZY_API_KEY.
  4. Community Source: SkillHub marks the source as community, published by user_f95f21b8; the CLI source code is at github.com/dlazyai/cli, which you can review before installation.
  5. SkillHub Data (at time of scraping): Rating 100000, approximately 1110 downloads, 2 installation records; page data changes dynamically, so refer to the real-time display on SkillHub.

Conclusion

jimeng t2i consolidates Jimeng text-to-image generation into a single chain of Skill + dlazy jimeng-t2i: clearly define the prompt and size within the Agent, and the CLI interfaces with the dLazy API to return downloadable image URLs. If you want to install from the store or verify the version, you can refer to:

  • API Entry: https://api.skillhub.cn/user_f95f21b8/dlazy-jimeng-t2i
  • SkillHub Page: https://www.skillhub.cn/skills/user_f95f21b8/dlazy-jimeng-t2i
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye