{"id":51026700,"url":"https://github.com/gitstq/sub2api-image-generator","last_synced_at":"2026-06-21T20:02:14.085Z","repository":{"id":361363570,"uuid":"1254094317","full_name":"gitstq/sub2api-image-generator","owner":"gitstq","description":"专为sub2api打造的iframe嵌入式AI图片生成工具，纯前端实现，无依赖开箱即用。支持文生图、图生图、多种分辨率、批量生成和历史记录功能。","archived":false,"fork":false,"pushed_at":"2026-05-30T08:59:26.000Z","size":1942,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T10:22:30.469Z","etag":null,"topics":["ai-image-generation","frontend","gpt-image-2","html-css-javascript","iframe","no-dependencies","openai","sub2api","text-to-image"],"latest_commit_sha":null,"homepage":"https://text.ahg.codes/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gitstq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-30T06:17:39.000Z","updated_at":"2026-05-30T08:59:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gitstq/sub2api-image-generator","commit_stats":null,"previous_names":["gitstq/sub2api-image-generator"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gitstq/sub2api-image-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fsub2api-image-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fsub2api-image-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fsub2api-image-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fsub2api-image-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitstq","download_url":"https://codeload.github.com/gitstq/sub2api-image-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fsub2api-image-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34623906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-image-generation","frontend","gpt-image-2","html-css-javascript","iframe","no-dependencies","openai","sub2api","text-to-image"],"created_at":"2026-06-21T20:02:13.388Z","updated_at":"2026-06-21T20:02:14.080Z","avatar_url":"https://github.com/gitstq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 蓝鹰AI - 在线图片生成\n\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n![HTML5](https://img.shields.io/badge/HTML5-E34F26?logo=html5\u0026logoColor=white)\n![CSS3](https://img.shields.io/badge/CSS3-1572B6?logo=css3\u0026logoColor=white)\n![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?logo=javascript\u0026logoColor=black)\n\n\u003e 专为 [sub2api](https://github.com/Wei-Shaw/sub2api) 项目打造的 iframe 嵌入式 AI 图片生成工具  \n\u003e 无需配置，嵌入即用\n\n[在线演示](https://text.ahg.codes/) · [报告问题](https://github.com/Wei-Shaw/sub2api/issues) · [相关项目](https://github.com/Wei-Shaw/sub2api)\n\n\u003c/div\u003e\n\n---\n\n## 目录\n\n- [项目简介](#项目简介)\n- [界面展示](#界面展示)\n- [功能特性](#功能特性)\n- [技术架构](#技术架构)\n- [使用方法](#使用方法)\n- [项目结构](#项目结构)\n- [工作原理](#工作原理)\n- [支持的模型](#支持的模型)\n- [许可证](#许可证)\n\n---\n\n## 项目简介\n\n本项目是一个轻量级的 AI 图片生成前端页面，专门为 sub2api 项目设计，通过 iframe 嵌入方式集成到 sub2api 后台，实现无缝使用 OpenAI 图片生成功能。\n\n---\n\n## 界面展示\n\n### 主页面\n\n![主页面](img/1.png)\n\n### 嵌入到 sub2api 的样式\n\n![嵌入到sub2api的样式](img/2.png)\n\n---\n\n## 功能特性\n\n| 功能 | 说明 |\n|:-----|:-----|\n| **文生图** | 输入描述性提示词，AI 自动生成对应图片 |\n| **图生图** | 上传参考图，基于参考图进行二次创作 |\n| **多种分辨率** | 支持 1:1、16:9、4:3、3:4、9:16 等画面比例 |\n| **多档质量** | 支持自动、低、中、高质量选择 |\n| **批量生成** | 单次可生成 1-5 张图片 |\n| **历史记录** | 自动保存最近 30 条生成记录 |\n| **费用预估** | 实时显示生成费用 |\n\n---\n\n## 技术架构\n\n```\n┌─────────────────────────────────────────────────────────┐\n│                      浏览器前端                          │\n├─────────────────────────────────────────────────────────┤\n│  HTML5  │    CSS3     │    JavaScript (原生)             │\n├─────────────────────────────────────────────────────────┤\n│                  iframe 通信协议                         │\n├─────────────────────────────────────────────────────────┤\n│                    sub2api 后台                          │\n└─────────────────────────────────────────────────────────┘\n```\n\n- **纯前端实现**：HTML + CSS + JavaScript，无任何外部依赖\n- **开箱即用**：无需安装，直接部署即可使用\n- **无缝集成**：完美适配 sub2api 的 iframe 通信协议\n\n---\n\n## 使用方法\n\n### 方式一：嵌入到 sub2api（推荐）\n\n在 sub2api 后台的 **iframe 设置** 页面，添加以下地址：\n\n```\nhttps://text.ahg.codes\n```\n\n保存后即可在后台直接使用图片生成功能。\n\n### 方式二：本地部署\n\n将项目文件部署到任意静态服务器：\n\n```bash\n# 使用 Node.js 的 http-server\nnpx http-server -p 8080\n\n# 或使用 Python\npython -m http.server 8080\n\n# 或使用 PHP\nphp -S localhost:8080\n```\n\n---\n\n## 项目结构\n\n```\n.\n├── index.html      # 主页面\n├── main.js         # 核心逻辑\n├── styles.css      # 样式文件\n├── img/\n│   ├── 1.png       # 主页面截图\n│   └── 2.png       # 嵌入样式截图\n└── loog.png        # Logo 图标\n```\n\n---\n\n## 工作原理\n\n本页面通过 URL 参数从 sub2api 获取认证信息：\n\n| 参数 | 说明 |\n|:-----|:-----|\n| `token` | 用户认证令牌 |\n| `src_host` | sub2api 服务地址 |\n| `user_id` | 用户 ID |\n| `ui_mode` | 界面模式（embedded） |\n\n页面加载后会自动调用 sub2api 的 `/api/v1/keys` 接口获取可用的 API 密钥列表，用户选择密钥后即可开始生成图片。\n\n---\n\n## 支持的模型\n\n| 模型 | 状态 | 说明 |\n|:-----|:----:|:-----|\n| `gpt-image-2` | 推荐 | 最新模型，效果最佳 |\n| `gpt-image-1.5` | 稳定 | 稳定版本，兼容性好 |\n| `gpt-image-1` | 基础 | 早期版本，基础功能 |\n\n---\n\n## 相关项目\n\n- [sub2api](https://github.com/Wei-Shaw/sub2api) - API 密钥管理与中转服务\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## 许可证\n\nMIT License\n\nCopyright (c) 2024 蓝鹰AI\n\n![Footer](https://img.shields.io/badge/ Made_with_❤️-by_蓝鹰AI-blue)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fsub2api-image-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitstq%2Fsub2api-image-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fsub2api-image-generator/lists"}