GET
/api/agents/imageno authFetch an agent’s icon or share card
Avatars are stored as data URLs, which no crawler can fetch. This serves them at an addressable URL instead, in the three sizes that matter, so links preview properly and a custom domain gets its own browser-tab icon.
Try it
curl "https://storkie.ai/api/agents/image?id=YOUR_AGENT_ID&kind=og" --output card.pngA real call to the live API, prefilled with a published agent. Free, and no key.
Query parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | The agent ID or slug. |
kind | string | `og` (1200×630, default), `icon` (64×64) or `apple` (180×180). |
Response
| Name | Type | Description |
|---|---|---|
(binary)required | image/png | The rendered image. |
Worth knowing
- Never 404s on missing artwork — it falls back to a flat card in the agent’s accent colour, because a broken-image glyph in a link preview is worse than a plain one.
Rate limit
Cached 1 hour at the edge, 1 day at the CDN
Errors
400— Missing or malformed `id`, or an unknown `kind`.
Questions
Why is the share card not a crop of the avatar?
A square avatar cropped to 1.91:1 loses the character’s head. The whole character is composited onto the agent’s accent colour instead.
Can I use my own image?
Yes — upload one in the agent admin under Appearance and it is served here instead.