/install ai-lmage-for-file-repair
\r \r
AI Image for File Repair skill介绍\r
\r 🚀 Quick Overview \r Generate stunning AI images from simple text prompts for free. \r Powered by Gemini-level AI image generation technology. \r Create illustrations, product images, concept art, and social media visuals in seconds.\r \r 🧠 Skill Overview \r AI Image for File Repair is a free AI image generation skill that allows users to create high-quality visuals from text prompts. \r Powered by Gemini-level image generation capabilities, this tool understands natural language descriptions and transforms them into detailed images such as illustrations, concept art, marketing visuals, and product designs. \r Each user can generate up to 5 images for free, making it perfect for experimenting with AI art and creative ideas.\r \r ✨ Key Features \r 🎨 Text-to-Image Generation \r Generate detailed images from simple text prompts. \r ⚡Gemini-Level AI Quality \r Image generation capability comparable to Gemini 2.5. \r 🆓 Free AI Image Generation \r Generate up to 5 images for free. \r 🎭Multiple Styles \r Supports various styles including:\r
- Realistic photography\r
- Anime illustration\r
- Cyberpunk art\r
- Concept design\r
- Minimalist poster\r \r 🎨 Example Prompts \r Try prompts like:\r
- A futuristic cyberpunk city at night, neon lights, ultra detailed\r
- A cute shiba inu astronaut floating in space, cartoon style\r
- Luxury product photography, studio lighting, black background\r
- Fantasy castle on a floating island, epic concept art\r
- Minimalist poster design, pastel colors, modern style\r \r 🚀 Use Cases \r This skill is perfect for:\r
- AI art creation\r
- Social media images\r
- Marketing visuals\r
- Product mockups\r
- Game concept art\r
- Creative inspiration\r \r 💡 Why Use This Skill \r
- Gemini-level AI image generation\r
- Free image generation (5 images)\r
- Fast and easy to use\r
- High-quality visuals\r
- Perfect for creators and designers\r \r ⚡ Quick Start \r 1️⃣ Enter a detailed prompt \r 2️⃣ Generate your AI image \r 3️⃣ Download or use the generated image\r \r 🔥 Trending Prompts\r
- AI influencer portrait\r
- Cyberpunk city\r
- Anime character design\r
- Luxury product photo\r
- Minimalist poster\r \r 🏷 Tags\r
- AI image generator\r
- AI art\r
- text to image\r
- AI illustration\r
- AI design\r
- Gemini AI\r
- AI image creator\r \r
Overview\r
\r
ai-lmage-for-file-repair exposes an async, job-based image generation API:\r
\r
- Submit a generation request → receive a
task_id\r - Poll status → on success returns
result.file_url(OSS URL) for download/display\r - On failure returns a structured
errorpayload\r \r
Use cases\r
\r
- Text-to-image: generate images from a prompt\r
- Image-to-image: provide an input image (Base64) plus a prompt\r
- Serverless / multi-instance: task status + result are persisted in KV (not in-memory)\r \r
Access\r
\r
- Base URL: value of the
AI_IMAGE_HOSTenvironment variable, e.g.http://localhost:9000\r - Auth: every request must include header
x-api-keywith the value ofAI_IMAGE_API_KEY\r \r Header example:\r \r
-H "x-api-key: ${AI_IMAGE_API_KEY}"\r
```\r
\r
> Configuration example (local development): \r
> - `AI_IMAGE_HOST=https://file-repiar-wfaxciicwy.ap-southeast-1.fcapp.run` (this is the default when you run this repo's `index.js` locally) \r
> - `AI_IMAGE_API_KEY=s8cxRtUxNcNEL4um`\r
\r
## Quota & limits\r
\r
- **Daily limit**: **5 images per IP per day (free)**\r
- The service uses the first IP in `x-forwarded-for`; if absent it falls back to `req.ip`\r
- If you're behind a gateway/CDN, ensure `x-forwarded-for` is correctly forwarded, otherwise multiple users may share the same outbound IP quota\r
\r
## Endpoints\r
\r
- `GET /quota`: check today's usage and remaining quota\r
- `POST /generate`: submit a generation job (text-to-image / image-to-image)\r
- `GET /status/:taskId`: check job status and retrieve the download URL\r
\r
## Contracts (request/response)\r
\r
### 1) `GET /quota`\r
\r
Response:\r
\r
```json\r
{\r
"client_id": "ip:203.0.113.10",\r
"date": "2026-03-10",\r
"used": 1,\r
"limit": 3,\r
"remaining": 2\r
}\r
```\r
\r
### 2) `POST /generate`\r
\r
- **Content-Type**: `application/json`\r
\r
Request body (text-to-image):\r
\r
- **prompt** (required, string): the prompt\r
- **negative_prompt** (optional, string): negative prompt\r
- **aspect_ratio** (optional, string): e.g. `"1:1"`, `"16:9"`\r
- **width/height** (optional, number|string): size (may be ignored by the model)\r
- **seed** (optional, number|string): seed\r
\r
For image-to-image, add:\r
\r
- **input_image_base64** (optional, string): input image Base64 (**without** the `data:image/...;base64,` prefix)\r
- **input_image_mime_type** (required when `input_image_base64` is provided, string): e.g. `image/png`, `image/jpeg`\r
\r
Success response:\r
\r
```json\r
{ "task_id": "xxxxxxxxxxxxxxxx" }\r
```\r
\r
### 3) `GET /status/:taskId`\r
\r
Common fields:\r
\r
- **status**: `queued` / `running` / `succeeded` / `failed`\r
- **result**: present on success; `null` on failure\r
- **error**: present on failure; `null` on success\r
\r
Success example:\r
\r
```json\r
{\r
"task_id": "xxxxxxxxxxxxxxxx",\r
"status": "succeeded",\r
"created_at": 1760000000000,\r
"updated_at": 1760000005000,\r
"started_at": 1760000001000,\r
"finished_at": 1760000004500,\r
"error": null,\r
"result": {\r
"file_url": "https://ts-xxx.oss-cn-shenzhen.aliyuncs.com/ai-photo/20260117070932_user-card-bg.png",\r
"file_name": "user-card-bg.png",\r
"mime_type": "image/png"\r
}\r
}\r
```\r
\r
Failure example (shape):\r
\r
```json\r
{\r
"task_id": "xxxxxxxxxxxxxxxx",\r
"status": "failed",\r
"error": {\r
"message": "Upstream HTTP 401",\r
"code": "UPSTREAM_ERROR",\r
"statusCode": 401,\r
"upstream": {}\r
},\r
"result": null\r
}\r
```\r
\r
## Recommended flow\r
\r
1. Call `GET /quota` and ensure `remaining > 0`\r
2. Call `POST /generate` to get a `task_id`\r
3. Poll `GET /status/:taskId`\r
- `queued/running`: poll every 1–2 seconds (recommend polling up to 30–60 seconds; you can retry later)\r
- `succeeded`: download/display via `result.file_url`\r
- `failed`: show `error.message` and stop\r
\r
## Examples\r
\r
### Text-to-image (macOS/Linux: curl)\r
\r
```bash\r
curl -X POST "${AI_IMAGE_HOST}/generate" \\r
-H "Content-Type: application/json" \\r
-H "x-api-key: ${AI_IMAGE_API_KEY}" \\r
-d '{\r
"prompt": "一只戴墨镜的柯基,赛博朋克霓虹灯风格,高清",\r
"aspect_ratio": "1:1"\r
}'\r
```\r
\r
### Text-to-image (Windows: PowerShell)\r
\r
```powershell\r
$body = @{\r
prompt = "A corgi wearing sunglasses, cyberpunk neon, high detail"\r
aspect_ratio = "1:1"\r
} | ConvertTo-Json -Depth 10\r
\r
Invoke-RestMethod -Method Post "$env:AI_IMAGE_HOST/generate" `\r
-Headers @{ "x-api-key"=$env:AI_IMAGE_API_KEY } `\r
-ContentType "application/json" `\r
-Body $body\r
```\r
\r
### Image-to-image (Windows: PowerShell)\r
\r
```powershell\r
$b64 = [Convert]::ToBase64String([IO.File]::ReadAllBytes("input.png"))\r
\r
$body = @{\r
prompt = "Enhance and restore this image, keep the subject, photo-realistic"\r
input_image_base64 = $b64\r
input_image_mime_type = "image/png"\r
} | ConvertTo-Json -Depth 10\r
\r
Invoke-RestMethod -Method Post "$env:AI_IMAGE_HOST/generate" `\r
-Headers @{ "x-api-key"=$env:AI_IMAGE_API_KEY } `\r
-ContentType "application/json" `\r
-Body $body\r
```\r
\r
### Image-to-image (macOS/Linux: curl)\r
\r
> Tip: the `base64` flags differ across platforms. The PowerShell example above is the most portable for Windows.\r
\r
```bash\r
IMG_B64="$(base64 -i input.png | tr -d '\
')"\r
\r
curl -X POST "${AI_IMAGE_HOST}/generate" \\r
-H "Content-Type: application/json" \\r
-H "x-api-key: ${AI_IMAGE_API_KEY}" \\r
-d "{\r
\"prompt\": \"Enhance and restore this image, keep the subject, photo-realistic\",\r
\"input_image_base64\": \"${IMG_B64}\",\r
\"input_image_mime_type\": \"image/png\"\r
}"\r
```\r
\r
### Download result (any OS with curl)\r
\r
```bash\r
curl -L "\x3Cfile_url>" -o "output.png"\r
```\r
\r
## Errors & troubleshooting\r
\r
- **HTTP 400**: missing/invalid parameters (common: empty `prompt`; or missing `input_image_mime_type` for image-to-image)\r
- **HTTP 401**: missing/invalid `x-api-key`\r
- **HTTP 429**: quota exceeded (5 images per IP per day)\r
- **HTTP 500**: internal server error (inspect `error.upstream` and server logs)\r
\r
## Recommended (optional)\r
\r
If you require more extensive or advanced format repair support, or you need audio/image repair, please visit: https://bit.ly/4roS6Rv\r
\r
We offer the following services:\r
\r
●Effortlessly repair videos, photos and files that are blurry, overexposed and corrupted.\r
●AI enhance photo quality, sharpen detail, and colorize photos.\r
●Effectively improve video quality and boost resolution up to 8K.\r
●Extend, fill, and restyle your images with AI. No quality loss.\r
●Expertly repair corrupted files, including Word, Excel, PPTX, EPUB, PDF, PSD, PSB, and more.\r
●Seamlessly repair corrupted audio files in M4A, MP3, AAC, WAV and FLAC formats.\r
●Convert PNG, HEIC, CR2, BMP -> JPG for repair & enhance\r
\r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ai-lmage-for-file-repair - 安装完成后,直接呼叫该 Skill 的名称或使用
/ai-lmage-for-file-repair触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
ai lmage 是什么?
Async AI image generation (text-to-image and image-to-image). Submit a job to get a task_id, then poll status to get an OSS download URL. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 399 次。
如何安装 ai lmage?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-lmage-for-file-repair」即可一键安装,无需额外配置。
ai lmage 是免费的吗?
是的,ai lmage 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
ai lmage 支持哪些平台?
ai lmage 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 ai lmage?
由 ilpvc(@ilpvc)开发并维护,当前版本 v1.0.3。