Metadata-Version: 2.4
Name: genmagic-discord
Version: 0.1.0
Summary: Self-hosted Discord bot for AI images and video with GenMagic: /image and /video with Nano Banana, GPT Image, FLUX, Veo 3.1, Kling 3.0, Seedance and 90+ more models on one API key.
Author-email: "GenMagic (O-mega Enterprise, Inc)" <hello@genmagic.co>
License: MIT
Project-URL: Homepage, https://genmagic.co/discord
Project-URL: Source, https://codeberg.org/genmagic/genmagic-discord
Keywords: discord,discord-bot,discord-interactions,ai,image-generation,video-generation,text-to-video,veo,kling,seedance,genmagic
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Multimedia :: Graphics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyNaCl>=1.5
Dynamic: license-file

# genmagic-discord

A Discord bot that makes AI images and short videos with [GenMagic](https://genmagic.co): Nano Banana, GPT Image, FLUX, Seedream, Veo 3.1, Kling 3.0, Seedance, Wan and the rest of GenMagic's 90+ image and video models, from `/image` and `/video`.

Two ways to use it:

- **Add the hosted app** (nothing to run): [add GenMagic to your server or your account](https://discord.com/oauth2/authorize?client_id=1567467136098631751). Each member links their own GenMagic account and pays per generation from their own balance; new accounts get free starter credit. More at [genmagic.co/discord](https://genmagic.co/discord).
- **Run your own** with this package (`pip install genmagic-discord`; a Node version is `npx genmagic-discord`): every generation paid from your own GenMagic key.

## Run your own

1. Create an application at the [Discord Developer Portal](https://discord.com/developers/applications), add a bot, and copy the application id and public key.
2. Get a GenMagic API key at [genmagic.co/get-api-key](https://genmagic.co/get-api-key).
3. Start the server (Python 3.9 or later, after `pip install genmagic-discord`) where Discord can reach it over HTTPS:

```bash
DISCORD_PUBLIC_KEY=... DISCORD_APP_ID=... GENMAGIC_API_KEY=... PORT=3000 genmagic-discord
```

4. In the Developer Portal, set the Interactions Endpoint URL to `https://<your host>/interactions` (Discord checks it when you save).
5. Register the commands once: `DISCORD_APP_ID=... DISCORD_BOT_TOKEN=... genmagic-discord-register`
6. Invite the bot with the install link from the portal's Installation page.

`/image prompt:<text> [model:<id>]` posts the image in the channel. `/video prompt:<text> [model:<id>] [seconds:4-10]` posts the clip when it is ready (most take under two minutes). Model ids and prices: [genmagic.co/models](https://genmagic.co/models) or `GET https://genmagic.co/api/v1/models`.

The bot answers Discord within its 3-second window with a "thinking" message and replaces it with the result. Requests are verified with Discord's Ed25519 signature; anything unsigned gets 401.

## License

MIT
