# ai-image **Repository Path**: zhujinrun/ai-image ## Basic Information - **Project Name**: ai-image - **Description**: A local single-user image generation and editing workbench for OpenAI-compatible `gpt-image-2` relay APIs. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-01 - **Last Updated**: 2026-06-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gpt-image-2 Local Image Workbench A local single-user image generation and editing workbench for OpenAI-compatible `gpt-image-2` relay APIs. ## Features - Go backend with local-only HTTP server. - Vue 3 + Vite frontend embedded into the Go binary with `go:embed`. - Text-to-image generation through `/v1/images/generations`. - Reference image and mask editing through `/v1/images/edits`. - Local settings, job history, output preview, and image downloads. ## Development For daily frontend/backend debugging, use two terminals: ```bash make backend-dev ``` ```bash make frontend-dev ``` Then open: ```text http://127.0.0.1:5173 ``` Vite proxies `/api` to `http://127.0.0.1:4588`, so the Vue app can call the Go backend without rebuilding embedded assets. Dev data is stored in `$HOME/.ai-image-dev` by default. For production-style local verification: ```bash go test ./... make build ./ai-image ``` `web/dist` is generated by Vite and intentionally ignored because asset names include content hashes. `make build` runs the frontend build first, then embeds the generated files with the Go `frontend` build tag. ## Windows test build Build a Windows x64 executable from Linux/macOS: ```bash make windows ``` This produces: ```text ai-image-windows-amd64.exe ``` Copy that single `.exe` to Windows and double-click it. It starts a local `127.0.0.1` server on a random port and opens the browser automatically. Data is stored under the current Windows user's home directory in `.ai-image` unless `--data-dir` is provided. If the browser does not open, run it from PowerShell to see the printed local URL: ```powershell .\ai-image-windows-amd64.exe ``` Plain `go test ./...` and `go build -buildvcs=false ./cmd/ai-image` still work without `web/dist`; they embed a small fallback page instead of the Vue app. Useful flags: ```bash ./ai-image --no-browser ./ai-image --listen 127.0.0.1:8080 ./ai-image --data-dir /tmp/ai-image-data ``` The default data directory is `$HOME/.ai-image`.