Coffee (alexflipnote) API
Free random coffee photo API with no key: one GET returns a JSON object holding a direct URL to a hosted coffee image. Tested example included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Coffee (alexflipnote) API?
alexflipnote's coffee endpoint is a free, key-free API that returns a random coffee photograph. The JSON response contains a single field, `file`, holding a direct URL to the image.
Sometimes a demo needs a photograph rather than a grey rectangle, and that is the whole job this endpoint does. Ask it for a random coffee, get back one field containing a URL, drop that URL into an `img` tag. There is no envelope to unwrap, no pagination and no key.
Two practical notes separate it from a plain image host. The `.json` suffix on the path is what makes it return metadata instead of serving a picture, so if you want the URL rather than the bytes, keep it. And the response carries no CORS header, which means a browser fetch of the JSON will be blocked even though loading the returned image URL in an `img` tag works perfectly — fetch it server-side, or skip the JSON entirely and point the image element at the non-JSON path.
Quick facts
- Base URL
https://coffee.alexflipnote.dev- Authentication
- No API key and no account for the coffee endpoint. Other endpoints on alexflipnote's main API host do require a key; this one does not.
- Rate limit
- No published limit. It is a personal project, so keep request volumes modest and cache what you fetch.
- Pricing
- Free.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the Coffee (alexflipnote) API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Fetch a random coffee photograph
GET https://coffee.alexflipnote.dev/random.json
curl 'https://coffee.alexflipnote.dev/random.json'const res = await fetch("https://coffee.alexflipnote.dev/random.json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://coffee.alexflipnote.dev/random.json", timeout=20)
res.raise_for_status()
print(res.json()){
"file": "https://coffee.alexflipnote.dev/0cUQxbUBbbI_coffee.jpg"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
(none) | n/a | Optional | The endpoint takes no parameters at all. |
random.json vs random | path | Optional | `/random.json` returns JSON metadata; the path without the suffix serves the image itself. random.json |
Response fields
filestring- Absolute URL of the chosen photograph, hosted on the same domain. This is the only field in the response.
What you can build with the Coffee (alexflipnote) API
- Fill a cafe or menu mockup with real photography instead of grey boxes
- Provide rotating hero imagery for a coffee-shop landing page prototype
- Give a beginner a one-field JSON response to practise parsing against
- Seed test fixtures that need a stable, publicly reachable image URL
Common errors and how to fix them
CORS error in the browser
The JSON response carries no Access-Control-Allow-Origin header.
Fix: Fetch it from your server, or point an `img` element at the non-JSON path, which is not subject to CORS.
Same image twice in a row
Randomness is per request with a finite library behind it.
Fix: Track recently seen URLs client-side if repeats matter, or pre-fetch a batch and shuffle.
Timeout or 5xx
A small personal project on modest hosting.
Fix: Set a short timeout and fall back to a bundled local image rather than blocking a render.
Coffee (alexflipnote) API — frequently asked questions
Does the coffee API need a key?
No. This endpoint is open with no key and no account, unlike some of the other endpoints on alexflipnote's main API host.
What is the difference between /random and /random.json?
`/random.json` gives you a JSON object with the image URL in a `file` field. The path without the suffix serves the image bytes directly, which is what you want for an `img` src.
Can I call it from front-end JavaScript?
Not the JSON form — there is no CORS header, so the browser will block it. Loading the image URL itself in an `img` tag is unaffected.
How many photographs are there?
The library size is not published, and repeats do appear over a long enough run. Treat it as a modest fixed set rather than an endless stream.
Tools that pair with this API
Coffee to Water Ratio Calculator
Solve any two of coffee dose, water and brew ratio, with presets for pour-over, drip, French press, AeroPress, espresso and cold brew, in grams, ml or fl oz.
Placeholder Image Generator
Generate placeholder images at any size online — solid, gradient or checkerboard with the dimensions as text. Download PNG or copy a data URI for markup.
Image Cropper
Crop images online to an exact rectangle with pixel-precise x, y, width and height inputs or aspect-ratio presets. Free, private and browser-based.
Coffee (alexflipnote) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.