API and MCP
Let your AI assistant or script draw sprites for your game by itself. Setup takes a minute: create a key in your account and paste one line.
Sign-in, registration and the account page (where keys are created) are in Russian for now. The API itself takes descriptions in English.
1. Get a key
- Sign in or register (both pages are in Russian).
- Open the Account page ("Кабинет") and find the block "Ключи API" (API keys).
- Enter a name, for example "Claude Code", and press "Создать ключ" (Create key).
- Copy the key. It starts with
pk_and is shown once. If you lose it, revoke it and create a new one.
You can have up to five keys, each with its own name and the date of its last call. A key spends crystals from your balance at the same prices as the site, and it works with the same free sheets for new users. A key cannot pay, change your email or password, or create other keys: that can only be done in your account after signing in on the site.
Keep the key like a password and do not commit it to a repository. If it ends up in the wrong place, revoke it in your account: it stops working immediately.
2. Connect MCP
The MCP server lives at https://pikselnya.ru/mcp (Streamable HTTP, protocol 2025-06-18). The key goes in the header Authorization: Bearer YOUR_KEY.
Claude Code
claude mcp add --transport http pikselnya https://pikselnya.ru/mcp --header "Authorization: Bearer YOUR_KEY"
Then ask: "Draw an elf archer girl and give her a four-direction walk cycle."
Cursor
Add this to ~/.cursor/mcp.json (all projects) or to .cursor/mcp.json in the project folder:
{
"mcpServers": {
"pikselnya": {
"url": "https://pikselnya.ru/mcp",
"headers": {
"Authorization": "Bearer YOUR_KEY"
}
}
}
}
Other clients
Any MCP client that supports Streamable HTTP and custom headers will do: give it the address https://pikselnya.ru/mcp and the header with your key. The server remembers nothing between requests, so no sessions are needed.
3. What the MCP server can do
Jobs are asynchronous. A create tool returns a job number and an estimated time right away. Then your assistant calls status_zadaniya until the status is gotovo (done) and fetches the files with skachat. This usually takes from 30 seconds to three minutes.
Tool and parameter names are transliterated Russian: opisanie is the description, razmer the size, deystvie the action (hodba is walk, pokoj is idle, ataka is attack, svoe is custom), storon the number of directions, fon the background (prozrachnyj is transparent, scena is a scene), chislo the count. Description values can be in English.
-
sozdat_personazhaA character sheet from a description. A hero 64 gives 8 directions, a boss 128 gives 4 directions.
opisanie(text),razmer: 64 or 128. -
animirovatAn animation of a finished character (by its job number) or of a new one from a description.
id_personazhaoropisanie,deystvie: hodba, pokoj, ataka or svoe,opisanie_dejstviyafor a custom action,storon: 4 or 8,razmer: 64 or 128. -
kartinkaA single image: an icon, a portrait, a scene.
opisanie,razmer: 32, 64, 128 or 256,fon: prozrachnyj or scena. -
nabor_predmetovA set of items on one theme, each as a separate file.
opisanie(the theme),razmer: 16, 32 or 64,chislo: 8 or 16. -
plitkiA seamless tile with variations. If you give a second surface, you get a transition between the two.
opisanie,opisanie2for a transition,razmer: 16, 32 or 64,chislo: 1, 4 or 8. -
status_zadaniyaWhether the job is done, what stage it is at, and links to the files when it is done.
id. -
skachatFull https://pikselnya.ru/... links to all files of a finished job. Optionally adds a small preview image.
id,s_prevyu: true or false. -
balansHow many crystals are left and how many free sheets.
Files download by link without a key: a job address consists of 20 random characters and cannot be guessed. Do not publish a job number if you do not want to show the result to others.
4. Plain REST
You can do all of this without MCP, with ordinary requests. The key goes in the Authorization header. Requests are form posts: the fields are sent as -F in curl.
Check your balance
curl https://pikselnya.ru/api/balans \
-H "Authorization: Bearer YOUR_KEY"
Create a character
curl https://pikselnya.ru/api/zadaniya \
-H "Authorization: Bearer YOUR_KEY" \
-F "opisanie=elf archer girl in a green cloak" \
-F "razmer=64"
The reply contains the job number:
{"id": "k3m9x2v7q1p8w5n4t6zb", "status": "ozhidaet"}
Ask whether it is ready
curl https://pikselnya.ru/api/zadaniya/k3m9x2v7q1p8w5n4t6zb
Ask every 5 or 10 seconds until the status field becomes gotovo or oshibka. In a finished reply the rezultat field holds paths to the files. Add the site address to them: https://pikselnya.ru plus the path.
Download a file
curl -o sheet.png \
https://pikselnya.ru/api/zadaniya/k3m9x2v7q1p8w5n4t6zb/fajly/nabor_list.png
Other kinds of jobs
The kind of job is set by the vid field. The other fields are the same as in the workshop form on the site.
# animation of a finished character: walk in 4 directions
curl https://pikselnya.ru/api/zadaniya \
-H "Authorization: Bearer YOUR_KEY" \
-F "vid=animaciya" -F "deystvie=hodba" -F "napr_chislo=4" \
-F "istochnik_zadanie=k3m9x2v7q1p8w5n4t6zb"
# an image
curl https://pikselnya.ru/api/zadaniya \
-H "Authorization: Bearer YOUR_KEY" \
-F "vid=kartinka" -F "opisanie=health potion" -F "razmer=32"
# an item set
curl https://pikselnya.ru/api/zadaniya \
-H "Authorization: Bearer YOUR_KEY" \
-F "vid=predmety" -F "opisanie=potions" -F "chislo=8"
# tiles with a transition between two surfaces
curl https://pikselnya.ru/api/zadaniya \
-H "Authorization: Bearer YOUR_KEY" \
-F "vid=plitki" -F "opisanie=grass" -F "opisanie2=sand" -F "razmer=32"
If the reply is not 200, the oshibka field holds a readable text (in Russian). Common codes: 401 the key is wrong or revoked, 402 not enough crystals, 429 too many requests or three jobs are already running.
5. Prices
The prices are the same as on the Pricing page, with the same balance and the same two free sheets for new users. Crystals are spent at launch and come back by themselves if a job fails because of the service. Prices are in rubles.
| What we make | In crystals, 💎 |
|---|---|
Character sheet (sozdat_personazha) | 9 |
Animation, 4 directions (animirovat) | 15 |
| Animation, 8 directions | 30 |
| Animation of a new character from a descriptionThe animation price plus a character sheet at 9 💎. | 24 or 39 |
Image (kartinka) | 9 |
Item set (nabor_predmetov) | 9 |
Tiles (plitki) | 9 |
| Tiles with a transition between two surfaces | 17 |
6. Limits
- No more than 60 requests per minute per account when using keys. If you go over, you get a 429 code, so wait a minute.
- No more than 3 jobs at the same time. The fourth is accepted when one of the three finishes.
- No more than 5 active keys.
- A description is up to 500 characters.
Everything created through the API belongs to you, just like what you create on the site. The conditions are the same as in the terms (in Russian).
The account page is in Russian for now.