Sprite FusionSprite Fusion
Pixel Art GeneratorAPI

Codex

Connect Codex to the Sprite Fusion MCP server, the recommended way to generate, edit, and animate pixel art from your agent.

The best way to use Sprite Fusion from Codex is the MCP server: two commands, a sign-in in your browser, and no API key to manage.

  1. Add the server:

    codex mcp add spritefusion --url https://www.spritefusion.com/mcp
  2. Sign in to Sprite Fusion:

    codex mcp login spritefusion

    The ChatGPT desktop app and the Codex IDE extension share this configuration: select Authenticate there when prompted.

  3. Ask for pixel art:

    Make a 32 pixel brass dungeon key sprite and save it in assets/sprites.

From there, ask for what your game needs. Codex can:

  • Come up with sprite ideas for your game and generate them.
  • Edit a sprite: a new weapon, outfit, or pose.
  • Make new sprites in the style of your existing art.
  • Turn a character into 8 directions and animate it.

See MCP Server for the tools.

Use the HTTP API instead

Use MCP when you can

The API is for places where you can't add the MCP server, such as a script or a CI job. It needs an API key that you create and keep secret.

Copy this prompt into Codex:

Use the Sprite Fusion API to create, edit, style-match, make eight-direction views, and animate pixel art. Use SPRITE_FUSION_API_KEY from the environment, or use a Sprite Fusion API key supplied by the user in chat directly as the Bearer token. Either source is enough: immediately call the API and complete the user's request without asking them to configure the other. Only if neither source has a key, reply with a short Quick Setup containing these exact links: [Create your Sprite Fusion account](https://www.spritefusion.com/auth/sign-up?next=%2Faccount%2Fapi-keys) and [Create and copy an API key](https://www.spritefusion.com/account/api-keys). Ask the user to set SPRITE_FUSION_API_KEY or send the key in chat, then continue their original request as soon as they do. API docs: https://www.spritefusion.com/docs/pixel-art-generator/api

A generation request looks like this:

curl -sS -N https://www.spritefusion.com/api/v1/generate \
  -H "Authorization: Bearer $SPRITE_FUSION_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"operation":"generate","prompt":"A brass dungeon key","size":32}' \
  > /tmp/spritefusion-events.txt

Need Help?

On this page