Skip to main content
GET /render/card/{hash} Renders a single card and returns raw PNG bytes. The {hash} path segment encodes a CardRenderRequestData JSON object.

Path parameter

hash
string
required
Base64 standard alphabet, no-padding encoding of a CardRenderRequestData JSON object. See Hash encoding for construction details.

Examples

# Payload: {"id":1,"variant":0,"dye":7864319,"kindled":false,"frame_type":0}
# dye 7864319 = 0x780000 (dark red)
HASH=$(echo -n '{"id":1,"variant":0,"dye":7864319,"kindled":false,"frame_type":0}' \
  | base64 -w0 | tr -d '=')

curl -o card.png "http://localhost:8899/render/card/$HASH"

Response

200 OK — Raw PNG bytes.
HeaderValue
Content-Typeimage/png
X-Sourcerendered on request or loaded from disk cache
X-Processing-Timee.g. 12.345ms

Errors

StatusBodyCause
400bad request - provided card hash is invalid{hash} failed base64 decoding
400bad request - provided card hash is a valid json but does not follow API structureJSON decoded but does not match CardRenderRequestData
500failed request - invalid frame type providedframe_type value is not 0, 1, or 2
500failed request - missing main image asset.Character image file not found on disk
500failed request - failed to decode main image asset.Character image file exists but could not be decoded
500server error - failed to copy characterError compositing the character layer
500server error - missing required asset: {key}A frame asset file is missing
500server error - cannot write card image to bufferPNG encoding of the result failed
500gateway timeout - asset render took more than 5 secondsRender exceeded the 5-second timeout

Build docs developers (and LLMs) love