DEVELOPER DOCUMENTATION
Soft Hours Diary CDN
A package-free public CDN for emoji and country-flag assets, with simple image URLs, an optional JSON resolver and a lightweight browser helper.
What this CDN provides
Soft Hours Diary hosts public emoji and country-flag image files through stable, direct URLs. Use a normal image element for fixed assets, or call the read-only JSON resolver when your application needs to build an image URL from dynamic data.
Two simple integration choices. Direct image URLs require no JavaScript. The JSON URL resolver at
GET /api/v1/asset requires no package, SDK, API key or account.The simple URL model
For a known image, use the path directly:
<img
src="https://softhoursdiary-emojis.pages.dev/[emojis/svg/1f632.svg"
alt="Surprised face"
width="36"
height="36"
loading="lazy"
decoding="async"
/>See the URL reference for exact paths, qualities and casing.
Resolve dynamic assets with JSON
const params = new URLSearchParams({
type: "emoji",
id: "1f632",
quality: "svg"
});
const response = await fetch(
"https://softhoursdiary-emojis.pages.dev/[api/v1/asset?" + params
);
const result = await response.json();
if (!response.ok || !result.ok) {
throw new Error(result.error?.message || "Asset lookup failed.");
}
console.log(result.data.url);Read the full REST JSON API guide for parameters, response shape and error handling.
Choose an integration guide
Quick startGo from an asset ID to a displayed image.Setup optionsDirect URLs, JSON API and optional browser script.JavaScript helperURL helpers, DOM mounting and custom elements.ReactDirect image URLs and dynamic JSON resolution.Next.jsServer Components and next/image configuration.TypeScriptTyped request and response interfaces.HTML & CSSDirect URLs, custom elements and CSS backgrounds.PlaygroundPreview assets and copy snippets, including API fetch code.
Important behaviour
- Direct URLs are best for fixed assets; use the JSON resolver for dynamic URL construction.
- The resolver constructs a URL but does not check whether the underlying image file exists.
- Use documented quality values and filename casing.
- Normal img display does not need JavaScript CORS access.
- Robots rules guide crawlers; they do not restrict public access to assets.