[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71JGFN6ZXVDQF18TAVPD5C3":3,"skill-same:01M71JGFN6ZXVDQF18TAVPD5C3":81},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":5,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M71JGFN6ZXVDQF18TAVPD5C3","chatgpt-image2",null,"FeatherHunter\u002FSKILLS","FeatherHunter","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12967785?v=4","01M71JFD7JMNT8HWC3Y9JKMWGG","王辰浩","01M71JFD8DNYSPJPGX25Y4KX70",6,"MIT","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002FSKILL.md",[],[18,19],"chatgpt","chatgpt image2","2026-11-10 10:12:30",false,"# chatgpt-image2 - 图片生成技能\n\n## 简介\n\n基于 AI Hub API 的 **GPT-Image-2** 模型，`nano-banana-2` 作为备用模型。\n\n## 配置\n\n- **API 地址**：`https:\u002F\u002Fapi.xbai.top\u002Fv1`\n- **API Key**：`sk-C2fSyNPHTzeqIzu1TrIHWyxA8GOq0acjerGOdsNDyz6gORxr`\n- **主模型**：`gpt-image-2`（高质量生图）\n- **备用模型**：`nano-banana-2`（快速生图）\n\n## ⚠️ 重要：接口调用方式\n\n**必须使用 `\u002Fv1\u002Fimages\u002Fgenerations` 接口生成图片，不要用 `\u002Fv1\u002Fimages\u002Fedits`！**\n\nGPT-Image-2 的 `\u002Fv1\u002Fimages\u002Fedits`（垫图\u002F参考图）接口响应极慢（经常超时），而生图接口稳定且速度快。\n\n## 工具调用方式\n\n### 方式一：Python requests（推荐）\n\n```python\nimport requests\n\nresp = requests.post(\n    'https:\u002F\u002Fapi.xbai.top\u002Fv1\u002Fimages\u002Fgenerations',\n    headers={'Authorization': 'Bearer sk-C2fSyNPHTzeqIzu1TrIHWyxA8GOq0acjerGOdsNDyz6gORxr'},\n    json={\n        'model': 'gpt-image-2',\n        'prompt': '你的图片描述',\n        'n': 1,\n        'size': '1024x1024',\n        'quality': 'standard',\n        'response_format': 'url'\n    },\n    timeout=180\n)\n\nurl = resp.json()['data'][0]['url']\n# 下载图片\nimg_data = requests.get(url).content\nwith open('output.png', 'wb') as f:\n    f.write(img_data)\n```\n\n### 方式二：curl\n\n```bash\ncurl -s --max-time 180 --request POST \\\n  --url https:\u002F\u002Fapi.xbai.top\u002Fv1\u002Fimages\u002Fgenerations \\\n  --header \"Authorization: Bearer sk-C2fSyNPHTzeqIzu1TrIHWyxA8GOq0acjerGOdsNDyz6gORxr\" \\\n  --header \"Content-Type: application\u002Fjson\" \\\n  --data '{\n    \"model\": \"gpt-image-2\",\n    \"prompt\": \"你的图片描述\",\n    \"n\": 1,\n    \"size\": \"1024x1024\",\n    \"quality\": \"standard\",\n    \"response_format\": \"url\"\n  }'\n```\n\n### 方式三：OpenAI Python 库\n\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n    api_key=\"sk-C2fSyNPHTzeqIzu1TrIHWyxA8GOq0acjerGOdsNDyz6gORxr\",\n    base_url=\"https:\u002F\u002Fapi.xbai.top\u002Fv1\"\n)\n\nresponse = client.images.generate(\n    model=\"gpt-image-2\",\n    prompt=\"你的图片描述\",\n    n=1,\n    size=\"1024x1024\",\n    quality=\"standard\",\n    response_format=\"url\"\n)\n\nimage_url = response.data[0].url\n```\n\n## 尺寸选项\n\n| 尺寸 | 说明 |\n|------|------|\n| `256x256` | 小图 |\n| `512x512` | 中图 |\n| `1024x1024` | 常用方图 |\n| `1024x1792` | 竖图 |\n| `1792x1024` | 横图 |\n\n## 支持的参数\n\n| 参数 | 类型 | 说明 | 可选值 |\n|------|------|------|--------|\n| model | string | 生图模型 | `gpt-image-2`（默认）、`nano-banana-2` |\n| prompt | string | 图片描述 | 最长 4000 字符 |\n| n | int | 生成数量 | 1-4，默认 1 |\n| size | string | 图片尺寸 | 见上方尺寸选项 |\n| quality | string | 图片质量 | `standard`（默认）、`hd` |\n| response_format | string | 返回格式 | `url`（默认）、`b64_json` |\n\n## 返回格式\n\n```json\n{\n  \"created\": 1234567890,\n  \"data\": [\n    {\n      \"url\": \"https:\u002F\u002Fexample.com\u002Fgenerated-image.png\"\n    }\n  ]\n}\n```\n\n## 适用场景\n\n- 数据可视化（折线图、柱状图等）\n- 产品图片生成\n- 艺术风格转换\n- 动漫\u002F游戏角色设计\n\n## ⚠️ 注意事项\n\n1. **不要用 `\u002Fv1\u002Fimages\u002Fedits`** - 该接口响应极慢，容易超时\n2. **超时时间设置 120-180 秒** - GPT-Image-2 生成需要时间\n3. **下载图片后及时保存** - 返回的 URL 有时效性\n\n## 相关文档\n\n- AI Hub API 文档：https:\u002F\u002Fdocs.codexzh.com\u002Fai-hub-api\u002Fimage-tutorial\n- 模型列表：https:\u002F\u002Fdocs.codexzh.com\u002Fai-hub-api\u002Fmodels-list",{},"main","5b2b73ce2fbb69cd70597cfbbf24c99bc9e94b4c",1,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS","https:\u002F\u002Fgithub.com\u002FFeatherHunter","The Boy, The Man, The Human.","2026-09-12 20:33:55",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add FeatherHunter\u002FSKILLS --skill chatgpt-image2",{"tool":37,"command":38},"bunx","bunx skills add FeatherHunter\u002FSKILLS --skill chatgpt-image2",{"tool":40,"command":41},"pnpm","pnpm dlx skills add FeatherHunter\u002FSKILLS --skill chatgpt-image2","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002FSKILL.md",true,[45,51,55,61,65,69,73,77],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"_meta.json","REFERENCE","参考文档",311,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002F_meta.json",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"chatgpt-image2.html",9398,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002Fchatgpt-image2.html",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"generated_recipe_A.png","ASSET","资产文件",1482486,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002Fgenerated_recipe_A.png",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"recipe_hongshao\u002Fpage1_hero.png",2680404,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002Frecipe_hongshao\u002Fpage1_hero.png",{"path":66,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":67,"sourceHtmlUrl":68},"recipe_hongshao\u002Fpage2_ingredients.png",2461506,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002Frecipe_hongshao\u002Fpage2_ingredients.png",{"path":70,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":71,"sourceHtmlUrl":72},"recipe_hongshao\u002Fpage3_steps.png",2216751,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002Frecipe_hongshao\u002Fpage3_steps.png",{"path":74,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":75,"sourceHtmlUrl":76},"recipe_hongshao\u002Fpage4_history_nutrition_background.png",2182660,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002Frecipe_hongshao\u002Fpage4_history_nutrition_background.png",{"path":78,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":79,"sourceHtmlUrl":80},"recipe_ui_reference.png",2314874,"https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002Fchatgpt-image2\u002Frecipe_ui_reference.png",[82,102,111,120,130,136],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":20},"01M71JPWVNC5JZ2FD4CSR3SZC1","饼干记账","记账技能。写入类:记支出、记收入、拍账单、批量录入、改记录、撤销、恢复、记报销、记退款、记借出、记借入、记收回、记偿还、记分期。查询类:查今天、查某天、查月、查区间、查分类、搜备注、查标签、查账户、查账本、查欠款、查待报销。分析类:看月度、看总览、看分类、看对比、看趋势、看大额、做统计、看洞察、看借贷。目标\u002F账户\u002F联动:设定预算、看预算、设定目标、看目标、新增账户、改账户、账户转账、看账户汇总、买东西联动、吃饭联动。**所有查询\u002F分析类唤醒词默认 invoke HTML 工作流**(scripts\u002Fbill_inject.py + templates),写入类保持文字回执。能力速查:说「饼干记账 HELP」\u002F「查帮助」\u002F「能做什么」。完整 70 个唤醒词见 references\u002F路由表.md","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F饼干记账\u002FSKILL.md",[],[84,89,90,91,92,93,94,95,96,97,98,99,100,101],"记账","invoke","templates","文字","预算","账单","统计","收入","scripts","html","支出","help","references",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":20},"01M71JPS100K4E2JN8R3B0F9NR","贴心助理","真实助手 - 主动分析用户状态，关心用户，提供帮助与提醒。不偷懒地联动所有技能，真正像个朋友一样陪伴。","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F贴心助理\u002FSKILL.md",[],[104,109,110],"陪伴","朋友",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":20},"01M71JPPN0WZ1ARA081J0JDNPC","美团","安装美团旅游技能(meituan-travel)向导 - 检查 mtskills 商店并安装 meituan-travel","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F美团\u002FSKILL.md",[],[113,118,119],"meituan","travel",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":20},"01M71JPN921TSX62DXEFY1B8FJ","网易云音乐","安装网易云音乐 CLI 工具(@music163\u002Fncm-cli) - 通过 npm 全局安装","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F网易云音乐\u002FSKILL.md",[],[122,127,128,129],"工具","cli","npm",{"skillNo":131,"name":132,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M71JPF82PYTK0NYMJF8Y9E48","私家大厨","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F私家大厨\u002FSKILL.md",[],[132],{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":20},"01M71JPCK6Z5NT3G258NFKEJGG","目录树","目录树技能 - 递归扫描给定目录，输出所有目录和文件的树状结构清单","https:\u002F\u002Fgithub.com\u002FFeatherHunter\u002FSKILLS\u002Fblob\u002Fmain\u002F目录树\u002FSKILL.md",[],[143,138,144,145],"目录","文件","文件导航"]