Public endpoints (no authentication required)
The following endpoints return cached data and require no authentication:GET /api/postcards?url=— retrieve any existing analysis resultGET /api/postcards/{id}/og— generate the Open Graph image for a completed analysis
Cached forensic reports are publicly accessible to anyone with the URL. You don’t need an API key to read results that have already been computed.
Authenticated endpoint
POST /api/postcards accepts an optional userApiKey field in the JSON request body. This key is passed through to the Google Gemini API to perform the AI analysis steps.
What the key is
A Google Gemini API key. You can get one for free at https://aistudio.google.com/api-keys. The free tier includes a generous quota suitable for experimentation.How to pass it
IncludeuserApiKey in the POST body alongside the required url field:
Authorization header. The key is sent in the request body only.
Request example
What happens without a key
userApiKey is optional. Postcard can use a server-side key configured by the instance operator (via the GOOGLE_GENERATIVE_AI_API_KEY environment variable).
- If a server-side key is configured: the
userApiKeyfield can be omitted and the analysis will proceed normally. - If no server-side key is configured and no
userApiKeyis provided: the analysis pipeline will transition to afailedstate with an error indicating that no API key is available.