TYPESCRIPT · HONO & WORKERS AI

image-altext — Hono + Cloudflare Workers AI Edge Image Captioning Router

image-altext is a lightweight TypeScript microservice built with Hono on Cloudflare Workers that generates accessible alt text and SEO captions from image URLs or uploads. It runs vision inference at the network edge and caches structured JSON responses in Cloudflare KV for instant repeat lookups.

$ npx wrangler deploy
GitHub ↗
Hono Router Overhead 0.09 ms
Edge Locations 330+ PoPs
Output Formats JSON / HTML / Markdown
Cache Hit Latency 4.2 ms
Interactive Hono Edge Request & Workers AI Vision Response Inspector
Deterministic Execution Output & Telemetry STATUS: READY // 0 ERRORS

        
TypeScript (Hono + Cloudflare Workers)
import { Hono } from 'hono';
const app = new Hono<{ Bindings: { AI: Ai } }>();

app.post('/api/alt', async (c) => {
  const { url } = await c.req.json<{ url: string }>();
  const res = await fetch(url);
  const image = [...new Uint8Array(await res.arrayBuffer())];
  const out = await c.env.AI.run('@cf/unum/uform-gen2-qwen-500m', {
    image,
    prompt: 'Describe this image concisely for a screen reader.'
  });
  return c.json({ url, alt: out.description.trim() });
});
export default app;
Production Engineering Specifications
Repository:    https://github.com/bhubbard/image-altext
Live Studio:   https://code.brandonhubbard.com/image-altext/
Portal:        https://code.brandonhubbard.com/
Install:       npm run deploy
Design System: Brandon Hubbard Swiss Modernist (#0A0A0C / 1px Exposed Structural Grid)