A small web app to generate and edit images and videos using the xAI (Grok) API. Create images from text, edit images with a prompt, or turn an image into a short video.
# Install dependencies
npm install
# Run the app locally
npm run dev
Open http://localhost:5173. You’ll be asked to log in with your xAI API key.
npm run build — Build for production (output in dist/).npm run preview — Serve the production build locally.Log in
Go to the app, enter your xAI API key on the login page, and submit. The key is stored in a cookie so you stay logged in until you log out or clear it.
Text to Image
Submit. The generated image appears at the top; you can download it if needed.
Image to Image
Submit. The result image appears at the top; you can download it if needed.
Image to Video
Submit. When the video is ready, it appears at the top and can be played or downloaded.
Log out
Use Log out in the nav to clear the stored API key and return to the login page.
Deploy with Vercel — click the button at the top to clone and deploy this repo in one step.
The app is a single-page app. For Vercel, vercel.json rewrites all routes to index.html. To deploy from the CLI:
npm run build
npx vercel
(or connect the repo to Vercel for automatic deploys). The API key is entered in the browser and stored in a cookie; xAI asks the browser to block direct requests (CORS), so the key is sent to the proxy, which forwards it to xAI and does not log or store it. No server-side secrets are required for basic use.
MIT — see LICENSE.
$ claude mcp add grok-frontend \
-- python -m otcore.mcp_server <graph>