docs: 清理 OpenAI 时代残留,文档改述 vivid 协议 + 渠道架构
- README/README.en 重写:同构网关 + vivid 四端点 + 渠道同步/调度, 明确不支持 OpenAI 协议上游;移除账号池/七大平台/OpenAI 兼容描述 - backend/frontend README、.env.example 更新(补 RUSTFS/COOKIE_SECURE/ CHANNEL_SECRET) - docker-compose 增加 CHANNEL_SECRET(渠道 key AES-GCM 密钥) - 清掉代码注释/文档示例里的 OpenAI/gpt-image-2 残留 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
+80
-248
@@ -1,305 +1,137 @@
|
||||
<div align="center">
|
||||
|
||||
<img src="frontend/public/favicon.svg" width="84" alt="Vivid AI" />
|
||||
<img src="frontend/public/favicon.svg" width="84" alt="image2api" />
|
||||
|
||||
<h1>image2api</h1>
|
||||
|
||||
**Multi-provider AI image / video generation gateway — one OpenAI-compatible API, seven platforms aggregated, a ready-to-run operations system**
|
||||
**vivid-protocol AI image / video generation gateway — channel-based upstream routing, a ready-to-run operations system**
|
||||
|
||||
<sub>Live instance (brand): [Vivid AI · vividai.run](https://vividai.run)</sub>
|
||||
|
||||
[简体中文](README.md) | **English**
|
||||
|
||||
[](https://vividai.run)
|
||||
[](https://vividai.run)
|
||||
|
||||
[](https://go.dev)
|
||||
[](https://vuejs.org)
|
||||
[](#-deployment)
|
||||
[](#-openai-compatible-api)
|
||||
[](#-deployment)
|
||||
[](#-supported-models--providers)
|
||||
[](#-deployment)
|
||||
[](#-license)
|
||||
|
||||
[Live Demo](https://vividai.run) · [Features](#-features) · [Deploy](#-deployment) · [API](#-openai-compatible-api) · [Community](#-community--contact)
|
||||
|
||||
<br/>
|
||||
|
||||
<img src="docs/screenshots/playground.png" alt="image2api — playground" width="860" />
|
||||
[Live Demo](https://vividai.run) · [Features](#-features) · [Deploy](#-deployment) · [API](#-vivid-protocol-api)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## 📖 Table of Contents
|
||||
## ✨ Introduction
|
||||
|
||||
- [Overview](#-overview)
|
||||
- [Screenshots](#-screenshots)
|
||||
- [Features](#-features)
|
||||
- [Supported Models / Providers](#-supported-models--providers)
|
||||
- [OpenAI-Compatible API](#-openai-compatible-api)
|
||||
- [Deployment](#-deployment)
|
||||
- [Tech Stack](#-tech-stack)
|
||||
- [Repository Layout](#-repository-layout)
|
||||
- [Roadmap](#-roadmap)
|
||||
- [Community / Contact](#-community--contact)
|
||||
- [License](#-license)
|
||||
**image2api** is a homogeneous gateway. Upstream, it connects any number of **vivid-protocol (vividai) instances** as "channels" and routes jobs across them. Downstream, it exposes the same **vivid-protocol API** to callers: `POST /v1/generate` (NDJSON stream) · `POST /v1/uploads` (presigned upload) · `GET /v1/models` · `GET /v1/balance`. No built-in provider code, no account pools — an upstream is just another vividai instance, so gateways can be layered arbitrarily.
|
||||
|
||||
## ✨ Overview
|
||||
It is more than a gateway: built-in **credit billing, CDK top-ups, online payment (epay), invite rewards, reseller pricing, user accounts, an admin console and a modern generation UI** — one command turns it into a production AI generation site. The author's live instance **[Vivid AI · vividai.run](https://vividai.run)** runs on this project.
|
||||
|
||||
**image2api** wraps the image / video capabilities of Adobe Firefly, OpenAI, Runway, Grok, Leonardo, Krea and Imagine into **a single OpenAI-compatible API**. Behind it, multi-account pools are scheduled automatically — out of quota → switch account, auth expired → refresh or kill, transient errors → retry, tokens proactively renewed before they expire — to deliver a stable service.
|
||||
> 💡 Frontend + backend fully open source (MIT). Go + Vue 3.
|
||||
|
||||
It's more than an API proxy: it ships with **credit billing, CDK top-ups, referral rewards, a user system, an admin console, and a modern generation frontend**, so a single command turns it into a fully operational AI generation site — the author's live instance **[Vivid AI · vividai.run](https://vividai.run)** (brand) is built on this project.
|
||||
|
||||
> 💡 Both frontend and backend are **fully open-source** (MIT) — Go + Vue 3, free to fork and self-host.
|
||||
|
||||
**At a glance** 🔌 OpenAI-compatible · 🤖 7 platforms, 10+ models · 🔁 auto failover / token keep-alive · 💳 credits + agent pricing · 🎨 generation frontend + admin console · 🐳 one-command deploy (bring your own TLS proxy)
|
||||
|
||||
## 🖼️ Screenshots
|
||||
|
||||
<div align="center">
|
||||
<sub>🎨 Modern generation frontend · light / dark admin console · data-driven ops dashboard</sub>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="50%"><img src="docs/screenshots/dashboard.png" alt="Dashboard" /></td>
|
||||
<td width="50%"><img src="docs/screenshots/models.png" alt="Models" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><b>📊 Dashboard</b><br/><sub>Users / volume / provider health / 24h trend</sub></td>
|
||||
<td align="center"><b>🧩 Model management</b><br/><sub>Per-model capabilities, pricing & weight</sub></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%"><img src="docs/screenshots/accounts.png" alt="Accounts" /></td>
|
||||
<td width="50%"><img src="docs/screenshots/logs.png" alt="Logs" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><b>🔑 Account pools</b><br/><sub>Multi-account pools · weight / concurrency · CRUD</sub></td>
|
||||
<td align="center"><b>📜 Call logs</b><br/><sub>Success / failure / in-progress · prompts & latency</sub></td>
|
||||
</tr>
|
||||
</table>
|
||||
**One-liner** 🔁 vivid-protocol channel mesh · 📦 save-a-channel syncs all models · 💳 credits + payment + reseller pricing · 🧩 concurrency groups · 🎨 generation UI + admin console · 🐳 one-command deploy
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
#### 🎨 Generation
|
||||
- Images + videos in one place, with **image-to-image / reference frames** (first frame, last frame, style reference)
|
||||
- Multiple resolutions (images 1K / 2K / 4K · videos 720p / 1080p), aspect ratios and video durations — configured and priced per model
|
||||
- 7 providers, 10+ models, **enable / disable / re-price from the admin console**, no code changes
|
||||
- **Model aliases**: one model can expose multiple public ids — API calls with any alias resolve to it
|
||||
- **De-AI fingerprint** (optional): one-click toggle on the playground — generated images get anti-AI-detection post-processing (subtle detail jitter + metadata stripping), charged as a per-tier surcharge (defaults 1K+1 / 2K+2 / 4K+3 credits, admin-configurable, can be disabled globally); processed works carry a "de-AI" badge across the playground, gallery, logs and admin image manager
|
||||
- Image + video in one place, with multi-modal references (images / first-last frames / video / audio) per model capability
|
||||
- Multiple resolutions (1K/2K/4K images · 720p/1080p/768p video), aspect ratios, discrete or per-second video durations — all per-model configurable and priced
|
||||
- **Priced = listed**: no enable switch — a model goes public once every tier is priced and an enabled channel serves it
|
||||
- **Model aliases**: one upstream model can map to several public ids
|
||||
- Optional **de-AI** post-processing on generated images (per-tier surcharge)
|
||||
|
||||
#### 🔌 OpenAI Compatible
|
||||
- Text-to-image `/v1/images/generations` · image-to-image `/v1/images/edits` (multipart ref upload) · video `/v1/videos` (Sora-style async: create → poll → `/content`) · `/v1/models` · balance `/v1/user/balance` (remaining / cumulative used)
|
||||
- **Strict OpenAI params**: `size` drives **both aspect ratio + resolution tier** (images by long edge → 1K/2K/4K, videos by short edge → 720p/1080p) — just swap `base_url` + `api_key` into an existing OpenAI SDK
|
||||
- Image results returned **inline as base64** — nothing stored server-side, privacy-friendly; the in-app **/docs** ships a size ↔ tier reference table
|
||||
#### 🔁 Channel routing
|
||||
- **Save = full sync**: storing a channel pulls the upstream `/v1/models`, binds everything, unbinds what disappeared and deletes orphans
|
||||
- **Weight + concurrency-aware** dispatch with failover; upstream 4xx rejections pass through in Chinese, transient errors move to the next channel
|
||||
- Channel keys stored AES-GCM encrypted (`CHANNEL_SECRET`); upstream balance probed live
|
||||
|
||||
#### 🔁 Account Pools + Smart Failover
|
||||
- Round-robin scheduling across the pool; one bad account doesn't break the whole
|
||||
- **Out of quota → switch** · **auth expired → refresh & retry / kill** · **transient → retry same account ×3** · **bad params → fail fast**
|
||||
- **Pre-deducted credits**: atomic debit before generation, auto-refunded on failure, no over-spend under concurrency
|
||||
#### 🔌 vivid-protocol API
|
||||
- `POST /v1/generate` — NDJSON stream: first frame returns `jobId`, ~25s blank-line heartbeats, terminal `succeeded`/`failed`
|
||||
- `POST /v1/uploads` — presigned PUT direct-to-storage for reference files
|
||||
- `GET /v1/models` — bare array with capability specs · `GET /v1/balance` — balance
|
||||
- **jobId reconnect**: resubmit with only `jobId` to resume a dropped stream — no duplicate job or charge; pending jobs resume after a server restart too
|
||||
- Unified errors `{"error":{"code","message"}}` (4001 rejected / 4002 insufficient / 4011 unauthorized / 4293 concurrency / 5001 server); API keys are `vk_` + 48 hex
|
||||
|
||||
#### 🔐 Automatic Token Keep-alive
|
||||
- Single-use rotating tokens (Krea / Imagine) are **renewed proactively 10 minutes before expiry**; new tokens persisted automatically
|
||||
- Adobe cookies exchanged for fresh tokens on a schedule; bare JWTs killed on expiry
|
||||
- Daily quota recovered at each provider's reset time, then re-probed for the real balance
|
||||
#### 💳 Billing & operations
|
||||
- Credits (pre-charge + auto-refund), per model/tier/duration pricing; de-AI surcharge per tier
|
||||
- **Reseller pricing**: reseller role + per-model reseller prices (API calls included)
|
||||
- **Online payment (epay)**: WeChat/Alipay QR, fixed + custom amounts, unpaid orders auto-cancel after 30 min, MD5-verified idempotent callbacks
|
||||
- **CDK codes** · invite rewards · email register / verification / password reset
|
||||
- **Concurrency groups**: per-group in-flight caps across UI + API (`0` = unlimited)
|
||||
- Roles: user / reseller / admin
|
||||
|
||||
#### 💳 Billing & Operations
|
||||
- Credit-based (**pre-deduct + refund on failure**), priced per model / resolution / duration; de-AI fingerprint adds a per-tier surcharge
|
||||
- **Agent pricing**: a user can be set as an "agent" role and models can carry agent prices; agent users (including their API key calls) are billed at the agent price, falling back to the normal price when unset
|
||||
- **Online top-up (易支付 / epay)**: WeChat / Alipay QR, preset + custom amounts, unpaid orders auto-cancel after 30 min, MD5-verified idempotent callback auto-credits; cumulative top-up tracked
|
||||
- **CDK redeem codes** · **referral rewards** · email sign-up / verification code / password reset
|
||||
- **Concurrency groups**: cap a user's simultaneous generations (playground + API key combined, `0` = unlimited), self-healing Redis counters, new users auto-join the default group
|
||||
- Three roles: regular user / agent / admin (single)
|
||||
#### 🛠️ Admin console
|
||||
- Dashboard (trends / DAU / top failures / top spenders)
|
||||
- **Channels** (save-to-sync, upstream balance, enable, concurrency, weight) · models (standard + reseller pricing, aliases, read-only listable state) · concurrency groups · orders · global logs · users · CDK · media manager · showcase · announcements · site config
|
||||
- **Banned words**: prompt hits rejected, per-word / per-user trigger stats
|
||||
|
||||
#### 🖥️ User Frontend (Vue 3)
|
||||
- Playground · creations gallery · generation logs (with failure reasons / source tags)
|
||||
- Gallery **multi-select batch ops**: select page / bulk delete (videos take their frame stills along) / bulk download (multiple files auto-packed into a zip, fetched concurrently)
|
||||
- Lightbox preview with built-in **copy original / download / close** buttons; one-click copy of the original image from cards
|
||||
- **Top-up · Orders** (recharge history / resume unpaid) · API docs · API key management · referral · about, light / dark theme
|
||||
- **In-app announcements**: a Markdown notice pops up after login and re-shows whenever its content changes
|
||||
**🧰 Engineering**: S3/RustFS media behind an authenticated proxy + retention cleanup · presigned reference uploads · self-healing maintenance (stale-job resume/refund, expired file pruning) · one-command Docker deploy (TLS is your reverse proxy's job).
|
||||
|
||||
#### 🛠️ Admin Console
|
||||
- Overview dashboard (trends / DAU / top failures / top spenders)
|
||||
- Model management (normal + agent price + aliases) · account management (bulk import / dedup / quota) · **concurrency groups** · **order management** (filter / search / paginate) · site-wide logs · user management (set as agent / assign concurrency group / view cumulative top-up / banned-word hits) · CDK · image management (multi-select bulk delete / zip download) · showcase · **announcements** · site config (incl. epay, de-AI fingerprint toggle & surcharge pricing)
|
||||
- **Banned words**: add / remove words in the console (paginated + multi-select bulk delete); prompts containing a banned word are rejected outright (playground + API, case-insensitive), with per-word / per-user hit counters
|
||||
## 🔌 Channel architecture
|
||||
|
||||
**🧰 Engineering highlights**: tls-client (Chrome JA3/JA4 fingerprint) reliably passes Cloudflare · media stored in S3/RustFS, served through an authenticated proxy with retention cleanup · self-healing maintenance loop (quota recovery / credential refresh / orphan-job cleanup with refunds) · one-command Docker deploy (TLS via your own reverse proxy).
|
||||
|
||||
## 🤖 Supported Models / Providers
|
||||
|
||||
| Provider | Models (examples) | Type |
|
||||
|---|---|---|
|
||||
| **Adobe Firefly** | firefly-image-5 · firefly-gpt-image-2 · flux-kontext-max · nano-banana-2 · nano-banana-pro · firefly-video · firefly-ray · gemini-veo31 | Image / Video |
|
||||
| **OpenAI** | gpt-image-2 | Image |
|
||||
| **Runway** | runway-gen4-turbo · runway-nano-banana-2 (Nano Banana 2) · runway-nano-banana-pro (Nano Banana Pro) | Video / Image |
|
||||
| **Grok (console.x.ai)** | grok-video (imagine text/image-to-video), grok-image / grok-image-quality (imagine text/image-to-image) | Video / Image |
|
||||
| **Leonardo.ai** | seedream-4.5 | Image |
|
||||
| **Krea.ai** | flux-klein-2 | Image |
|
||||
| **Imagine.art** | imagine-1.5 · imagine-1.5pro | Image |
|
||||
|
||||
> Models are enabled and priced dynamically from the admin console — add or remove anytime.
|
||||
|
||||
## 🔌 OpenAI-Compatible API
|
||||
|
||||
```bash
|
||||
# Text-to-image — pure OpenAI params: size drives both aspect ratio + tier (long edge <1800→1K / <3500→2K / ≥3500→4K)
|
||||
curl https://your-domain/v1/images/generations \
|
||||
-H "Authorization: Bearer sk-xxxx" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "gpt-image-2",
|
||||
"prompt": "a cute cat on a desk, studio lighting",
|
||||
"size": "2048x2048"
|
||||
}'
|
||||
|
||||
# Image-to-image — multipart reference upload (multiple via image[])
|
||||
curl https://your-domain/v1/images/edits \
|
||||
-H "Authorization: Bearer sk-xxxx" \
|
||||
-F model="seedream-4.5" -F prompt="make it cyberpunk" -F image=@input.png
|
||||
```
|
||||
caller ──vivid protocol──▶ image2api ──vivid protocol──▶ upstream vividai A (weight w, conc c)
|
||||
(this host) ├─ upstream vividai B
|
||||
└─ …any number
|
||||
```
|
||||
|
||||
Images return OpenAI-style `{ "created": ..., "data": [{ "b64_json": "..." }] }` (raw base64, no `data:` prefix, nothing stored server-side). **Video** is async: `POST /v1/videos` → poll `GET /v1/videos/{id}` until `completed` → `GET /v1/videos/{id}/content` for the mp4. Full parameters are documented on the in-app **/docs** page.
|
||||
- A channel = a homogeneous upstream: `base_url` + `vk_` key + enable switch + concurrency cap + routing weight
|
||||
- Models come from the upstream `/v1/models` sync; locally they only get aliases and pricing; **one model can fail over across channels**
|
||||
- This service speaks the same protocol externally — it can itself be mounted as someone's channel, infinitely nestable
|
||||
- **No OpenAI-protocol upstreams**: a channel must be a vivid-protocol instance
|
||||
|
||||
## 📡 vivid-protocol API
|
||||
|
||||
```bash
|
||||
# generate — NDJSON stream; first frame returns jobId
|
||||
curl -N https://your-domain/v1/generate \
|
||||
-H "Authorization: Bearer vk_xxxxxxxx" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"model": "seedance-2.0", "prompt": "a cute cat on a desk", "ratio": "16:9", "quality": "720p"}'
|
||||
# → {"jobId":"…","status":"running"} …heartbeats… {"status":"succeeded","outputs":[{"url":"…"}]}
|
||||
|
||||
# reconnect — resubmit with only jobId, no duplicate job
|
||||
curl -N https://your-domain/v1/generate -H "Authorization: Bearer vk_xxxx" -d '{"jobId":"<jobId>"}'
|
||||
|
||||
# reference files — presigned upload session, then PUT the bytes
|
||||
curl https://your-domain/v1/uploads -H "Authorization: Bearer vk_xxxx" -d '{"kind":"image","mime":"image/png"}'
|
||||
|
||||
curl https://your-domain/v1/models -H "Authorization: Bearer vk_xxxx"
|
||||
curl https://your-domain/v1/balance -H "Authorization: Bearer vk_xxxx"
|
||||
```
|
||||
|
||||
Full parameters, the error-code table and Python examples live on the in-app **/docs** page.
|
||||
|
||||
## 🚀 Deployment
|
||||
|
||||
> Domain + HTTPS are handled by your own reverse proxy (this project issues no certificates).
|
||||
**Docker (recommended)**: `docker compose up -d --build` brings up PostgreSQL + Redis + RustFS + backend + frontend (nginx listens on container **HTTP :2000**); point your reverse proxy at `http://<host>:2000`.
|
||||
|
||||
**Docker (recommended)**: `docker compose up -d --build` brings up PostgreSQL + Redis + RustFS + backend + frontend (nginx serving **HTTP on container port 2000**); point your reverse proxy at `http://<host>:2000` (port via `WEB_PORT`; edit the values (passwords / keys / `CORS_ORIGINS`, and `COOKIE_SECURE=true` when your proxy serves HTTPS) directly in `docker-compose.yml`).
|
||||
> ⚠️ Change the secrets in `docker-compose.yml` before deploying — especially **`CHANNEL_SECRET`** (encrypts stored channel keys; rotating it makes saved keys undecryptable).
|
||||
|
||||
Or **build from source** — bring your own **PostgreSQL · Redis · RustFS (or any S3) · reverse proxy**:
|
||||
Manual build needs PostgreSQL · Redis · RustFS (or any S3) · a reverse proxy — see `backend/.env.example` for all env vars.
|
||||
|
||||
```bash
|
||||
# 1. Create an empty database (the backend auto-migrates on start)
|
||||
createdb vivid_ai
|
||||
After deploy: admin → Channels → add channel (upstream URL + `vk_` key) → models auto-sync → price them in 模型管理 → done.
|
||||
|
||||
# 2. Configure and build the backend from source
|
||||
cat > backend/.env <<'EOF'
|
||||
APP_ENV=production
|
||||
HTTP_ADDR=127.0.0.1:6666
|
||||
POSTGRES_DSN=host=127.0.0.1 user=postgres password=YOUR_PASSWORD dbname=vivid_ai port=5432 sslmode=disable TimeZone=Asia/Shanghai
|
||||
REDIS_ADDR=127.0.0.1:6379
|
||||
RUSTFS_ENDPOINT=http://127.0.0.1:9000
|
||||
RUSTFS_BUCKET=vivid-ai
|
||||
RUSTFS_ACCESS_KEY=YOUR_AK
|
||||
RUSTFS_SECRET_KEY=YOUR_SK
|
||||
CORS_ORIGINS=https://your-domain
|
||||
COOKIE_SECURE=true
|
||||
EOF
|
||||
cd backend && go build -o bin/api ./cmd/api && ./bin/api # listens on 127.0.0.1:6666
|
||||
## 🧱 Stack
|
||||
|
||||
# 3. Build the frontend (output in frontend/dist)
|
||||
cd frontend && npm install && npm run build
|
||||
```
|
||||
|
||||
Nginx reverse proxy (issue the certificate yourself with certbot / acme.sh):
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name your-domain;
|
||||
ssl_certificate /path/fullchain.pem;
|
||||
ssl_certificate_key /path/privkey.pem;
|
||||
root /path/to/frontend/dist;
|
||||
index index.html;
|
||||
client_max_body_size 50m;
|
||||
proxy_read_timeout 600s; # video generation can take a while
|
||||
|
||||
location /assets/ { expires 1y; add_header Cache-Control "public, max-age=31536000, immutable"; }
|
||||
location / { try_files $uri $uri/ /index.html; add_header Cache-Control "no-cache"; }
|
||||
location ^~ /admin/api/ { proxy_pass http://127.0.0.1:6666; }
|
||||
location ^~ /images/ { proxy_pass http://127.0.0.1:6666; }
|
||||
location = /health { proxy_pass http://127.0.0.1:6666; }
|
||||
location ^~ /v1/ { proxy_pass http://127.0.0.1:6666; add_header Cache-Control "no-store" always; }
|
||||
}
|
||||
```
|
||||
|
||||
> See `backend/.env.example` for the full set of environment variables.
|
||||
|
||||
</details>
|
||||
|
||||
## 🧱 Tech Stack
|
||||
|
||||
| Layer | Technology |
|
||||
| Layer | Tech |
|
||||
|---|---|
|
||||
| Backend | Go · gin · gorm (PostgreSQL) · go-redis · tls-client (Chrome fingerprint) |
|
||||
| Backend | Go · gin · gorm (PostgreSQL) · go-redis |
|
||||
| Frontend | Vue 3 · Vue Router · Vite · Tailwind CSS v4 |
|
||||
| Infrastructure | PostgreSQL · Redis · RustFS (S3-compatible) · Nginx |
|
||||
| Infra | PostgreSQL · Redis · RustFS (S3-compatible) · Nginx |
|
||||
|
||||
## 📦 Repository Layout
|
||||
|
||||
```
|
||||
backend/ Backend source (Go)
|
||||
├── cmd/
|
||||
│ ├── api/ Service entry point (main)
|
||||
│ └── marklabel/ Ops helper (mark accounts on demand)
|
||||
├── internal/
|
||||
│ ├── bootstrap/ App wiring, scheduled maintenance startup
|
||||
│ ├── config/ Env-var configuration loading
|
||||
│ ├── http/
|
||||
│ │ ├── handler/ HTTP handlers (v1-compatible API, admin, auth…)
|
||||
│ │ ├── middleware/ Auth / request-id middleware
|
||||
│ │ └── router/ Route registration
|
||||
│ ├── model/ GORM data models
|
||||
│ ├── provider/ Upstream provider clients
|
||||
│ │ ├── adobe/ Adobe Firefly (tls-client fingerprint)
|
||||
│ │ ├── chatgpt/ OpenAI (incl. PoW / turnstile)
|
||||
│ │ ├── runway/ Runway video + Nano Banana image
|
||||
│ │ ├── grok/ Grok (console.x.ai DPoP, video / image; account state via grok.com)
|
||||
│ │ ├── leonardo/ Leonardo
|
||||
│ │ ├── krea/ Krea
|
||||
│ │ ├── imagine/ Imagine.art
|
||||
│ │ ├── custom/ Custom upstream (OpenAI-compatible v1, routed by id)
|
||||
│ │ └── epay/ 易支付 / epay (mapi order + MD5-verified callback, top-ups)
|
||||
│ ├── repo/ Data-access layer (users / models / accounts / logs / CDK / orders / concurrency groups…)
|
||||
│ ├── service/ Business logic (scheduling, billing, account pools, keep-alive, maintenance)
|
||||
│ └── storage/ RustFS / S3 media storage
|
||||
├── Dockerfile Multi-stage build (compile source → slim runtime image)
|
||||
└── .env.example Backend env-var template
|
||||
|
||||
frontend/ Frontend source (Vue 3 + Vite)
|
||||
├── src/
|
||||
│ ├── views/ Pages (playground / accounts / models / users / concurrency / orders / logs / overview / top-up / settings…)
|
||||
│ ├── components/ Reusable components (modals / selectors / lightbox…)
|
||||
│ ├── layouts/ Public / admin layouts
|
||||
│ ├── utils/ Utility functions
|
||||
│ └── api.js · auth.js … API client, auth, theme, credits, etc.
|
||||
├── Dockerfile Nginx static hosting (HTTP :2000) + API proxy
|
||||
└── default.conf.template Nginx site template (reverse proxy + caching)
|
||||
|
||||
docker-compose.yml Docker orchestration (Postgres / Redis / RustFS / backend / frontend)
|
||||
```
|
||||
|
||||
## 🗺️ Roadmap
|
||||
|
||||
- [ ] More upstream providers
|
||||
- [ ] Usage analytics / export
|
||||
- [ ] Multi-language UI (i18n)
|
||||
- [ ] Webhook / async callbacks
|
||||
|
||||
## 💬 Community / Contact
|
||||
## 💬 Contact
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| 🌐 Website | **[vividai.run](https://vividai.run)** |
|
||||
| 👥 QQ Group | **1106849765** · [Join](https://qm.qq.com/q/976LeMFoHu) |
|
||||
| 🐧 QQ | **1114639355** · [Add](https://qm.qq.com/q/ItgCcNA7ac) |
|
||||
| 🛒 Shop | **[pay.ldxp.cn/shop/chiyi](https://pay.ldxp.cn/shop/chiyi)** |
|
||||
| 🌐 Site | **[vividai.run](https://vividai.run)** |
|
||||
| 👥 QQ group | **1106849765** · [join](https://qm.qq.com/q/976LeMFoHu) |
|
||||
| 🐧 QQ | **1114639355** · [add](https://qm.qq.com/q/ItgCcNA7ac) |
|
||||
| ✉️ Email | vividairun@gmail.com |
|
||||
|
||||
## ⭐ Star History
|
||||
|
||||
<!-- After creating the GitHub repo, uncomment the line below and replace OWNER with your username to show the chart: -->
|
||||
<!-- [](https://star-history.com/#OWNER/image2api&Date) -->
|
||||
|
||||
If you find this useful, give it a ⭐ — uncomment the line above after creating the repo to show the Star History chart.
|
||||
|
||||
## 📄 License
|
||||
|
||||
This project (frontend + backend) is open-source under the [MIT](LICENSE) license — free to use, modify, commercialize and redistribute.
|
||||
|
||||
<div align="center">
|
||||
|
||||
If this project helps you, a ⭐ Star is much appreciated!
|
||||
|
||||
</div>
|
||||
MIT — see [LICENSE](LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user