API Specification

SVG generation API endpoint reference.

Endpoint

GET /api/svg/[username]

Query Parameters

ParameterTypeDefaultDescription
themestringdeep-spaceColor theme for the SVG
strengthnumber0.35Warp strength (0 - 1)
durationinteger14Animation duration in seconds (1 - 60)
clipPercentnumber95Clip percentile (50 - 100)

Available Themes

githubdeep-spacemonochromesolar-flareevent-horizonpaper-lightdark (alias → github)light (alias → paper-light)

Response

200 — SVG image (Content-Type: image/svg+xml)

400 — Invalid username

429 — Rate limit exceeded (30 requests/minute)

500 — Server error

Example

curl https://gravity-lens.rujuu.com/api/svg/octocat?theme=deep-space&strength=0.35

Caching

Responses are cached at the CDN edge with s-maxage=86400 (24h) and stale-while-revalidate=3600 (1h).