dave.io

because "just a website" is boring
dave.io/api :: fish :: 13ร—37

The API That Nobody Asked For

This personal site has an overengineered API.

Let's explore what you can do with it ๐Ÿš€

๐Ÿคจ What's This About?

Yes. Of course there's an API.

It started as a simple way to serve some images and somehow evolved into a full-blown JWT-authenticated, Cloudflare Workers-powered, over-engineered monster. But hey, at least it's fast. โšก

The API powers various features on this site and provides programmatic access to some services. It's built on Nuxt 3, runs on Cloudflare's edge network, and has more authentication than a government facility.

๐Ÿ’ก Fun fact: This API probably handles more authentication flows than actual requests.

๐Ÿ” Authentication

The API uses JWT tokens.

Using Authentication

Pass your JWT as a Bearer token or a token GET parameter.

๐ŸŒ Public Endpoints

These endpoints are available to everyone. Use them responsibly, or don't - I'm not your dad.

Health Check

The classic ping-pong. Confirms the API hasn't caught fire and returns some information about your request.

Could be used as a "what is my IP" at a push.

Dashboards

Generates dashboard data for dashboard apps which display dashboards.

๐Ÿšช Protected Endpoints

These endpoints require authentication. Without proper tokens, you'll get a 401 faster than you can say "unauthorized".

Alt Text Generator

Generates alt text for an image using AI.

Ticket Enrichment

Got a ticket with a description just containing a URL, image, or single sentence of text? Let AI go into detail for you.

Image Optimisation

Make your image smaller and more better.

๐Ÿš€ Getting Started

Want to use the API? Here's the quickest way to get started:

Test the Ping Endpoint

curl https://dave.io/api/ping

If this works, congrats! The API is alive.

Need Authentication?

Need a JWT to call any protected endpoints? Ask me.

The API runs on Cloudflare Workers, so it's distributed globally. You'll always hit the nearest edge location.