For agents and code
A coding agent building a game needs assets. Point it at Zfight: searching the library and downloading from it are free and need no key, and with a key it can have new assets built.
Connect a coding agent (MCP)
Zfight is a Model Context Protocol server at https://zfight.io/api/mcp. In Claude Code:
claude mcp add --transport http zfight https://zfight.io/api/mcpTo let the agent generate with your credits, add your key as a header:
claude mcp add --transport http zfight https://zfight.io/api/mcp \
--header "Authorization: Bearer zf_your_key"Any client that speaks MCP over HTTP works the same way. The tools it gets:
| Tool | What it does | Key |
|---|---|---|
search_assets | Search the library. Each result has a GLB URL, a thumbnail, tags and a triangle count. | No |
get_asset | One asset, with a three.js loading snippet and the program that built it. | No |
list_models | The models that can build, and what each costs in credits. | No |
generate | Send one prompt to several models. Spends credits. | Yes |
get_generation | Check a generation and collect the GLB URLs once it is done. | For private ones |
Use it from your own code (REST)
The same operations as plain HTTP. Search needs nothing:
curl "https://zfight.io/api/v1/assets?q=wooden+barrel&limit=5"Optional parameters: animated=1, kind=asset or scene, sort=popular. One asset, with its source program: GET /api/v1/assets/<id>. Models and prices: GET /api/v1/models.
Generating takes a key. The reply comes back at once with an id to poll:
curl -X POST https://zfight.io/api/v1/generations \
-H "Authorization: Bearer zf_your_key" \
-H "Content-Type: application/json" \
-d '{"prompt": "PS1-style iron lantern with a glowing flame", "models": ["claude-opus-5-5", "gpt-6-astra"]}'
curl https://zfight.io/api/v1/generations/<id>Leave models out to use the default four. Also accepted: "animated": true, "kind": "scene", and on Pro "private": true. Builds take one to six minutes per model; the status reply lists each model’s result with its glb_url once built. A build that fails is refunded.
Keys, cost and license
Make and revoke keys on your account page. A key spends the credits of the account it belongs to, at the same prices as the site, and every run has a spend ceiling. Everything in the public library is CC0: use it in anything, with no credit needed.