GET /render/album/{hash}
Renders a set of cards in a rectangular grid and returns raw PNG bytes. The {hash} path segment encodes a FanRenderRequestData JSON object (the same struct used by the fan endpoint).
Path parameter
Base64 standard alphabet, no-padding encoding of a
FanRenderRequestData JSON object. Contains an array of cards and an optional top-level save_name. See Hash encoding.Grid layout
Cards are rendered in parallel, then composited into a grid. Column count1.35 biases the grid toward a wider-than-square aspect ratio, which suits the portrait orientation of cards.
Row count
maxCardWidth and maxCardHeight are the largest dimensions among all rendered cards in the batch.
All card frames render at 550 × 800 pixels, so for a uniform batch the output size is fully predictable from the formula above.
Example: 6 cards
Examples
Response
200 OK — Raw PNG bytes.| Header | Value |
|---|---|
Content-Type | image/png |
X-Source | rendered on request or loaded from disk cache |
X-Processing-Time | e.g. 95.441ms |
Errors
| Status | Body | Cause |
|---|---|---|
400 | bad request - provided card hash is invalid | {hash} failed base64 decoding |
400 | bad request - provided card hash is a valid json but does not follow API structure | JSON decoded but does not match FanRenderRequestData |
500 | failed request - invalid frame type provided | A card’s frame_type is not 0, 1, or 2 |
500 | failed request - missing main image asset. | A character image file was not found |
500 | failed request - failed to decode main image asset. | A character image file could not be decoded |
500 | server error - failed to copy character | Error compositing a character layer |
500 | server error - missing required asset: {key} | A frame asset file is missing |
500 | server error - cannot write card image to buffer | PNG encoding failed |
500 | gateway timeout - asset render took more than 5 seconds | Render exceeded the 5-second timeout |
Related
FanRenderRequestData— full field reference for the JSON payloadCardRenderRequestData— field reference for each card in thecardsarray- Hash encoding — how to construct the
{hash}segment