图生图

img2img - 图生图能力

by binkosun

4.2k其他未扫描2026年3月23日

安装

claude skill add --url github.com/openclaw/skills/tree/main/skills/binkosun/img2img

文档

触发条件

当用户提到"图生图"、"AI 画图"、"生成图片"、"画一个"等时激活。

功能

使用 DALL-E 根据文字描述生成图片。

使用方式

用户发送描述文字,我调用 DALL-E 生成图片并发送。

技术实现

使用 OpenAI DALL-E 3 API 生成图片:

python
import openai
import base64
import os

api_key = os.environ.get("API_KEY")

client = openai.OpenAI(api_key=api_key)

response = client.images.generate(
  model="dall-e-3",
  prompt="描述文字",
  size="1024x1024",
  quality="standard",
  n=1,
)

image_url = response.data[0].url

限制

  • 英文描述效果更好
  • 避免生成真实人脸
  • 遵守 DALL-E 使用政策

相关 Skills

Claude API

by anthropic

热门

Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. TRIGGER when: code imports anthropic/@anthropic-ai/sdk; user asks to use the Claude API, Anthropic SDKs, or Managed Agents (/v1/agents, /v1/sessions, /v1/environments). DO NOT TRIGGER when: code imports `openai`/other AI SDK, general programming, or ML/data-science tasks.

其他
安全119.1k

并行代理

by axelhu

热门

Use when facing 2 or more independent tasks that can be worked on without shared state - dispatches parallel subagents using sessions_spawn for concurrent investigation and execution, adapted for OpenClaw

其他
未扫描4.2k

思否热榜

by codekungfu

热门

注册“SegmentFault”热门技能;当需要访问或自动化SegmentFault相关内容时调用。

其他
未扫描4.2k

评论