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

  1. Sign in or register (both pages are in Russian).
  2. Open the Account page ("Кабинет") and find the block "Ключи API" (API keys).
  3. Enter a name, for example "Claude Code", and press "Создать ключ" (Create key).
  4. 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.

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 makeIn crystals, 💎
Character sheet (sozdat_personazha)9
Animation, 4 directions (animirovat)15
Animation, 8 directions30
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 surfaces17

6. Limits

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).

Create a key in your account

The account page is in Russian for now.