Marcelo Paiva
Illustrations
Theme

Illustrations

Every piece on this site opens with a drawing that did not exist until the piece did. There are 38 of them. None was chosen from a library, none was drawn by hand, and no two share a palette — the colours are arithmetic on the slug, which is the part worth explaining. Every one is generated — Recraft draws them, Claude writes their descriptions — and the notes below say how, and what that costs. Open any one to see it at full size and step through the rest, or read how they are made.

How they are made

  1. Read the pieceOne line of its frontmatter names a thing to draw.

    Each piece carries an illo: line naming a thing to draw. A piece without one simply has no drawing. The subject is written for the model, which is why each drawing’s own page prints it separately from the caption: they are different sentences for different readers, and they disagree more often than you would expect.

  2. Load the styleTrained on four pictures. Describing a look in words does not work.

    The drawings are generated by Recraft, and the look comes from a custom style trained on four reference images rather than from the prompt. Asking for a look in words does not work, and two attempts proved it. Asking for “rich color” produced thirty-eight drawings in one blue — indigo figures, cyan screens, no third hue anywhere — because the style in force had been trained on three of those blue drawings and kept faithfully reproducing them. Naming the wanted spread instead, “many hues, warm and cool together”, produced a set that was red or azure and nothing else. A style trained on pictures is a stronger prior than a sentence, every time.

    Which references make up the set is load-bearing, and not in an obvious way. Adding the two most saturated images turned everything orange. Swapping in two ink drawings gave grey figures against flat colour — their own construction, faithfully copied. Removing the warm references altogether went straight back to blue. A reference is judged by what it does to the balance, not by whether the picture is good.

  3. Hash the nameThe slug becomes three hues, spaced by one of four geometries.

    The prompt no longer argues about colour at all. Recraft’s image endpoint accepts explicit RGB alongside a custom style and honours it, so each drawing is generated under three hues chosen like this: hash the slug, read a base hue off the first two bytes, pick one of four wheel geometries off the third, and jitter each result by a few degrees so two entries sharing a geometry do not also share an exact shape. Across the set that currently lands as analogous 11, split 10, triad 9, complementary 8.

    The geometry is the argument. Hue is an angle, so the only thing separating two colours on that axis is the degrees between them, and a scheme is a decision about how to spend 360 of them across three points. Spend them evenly and you get the triad at 120 apart, the furthest any three points can be from each other on a circle. Put two opposite instead, 180 apart, and you get the strongest contrast two hues can have, with the third supporting the first rather than making a third argument. Split-complementary backs that opposition off by 30 either side, to 150 and 210, which keeps most of the contrast but lands either side of the true complement — what stops a pair from vibrating. Analogous spends almost nothing, 35 degrees between two of them, then puts the third at 190 so the picture is one mood with a single thing arguing against it.

    The seed is the slug and not a random number, which is the whole design. Real randomness would move the cache key on every run, and that key is the only thing stopping the command from buying 38 images it already has. Seeding from the slug also keeps each entry independent: adding a new piece leaves every existing drawing exactly as it is, rather than reshuffling a sequence and invalidating everything after it. Changing your mind is a separate flag, --repalette, which writes a new salt for one entry and moves that entry’s colours and nobody else’s.

    Open any drawing to see its own numbers worked through on a wheel.

  4. Send all threeSubject, style and colours go out. One picture comes back.

    One POST to Recraft’s image generation endpoint carries the subject, a fixed preamble, the style id, the three colours as RGB, and a size. The preamble is the same on every drawing so the look belongs to the pipeline rather than to whoever wrote that day’s subject line, and most of it is negative: no lettering, and no border, frame or vignette.

    Both of those negatives are scars. Lettering is the most common way a generated illustration becomes unusable, and it still leaks — a subject naming an occupation has twice had that occupation printed across the picture. The frame clause took two attempts: every drawing came back as a circular medallion, and forbidding the border did nothing until the wanted state was named first. Naming what you want beats forbidding what you do not.

    Eight cents a drawing, or forty API units. The command asks what the account can afford before it spends anything, because Recraft bills the API from a prepaid balance separate from the subscription credits the web editor uses — so a topped-up plan can sit beside a zero, and a run once died eight images in against a balance that looked healthy on a different page of the dashboard.

  5. Look at itThe alt text describes the picture that arrived, not the one that was asked for.

    Alt text comes from Claude looking at the finished image, never from the prompt that asked for it — a different model from the one that drew it, which is the point. The two diverge constantly. One piece asked for a white cane leaning against a doorframe and got a doorframe with no cane in it; a description taken from the prompt would have told a screen reader user about a cane that was not there. Confidently wrong is worse for that reader than absent, so the drawing is described, not the intention.

  6. Commit itSame input, same picture, every time. Nothing regenerates at build.

    Two cache keys, because two things go stale. The drawing key covers everything the model saw: subject, preamble, style, size, palette. If any of those move, the committed original was made from a prompt that no longer exists and a new one has to be bought. The render key adds the processing version, so improving how a file is turned into a served image re-renders from the original on disk and costs nothing.

    That distinction was learned the expensive way. The key includes the subject line verbatim, so a pass changing British spellings to American touched six illo: lines by one word each, and the next run replaced six drawings nobody had asked to change — for real money, overwriting the only copy of each. Replacing a drawing is now a different command from making one, and superseded originals are moved aside rather than overwritten.

    The committed file also drops its C2PA provenance manifest, deliberately. That manifest signs specific bytes and this pipeline re-encodes every image, so carrying it forward would ship a provenance claim that fails verification — worse than shipping none. The untouched original keeps credentials that still mean something.

The calls, and what they cost

Every request the pipeline makes. Nothing here runs at build or at page load.
CallWhat it doesCost
POST recraft.ai/v1/images/generationsOne drawing at 1536×1024, from the subject, the preamble, the style id and three RGB colours.40 units ≈ $0.08
POST recraft.ai/v1/stylesTrains a custom style from reference images and returns the id every drawing then uses. Run once, or once per look.Not documented small beside one drawing
GET recraft.ai/v1/users/meReads the prepaid balance before a batch starts, so a run that cannot finish says so instead of dying part way.Free
POST api.anthropic.comclaude-opus-5Looks at the finished image and writes the alt text. Also proposes a subject from a piece, when asked.≈ $0.005

So the whole set of 38 is about $3.04 to draw and $0.19 to describe. A single reroll is eight cents, which is the number that matters: it is cheap enough to try something and expensive enough that a batch nobody reviewed is a real mistake.

Two caveats on those figures. The 40 units is measured, not published — a run of 37 images against a balance of 1,115 ran out after 27, which is where the number comes from. Recraft documents vector output at double raster elsewhere in its pricing, so 80 units is carried here as the documented figure rather than an observed one, and this pipeline draws raster anyway.

  • These colours sit outside the token system. check:tokens walks the source, not the served images, so nothing grades their contrast.
  • A drawing looks the same in dark mode. Everything else on this site flips.
  • Full-bleed saturated artwork is a sensory cost for some readers, and no accessibility criterion covers it. The Illustrations control in the header turns it down, or off entirely.