当前位置: 首页 > Skill >

OpenAI-HK-Image-2

OpenAI-HK-Image-2

OpenAI-HK-Image-2

HK gpt-image-2 image generation via OpenAI-HK API. Use for: hk生成图片, hk画图, hk文生图, hk图生图, gpt画图, GPT图片, or any hk image generation request.

1.0.0 2026.11.26 598
获取Skill文件查看使用说明
作 者:陆安 许可证: 更新时间:2026.11.26
本文目录展开

GPT-Image-2 Image Generation (OpenAI-HK)

API Configuration

  • Base URL: https://api.openai-hk.com
  • Auth: Bearer hk-{API_KEY}
  • Endpoints:
    • Text-to-image: POST /v1/images/generations
    • Image-to-image: POST /v1/images/edits

Quick Start

# Text-to-image
curl https://api.openai-hk.com/v1/images/generations 
  -H "Authorization: Bearer hk-$API_KEY" 
  -H "Content-Type: application/json" 
  -d '{
    "model": "gpt-image-2",
    "prompt": "your prompt",
    "n": 1,
    "size": "1024x1024",
    "quality": "low"
  }'

Available Models

Model Description
gpt-image-2 Latest GPT image generation v2
gpt-image-1.5 Previous version
gpt-image-1 Original GPT image

Quality Options

Quality Description Approx Cost
low Fast, ~800 credits (1024x1024) 800 积分
medium Balanced, ~3000 credits 3000 积分
high Maximum quality Higher
auto Model decides (default) -

Size Options

Square

  • 1024x1024 (1K)
  • 2048x2048 (2K)
  • 2880x2880 (4K)

Widescreen 16:9

  • 1280x720 (1K)
  • 2048x1152 (2K)
  • 3840x2160 (4K)

Story 9:16

  • 720x1280 (1K)
  • 1152x2048 (2K)
  • 2160x3840 (4K)

Other Ratios

  • 5:4, 4:5, 4:3, 3:4, 3:2, 2:3, 21:9

Image Generation Script

# Text-to-image
python3 /root/.openclaw/workspace/skills/hk-gpt-image-2/scripts/generate_image.py 
  --api-key "hk-xxx" 
  --prompt "一只可爱的橘猫" 
  --model gpt-image-2 
  --size 1024x1024 
  --quality low 
  --output "/root/.openclaw/media/images/$(date +%Y-%m-%d)-$RANDOM.png"

# Image-to-image (edit)
python3 /root/.openclaw/workspace/skills/hk-gpt-image-2/scripts/generate_image.py 
  --api-key "hk-xxx" 
  --prompt "把这只猫变成蓝色" 
  --input-image /path/to/cat.png 
  --output "/root/.openclaw/media/images/$(date +%Y-%m-%d)-$RANDOM.png"

Workflows

Text-to-Image (文生图)

  1. User provides prompt
  2. Choose model (default: gpt-image-2), size (default: 1024x1024), quality (default: low)
  3. Call /v1/images/generations
  4. Download and save image to /root/.openclaw/media/images/
  5. Deliver to user

Image-to-Image (图生图)

  1. User provides reference image(s) and prompt
  2. Call /v1/images/edits with multipart form
  3. Download and save result
  4. Deliver to user

Notes

  • Default output directory: /root/.openclaw/media/images/
  • Filename format: YYYY-MM-DD-RANDOM.png
  • Max reference images for edit: Multiple (no strict limit)
  • For best quality, use quality: high but costs more credits
  • Response format supports both url (default) and b64_json

相关文章

更多
ai-image-generation统一调用50+图像模型

ai-image-generation Skill 通过 inference.sh CLI 统一了 50 多个图像模型的调用入口,涵盖 GPT-Image-2.6、FLUX 等主流模型。该方案将模型选择与参数配置集中管理,简化了文生图、图生图等任务的发起流程,便于团队在批量生成或横向评测时切换模型,但需注意各模型能力差异及输入格式限制。

2026.11.12 180
Skill 文件
  • SKILL.md
    • GPT-Image-2 Image Generation (OpenAI-HK)
    • API Configuration
    • Quick Start
    • Available Models
    • Quality Options
    • Size Options
      • Square
      • Widescreen 16:9
      • Story 9:16
      • Other Ratios
    • Image Generation Script
    • Workflows
      • Text-to-Image (文生图)
      • Image-to-Image (图生图)
    • Notes
  • 项目或源文件

相关 Skill

更多
Agnes AI 免费图片视频生成 Agnes AI 免费图片视频生成 Generate images and videos using Agnes AI models (agnes-image-2.0-flash, agnes-image-2.1-flash, agnes-video-v2.0). Trigger when user wants to generate images from text, edit images, create videos from text or images, or mentions '生图', '生视频', 'image generation', 'video generation', 'Agnes AI', 'agnes-ai.com'.
图生PPT 图生PPT 用 OpenAI gpt-image-2 一键生成高审美、高完成度的 PPT
暗格人物封面图 暗格人物封面图 使用gpt-image-2模型生成小红书封面,固定风格为深色背景+人物侧影+亮黄大字,3:4竖版比例,电影感光影。当用户需要生成暗色调人物封面、深色背景小红书封面、人物IP风格封面时使用此技能。
xiaohongshu |小红书 AI 宣传图和图文笔记技能 xiaohongshu |小红书 AI 宣传图和图文笔记技能 小红书 AI 宣传图和图文笔记技能 - 根据用户提示词自动判断生成单张或多张宣传图,调用 gpt-image-2 或火山引擎 Ark 文生图模型生成视觉素材并合成小红书图片;仅在用户明确要求发布时才执行发布。
Router9 Router9 All-in-one AI skills via Router9 API — speech recognition, text-to-speech, image description, OCR, image generation, and file storage. Use when the user asks...