文本提示词生成图像
Draw Image
使用默认的类 OpenAI LLM 配置(gpt-image-1-mini 或兼容的图像生成 API)根据文本提示词生成图像。图像会上传到 gofile.io 公共文件分享服务,并且仅返回公共下载页面的 URL。
- License 许可
- MIT
- 所属仓库
- ai-sns/ai-sns
- 最近更新
- 2026-08-05
- Stars
- ★ 327
- Forks
- 11
01 前言 Front Matter
- name
- Draw Image
- runner
- { "kind": "python_file", "target": "draw.py" }
- requires
- { "always": true }
- skill_key
- draw_image
- description
- Generate an image from a text prompt using the default OpenAI-like LLM config (gpt-image-1-mini or compatible image generation API). The image is uploaded to the gofile.io public file sharing service and ONLY the public download page URL is returned.
- instructions
- Call by agent when user asks to draw, paint, generate, or create an image.
02 资源文件 1
- 脚本draw.py10.7 KB
03 SKILL.md 正文
Draw Image
Generate images via the OpenAI-compatible images/generations endpoint using the default LLM configuration.
Parameters
This skill accepts a JSON object as input params.
-
prompt(string, required)- The text description of the image to generate.
-
size(string, optional)- Image dimensions. Default:
1024x1024 - Common values:
1024x1024,1792x1024,1024x1792
- Image dimensions. Default:
-
model(string, optional)- The image generation model name. Default:
gpt-image-1-mini
- The image generation model name. Default:
-
quality(string, optional)- Image quality. Values:
low,medium,high. Default:low
- Image quality. Values:
-
n(integer, optional)- Number of images to generate. Default:
1
- Number of images to generate. Default:
How to use
- Call
read_skillwithskill_key: "draw_image"to read this document. - Then call
run_doc_skillwithskill_key: "draw_image"andparams.
Example:
{
"skill_key": "draw_image",
"prompt": "A futuristic cityscape at sunset with flying cars",
"size": "1024x1024"
}
Output
The runner prints a JSON object to stdout with:
ok(bool): Whether the generation and upload succeeded.download_page(string): The public gofile.io download page URL of the generated image. Only this URL is returned as the result. Open this URL in a browser to download the generated image.note(string): A short hint explaining thatdownload_pageis used to download the generated image.error(string): Error message on failure.
Example success output:
{
"ok": true,
"download_page": "https://gofile.io/d/WcWZKt",
"note": "Use this URL to download the generated image."
}
04 同仓库更多 Skills
回显参数示例技能
Echo Skill Sample
将输入参数以 JSON 格式回显。
A2A 智能体卡片获取
Fetch Agent Card
从给定的端点 URL 获取 A2A 智能体卡片 JSON。先尝试直接 GET,若失败则回退到 /.well-known/agent.json。
A2A JSON-RPC 端点调用
A2A JSON-RPC Call
调用对等智能体的 A2A JSON-RPC 端点。支持 tasks/send(发送任务消息)和 tasks/get(查询任务状态)。
文本生成图片
draw-image
使用与 OpenAI 兼容的图像生成 API(gpt-image-1-mini 或兼容模型)根据文本提示生成图像。图像会上传到 gofile.io 公共文件分享服务,且仅返回公开的下载页面 URL。当用户要求绘制、绘画、生成或创建图像时触发。
文本生成图片
draw-image
使用与 OpenAI 兼容的图像生成 API(gpt-image-1-mini 或兼容模型)根据文本提示生成图像。图像会上传到 gofile.io 公共文件分享服务,且仅返回公开的下载页面 URL。当用户要求绘制、绘画、生成或创建图像时触发。