Docs / Get Image
Get Image
Generated title-image bytes.
GET/v1/images/{key}
- Auth
- client bearer + quota
- Cache-Control
hit: public, max-age=31536000, immutable- Validators
ETag, Last-Modified (file-derived)- Source of truth
clients/openapi.jsonanddocs/API.md§12
Generated title image bytes.
- Key pattern is strict:
img-[0-9a-f]{32}. Anything else, an unknown key, a row whose file is missing, or a path outsideNEWS_IMAGE_DIRall return404 {"detail":"image not found"}. - A hit:
Cache-Control: public, max-age=31536000, immutable,X-Content-Type-Options: nosniff,X-Ember-AI-Generated: true|false(truewhen a model produced the pixels,falsefor a licensed photograph),Content-Typefrom the file, a file-derivedETagandLast-Modified. Conditional requests are not evaluated: a matchingIf-None-Matchstill returns200and the bytes. ?w=640and?w=1280serve a resized WebP variant produced when the picture was stored (app/pipeline/image_variants.py), so a card does not download a 2.2-2.5 MB plate. The variant keeps the file's provenance metadata (the IPTC AI label on a generated picture, nothing added to a photograph). Any otherwvalue — or a variant that is not on disk — serves the original bytes with the original content type; a malformed width is a fallback, never an error. The same query works on the public mirror (/v1/site/images/{key}?w=640), which is what the reader client'ssrcsetrequests.- The stored bytes carry an implicit IPTC
DigitalSourceType=trainedAlgorithmicMediaXMP label (PNG iTXt, JPEG APP1, WebPXMPchunk). No visible watermark or logo is burned in. - Not metered (no item is delivered), but the quota check still runs.
Description: docs/API.md §12
Parameters
| Name | In | Required | Type | Example | Notes |
|---|---|---|---|---|---|
key | path | yes | string | img-b404bcc0af786cb0c2f3e40d1333436c | Image key, img- plus 32 lowercase hex characters. |
w | query | no | string |
Example request
curl -sS \
'https://vg.tempproject.online/v1/images/img-b404bcc0af786cb0c2f3e40d1333436c' \
-H "Authorization: Bearer $NEWS_KEY"import json
import os
import urllib.request
URL = "https://vg.tempproject.online/v1/images/img-b404bcc0af786cb0c2f3e40d1333436c"
KEY = os.environ["NEWS_KEY"]
def call() -> dict:
req = urllib.request.Request(URL, headers={
"Authorization": f"Bearer {KEY}",
})
with urllib.request.urlopen(req, timeout=15) as res:
print(res.status, res.headers.get("ETag"))
return json.loads(res.read().decode("utf-8"))
if __name__ == "__main__":
body = call()
print(json.dumps(body, indent=2, ensure_ascii=False)[:2000])const res = await fetch(
"https://vg.tempproject.online/v1/images/img-b404bcc0af786cb0c2f3e40d1333436c",
{
method: "GET",
headers: {
authorization: `Bearer ${process.env.NEWS_KEY}`,
},
},
);
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(res.headers.get("etag"), await res.json());The requests are generated from the path template and the parameters in clients/openapi.json, so a new parameter appears here without an edit to this site.
Example response
HTTP/1.1 200 OK
content-type: image/jpeg
cache-control: public, max-age=31536000, immutable
etag: "5f1c9a0e4d2b8a7c" # file-derived; If-None-Match is not evaluated
last-modified: Thu, 06 Nov 2026 09:12:44 GMT
x-content-type-options: nosniff
x-ember-ai-generated: true
<image bytes>No JSON body: the response is the stored image bytes. The headers are the ones docs/API.md §12 documents for /v1/images/{key}; a conditional request with the ETag still answers 200 and the full body.
Failures
This operation can answer 200, 304, 400, 401, 404, 422, 429. The full envelope for each status, with its body, is on Errors.