seedkin

Docs / Getting started

Image URLs

Every avatar has a URL on seedkin.dev, so you can show one with a plain <img> and nothing to install: in Markdown, on a page without JavaScript, or in a quick prototype.

A Botling robot A Snoot animal A Noggin person A Beastie monster A Sprite

<img src="https://seedkin.dev/api/2.x/botling/svg?seed=jolly-sprocket-65&amp;size=64"
     width="64" height="64" alt="" />

This is a preview. The URLs may still change before the API is announced, and it has no uptime promise. For anything that matters, install the package and draw avatars yourself: it is small, makes no requests and works offline.

The URL

https://seedkin.dev/api/2.x/<style>/svg?seed=<seed>&<options>, where <style> is botling, snoot, noggin, beastie or sprite. 2.x is the package's major version: a seed draws the same avatar at the same URL for as long as 2.x lasts, and a 3.0 would come at new URLs rather than change these. The response is the SVG that seedkin 2.x draws for the same seed and options, byte for byte.

curl 'https://seedkin.dev/api/2.x/sprite/svg?seed=jolly-sprocket-65&element=water&look=sticker'

Options

OptionValuesWhat it does
seedany text, up to 200 charactersRequired. Picks the avatar.
size8 to 1024Width and height in pixels. Default 96. Below 40 the simpler 9x9 avatar is drawn.
palettea number, or a holiday: newYear, valentines, stPatricks, fourthOfJuly, halloween, christmasThe colours. Numbers index the style's palettes; the style pages list them.
shapesquare, circle, triangle, diamondCell shape.
framesquare, rounded, squircle, circleThe outline of the background.
lookgapped, flat, inked, soft, soft-inked, stickerHow cells are drawn.
detailauto, full, smallThe 15x15 or the 9x9 avatar, or the size's pick.
backgroundtrue, falseDraw the palette's background.
gridauto, true, falseDraw the empty grid cells (gapped look only).
animatetrue, falseA small CSS animation inside the SVG, still for anyone who prefers reduced motion.
titleup to 64 charactersThe SVG's accessible name. Inside an <img>, the alt text is what counts.
elementfire, water, earth, wind, spaceSprite only.
skina numberNoggin only: an index into its skin tones.

An unknown option, an option given twice or a value out of range gets a 400 with the reason in plain text, rather than an avatar that quietly ignores it. That way a URL that works today can't draw something else when an option is added later.

Caching

Since a URL always draws the same picture, responses are sent with Cache-Control: public, max-age=31536000, immutable. Browsers and the CDN keep them for a year, so a page full of avatars costs one request each, once.

Privacy

The seed is part of the URL, so it reaches seedkin.dev's logs and anything else that sees the URL. Seed with an opaque id, never an email address or a name. If that doesn't suit you, serve avatars yourself: it is a few lines.

Email and PNG

The API serves SVG only for now. Many email clients, Gmail among them, don't show SVG; for email, convert to PNG on your own server.

Support future projects on Ko-fi