火山引擎图片生成

v1.0.0

火山引擎图像生成 - 使用火山引擎方舟API生成图片并下载

0· 224·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for magiesky/volc-image.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "火山引擎图片生成" (magiesky/volc-image) from ClawHub.
Skill page: https://clawhub.ai/magiesky/volc-image
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: ARK_API_KEY
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install volc-image

ClawHub CLI

Package manager switcher

npx clawhub@latest install volc-image
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name and description match the code and SKILL.md: the skill calls a VolcEngine Ark image-generation endpoint and only requests one credential (ARK_API_KEY), which is the expected credential for this API.
Instruction Scope
Runtime instructions and the Python script stay within the stated purpose (send prompt to remote image API, download result, save to disk). Minor notes: SKILL.md shows both a CLI usage and an 'exec(open(...).read())' pattern — the latter executes the script in-process and is unnecessary for typical use but not malicious. The skill prints the saved file path (prefixed with MEDIA:), and it will transmit user-provided prompts to the remote API (privacy consideration).
Install Mechanism
No install spec — instruction-only with one Python file. Nothing is downloaded or installed by the skill itself.
Credentials
Only ARK_API_KEY is required and used by the code. The script also allows passing the key via a command-line argument (ARK_API_KEY=...), which is documented in the script. No unrelated secrets or config paths are requested.
Persistence & Privilege
always is false and the skill does not modify other skills or request persistent elevated privileges. It only reads ARK_API_KEY and writes generated images into the current directory.
Assessment
This skill appears to do what it says: it sends your prompt and ARK_API_KEY to VolcEngine's Ark image-generation endpoint and saves the returned image locally. Before installing: 1) Verify you obtained the ARK_API_KEY from VolcEngine's official console and that the endpoint (ark.cn-beijing.volces.com) is the expected vendor endpoint for your region. 2) Use a dedicated API key with limited scope and quota, not a long-lived or broadly privileged key. 3) Be aware that any prompts or data you send will be transmitted to the vendor (do not include secrets or private data in prompts). 4) Prefer running the script directly (python volc_image.py "prompt") rather than using the exec(open(...).read()) pattern. 5) Review network and privacy policies if you run this in a sensitive environment. Otherwise the skill's requirements and behavior are proportionate and consistent with its stated purpose.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🖼️ Clawdis
EnvARK_API_KEY
Primary envARK_API_KEY
latestvk971dswtvbcrsdvc34pgqb3k0x833pey
224downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

volc-image

火山引擎图像生成技能 - 使用火山引擎方舟(Doubao Seedream) API生成图片。

环境配置

需要设置环境变量 ARK_API_KEY

功能

  1. 生成图片 - 根据提示词生成图片
  2. 下载保存 - 自动将生成的图片保存到本地

使用方式

直接告诉我要生成什么样的图片,例如:

  • "生成一张小说封面:顶流重生指南"
  • "生成一张科技感海报"
  • "生成一张可爱猫咪图片"

参数说明

参数说明默认值
model模型doubao-seedream-5-0-260128
size尺寸2K (1664x2496)
prompt提示词用户输入

示例提示词

小说封面

小说封面,顶流重生指南,标题金色大字,时尚美女坐在王座上,娱乐圈背景,霓虹灯光,紫色金色主题,精致画面,4K

科幻风格

星际穿越,黑洞,黑洞里冲出一辆支离破碎的复古列车,视觉冲击力,电影大片,末日既视感,动感,对比色,oc渲染,光线追踪,动态模糊,景深,超现实主义,深蓝

可爱风格

可爱的小猫咪,胖乎乎,大眼睛,萌萌的,粉色背景,卡通风格,精致可爱

技术实现

import os
import requests

# API配置
url = 'https://ark.cn-beijing.volces.com/api/v3/images/generations'
api_key = os.environ.get('ARK_API_KEY')

# 请求数据
data = {
    'model': 'doubao-seedream-5-0-260128',
    'prompt': '<用户提示词>',
    'sequential_image_generation': 'disabled',
    'response_format': 'url',
    'size': '2K',
    'stream': False,
    'watermark': True
}

# 发送请求
response = requests.post(url, headers={
    'Authorization': f'Bearer {api_key}',
    'Content-Type': 'application/json'
}, json=data)

# 获取图片URL并下载
img_url = response.json()['data'][0]['url']
img_data = requests.get(img_url).content

# 保存图片
with open('output.jpg', 'wb') as f:
    f.write(img_data)

注意事项

  • API Key 需要在火山引擎控制台获取
  • 图片URL有效期约24小时
  • 生成图片可能需要几秒钟时间

执行命令

设置API Key并生成图片:

# 设置API Key
set ARK_API_KEY=你的API密钥

# 生成图片
python volc_image.py "你的提示词"

或者在Python中直接调用:

import os
os.environ['ARK_API_KEY'] = '你的API密钥'
exec(open('volc_image.py').read())

Comments

Loading comments...