Snippet Card
A code snippet share card: Instrument Serif title and attribution on pale lavender beside a dark code pane with a filename bar, set in Geist Mono with preserved line breaks and indentation. 1200×630 for X, LinkedIn, dev blogs and docs. Variables: title (best under 7 words), author, source, filename, language, code (plain text with newlines, best at 4 to 10 lines of up to about 40 characters).
1200 × 630 · 40:21 · Version 1
Make it yours
Edit the values to update the JSON, curl request, and agent instructions. This won’t change the saved template.
Updating request…
Try again in . Rendering will not restart automatically.
Guest allowance per IP: 3/minute, 20/hour, 50/day. Sign in for your account allowance.
One request. Your image.
Use these arguments with render_image or send them to the REST render endpoint.
{
"template": "01m53y02p826vgr3s5afebg27w",
"template_version": 1,
"variables": {
"code": "const delay = (n: number) =>\n Math.min(30_000, 2 ** n * 250)\n * (0.5 + Math.random() / 2);\n\nawait sleep(delay(attempt));",
"title": "Retry with jitter in four lines",
"author": "Kenji Arai",
"source": "lowtide.dev/snippets",
"filename": "retry.ts",
"language": "TypeScript"
},
"format": "png"
}
Show curl request
curl 'https://hopshot.dev/api/v1/render' \
--fail-with-body \
--header 'Content-Type: application/json' \
--output 01m53y02p826vgr3s5afebg27w.png \
--data-binary @- <<'JSON'
{
"template": "01m53y02p826vgr3s5afebg27w",
"template_version": 1,
"variables": {
"code": "const delay = (n: number) =>\n Math.min(30_000, 2 ** n * 250)\n * (0.5 + Math.random() / 2);\n\nawait sleep(delay(attempt));",
"title": "Retry with jitter in four lines",
"author": "Kenji Arai",
"source": "lowtide.dev/snippets",
"filename": "retry.ts",
"language": "TypeScript"
},
"format": "png"
}
JSON