About image-generate
image-generate is a skill for creating images from text descriptions. It runs a script and returns the generated image URL.
Key features
- 01Generate images from text descriptions
- 02Run generation through a script
- 03Return the generated image URL
- 04Read API credentials from environment variables
Use cases
- 01Create an illustration from a text prompt
- 02Generate image assets for creative work
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ bytedance/ agentkit-samples --skill image-generateAfter installing, type/image-generatein Claude Code to confirm it loaded.
Bundled filesLICENSE.txtscripts/image_generate.py
Details
From the project READMEImage Generate
适用场景
当需要根据文本描述生成图片时,使用该技能调用 image_generate 函数。
使用步骤
- 准备清晰具体的
prompt。 - 运行脚本
python scripts/image_generate.py "<prompt>"。运行之前cd到对应的目录。 - 脚本将返回生成图片的 URL。
认证与凭据来源
- 优先读取
MODEL_IMAGE_API_KEY或ARK_API_KEY环境变量。 - 若未配置,将尝试使用
VOLCENGINE_ACCESS_KEY与VOLCENGINE_SECRET_KEY获取 Ark API Key。
输出格式
- 输出生成的图片 URL。
- 若调用失败,将打印错误信息。
示例
python scripts/image_generate.py "一只可爱的猫"
Comments
Markdown supported