aradotso avatar

Gpt2api Openai Gateway

This is a self-hosted gateway that reverse-engineers chatgpt.com to expose GPT Image 2 and DALL·E 3 through standard OpenAI API endpoints. You get multi-account pooling, proxy rotation, rate limiting, and a billing dashboard, all packaged in Docker Compose with MySQL and Redis. The main appeal is turning ChatGPT's image generation into something you can call from the OpenAI SDK without dealing with web sessions manually. It handles account rotation automatically and includes img2img edits via multipart uploads. Setup requires generating AES keys for encrypting stored tokens and adding ChatGPT accounts via JSON import. If you need batch image generation at scale or want to abstract away ChatGPT account management, this does the plumbing work.

skills.sh installs
276
GitHub stars
26
last updated
Jun 3, 2026

Install

$ npx -y skills add aradotso/trending-skills --skill gpt2api-openai-gateway --agent claude-code

Installs into .claude/skills of the current project.

Files

gpt2api OpenAI Gateway

Skill by ara.so — Daily 2026 Skills collection.

gpt2api is a self-hosted OpenAI-compatible API gateway that reverse-engineers chatgpt.com to expose GPT Image 2 / DALL·E 3 / IMG2 grayscale capabilities via standard /v1/images/generations, /v1/images/edits, and /v1/chat/completions endpoints. It provides multi-account pooling, proxy pooling, rate limiting, credit billing, and an admin dashboard.


Installation & Deployment

Docker Compose (Recommended)

git clone https://github.com/432539/gpt2api.git
cd gpt2api/deploy
cp .env.example .env

Edit .env — these three are required:

JWT_SECRET=<generate with: openssl rand -base64 48 | tr -d '=/+' | cut -c1-48>
CRYPTO_AES_KEY=<generate with: openssl rand -hex 32>
MYSQL_ROOT_PASSWORD=<strong-password>
MYSQL_PASSWORD=<strong-password>

Generate secrets:

# CRYPTO_AES_KEY (must be exactly 64 hex chars = 32 bytes AES-256)
openssl rand -hex 32

# JWT_SECRET (>=32 chars)
openssl rand -base64 48 | tr -d '=/+' | cut -c1-48

Start services:

docker compose up -d --build
docker compose logs -f server

Sponsors

Details

Repository
github.com/aradotso/trending-skills
Categories
Backend & APIs, AI & Agent Building
First seen
Jun 3, 2026

More from aradotso/trending-skills

All 251
1patricio0312rev avatarmcp-server-builderpatricio0312rev/skillsBuilds Model Context Protocol (MCP) servers for Claude with tools, resources, and prompts. Use when users request "create MCP server", "build Claude tool", "MCP265skills.sh installs
2neondatabase avatarneon-authneondatabase/ai-rulesneon auth264skills.sh installs
3vercel-labs avatarrouting-middlewarevercel-labs/vercel-pluginrouting middleware264skills.sh installs
4davila7 avatarclinpgx-databasedavila7/claude-code-templatesAccess ClinPGx pharmacogenomics data (successor to PharmGKB). Query gene-drug interactions, CPIC guidelines, allele functions, for precision medicine and genoty261skills.sh installs
5sickn33 avatarsupabase-automationsickn33/antigravity-awesome-skillssupabase automation261skills.sh installs
6vercel-labs avatarai-gatewayvercel-labs/vercel-pluginai gateway260skills.sh installs