An open-source AI image generation platform built with Next.js and Convex, with support for multiple image models. Generate images from text, edit existing images, organize them in a personal gallery, and track usage analytics — all in one place.
Live demo: eikonstudio.xyz
- Text-to-image and image-editing modes
- Three integrated image variants: Nano Banana 2, Nano Banana Pro, and OpenAI GPT Image 2 — switch per generation
- Public, source-backed
/modelscatalog spanning all ten Eikon model families - Personal gallery with folder organization
- Usage analytics dashboard
- Google OAuth authentication (via Better Auth + Convex)
- Public REST API for programmatic image generation
- Real-time sync powered by Convex
- Frontend: Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS v4
- Backend: Convex (real-time database + serverless functions)
- Auth: Better Auth with the
@convex-dev/better-authcomponent (Google OAuth) - AI: Google Gemini (
gemini-3.1-flash-image,gemini-3-pro-image) and OpenAI (gpt-image-2) - UI: Radix UI + shadcn/ui patterns
The canonical registry in @eikonstudio/core is checked against first-party provider documentation as of 2026-08-02. It records every verified variant, including preview, deprecated, entitlement-restricted, and not-yet-executable models. A provider listing a model does not mean Eikon can execute it.
Only these catalog entries are currently marked Eikon ready and appear in the image creator:
gemini-3.1-flash-image— Nano Banana 2gemini-3-pro-image— Nano Banana Progpt-image-2— GPT Image 2
All other entries remain visible at /models as discovered metadata and are excluded from generation selectors until a provider adapter is actually integrated.
- Node.js 20+
- pnpm 10.18.3+
- A Google Gemini API key
- (Optional) An OpenAI API key if you want to use GPT Image 2
- A Convex account (free tier works)
- Google OAuth credentials from the Google Cloud Console
git clone https://github.com/MohtashamMurshid/eikonstudio.git
cd eikonstudio
pnpm installtouch apps/web/.env.localFill in the required values in apps/web/.env.local.
In a separate terminal, run:
pnpm dev:convexThis provisions a dev deployment, writes CONVEX_DEPLOYMENT / NEXT_PUBLIC_CONVEX_URL
into apps/web/.env.local, and keeps the backend in sync with your
apps/web/convex/ folder.
Provider credential encryption: configure a unique 32-byte base64 secret on the Convex deployment before saving or resolving provider credentials:
openssl rand -base64 32 pnpm --dir apps/web exec convex env set CREDENTIAL_ENCRYPTION_SECRET '<generated-value>'Existing pre-v2 records are read-only compatible only when
LEGACY_CREDENTIAL_ENCRYPTION_SECRETis explicitly set to the deployment's formerENCRYPTION_SECRETvalue. There is no default/fallback secret. Re-save each legacy credential to rewrite it as AES-256-GCM, then remove the legacy secret after inventory confirms no legacy records remain.
In the Google Cloud Console:
-
Create an OAuth 2.0 Client ID (Web application).
-
Add
http://localhost:3000/api/auth/callback/googleas an authorized redirect URI for local development. Addhttps://<your-production-domain>/api/auth/callback/googleseparately for production. This Next.js app proxies auth through/api/auth, so Google returns to the app's origin. -
Configure
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETon the corresponding Convex deployment. Values inapps/web/.env.localare not automatically copied to Convex. -
Set the development Convex deployment's auth base URL:
pnpm --dir apps/web exec convex env set SITE_URL http://localhost:3000
Keep
NEXT_PUBLIC_SITE_URL=http://localhost:3000inapps/web/.env.local, and keep the production deployment'sSITE_URLset to its HTTPS domain.convex/auth.tsreadsSITE_URLfrom Convex;DEV_SITE_URLis not used. If local Google sign-in redirects to production, check this deployment setting first, then begin a fresh sign-in from/auth.
pnpm devOpen http://localhost:3000.
| Command | Description |
|---|---|
pnpm dev |
Start workspace development tasks via Turbo |
pnpm dev:convex |
Sync the Convex backend in development |
pnpm codegen |
Regenerate Convex TypeScript bindings |
pnpm build |
Build all workspace packages via Turbo |
pnpm start |
Run the web production build |
pnpm lint |
Lint all workspace packages via Turbo |
pnpm test |
Run package contract tests via Turbo |
pnpm typecheck |
Type-check all workspace packages via Turbo |
apps/
web/
app/ Next.js App Router pages and API routes
convex/ Convex schema, queries, mutations, and auth wiring
components/ React components (UI, gallery, image combiner, dashboard)
lib/ Shared utilities (auth, cost calculation, secure storage)
hooks/ Custom React hooks
public/ Static assets
packages/
core/ Shared IDs, schemas, model registry, and job lifecycle
providers/ Provider-adapter interfaces and contract fixtures
pnpm-workspace.yaml
turbo.json
Eikon Studio exposes a public REST endpoint for programmatic image generation. Each request must include a platform API key generated from your Eikon Studio account (Studio → Settings → API Keys).
POST /api/v1/generate
Send your platform API key as a Bearer token or in the x-api-key header:
Authorization: Bearer eik_your_platform_key
# or
x-api-key: eik_your_platform_key
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
prompt |
string | yes | — | Description of the image to generate |
provider |
string | yes | — | "gemini" or "openai" |
model |
string | no | provider default | Specific model id to use |
imageSize |
string | no | "2K" |
"1K", "2K", or "4K" |
aspectRatio |
string | no | "square" |
"square", "portrait", "landscape", "wide" |
curl -X POST https://eikonstudio.xyz/api/v1/generate \
-H "Authorization: Bearer eik_your_platform_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A beautiful landscape with mountains and a lake at sunset",
"provider": "gemini",
"imageSize": "2K",
"aspectRatio": "landscape"
}'The endpoint is CORS-enabled and can be called from any origin. Requests are authenticated per-user, but there is currently no rate limiting — if you self-host Eikon Studio, you are responsible for your own Gemini / OpenAI usage and costs. Consider adding rate limiting before exposing a public deployment.
Any platform that runs Next.js works. The live demo is deployed on Vercel:
- Push the repo to GitHub.
- Import the project into Vercel with the repository root as the project root.
- Add the required web environment variables and
CONVEX_DEPLOY_KEYto the deployment. The rootvercel.jsoninstalls the workspace, runs Convex and the Next.js build fromapps/web, and publishesapps/web/.next. - Configure the production
CONVEX_URL/CONVEX_SITE_URLand OAuth callback origins for the deployed domain.
Contributions are welcome. Please open an issue to discuss major changes before submitting a pull request.
MIT © Mohtasham Murshid