# JENRIKS API and agent access

Everything on JENRIKS that a program can read is public, read-only and free: a small REST API, an MCP server for agent hosts, and the feeds, markdown pages and discovery documents listed below. There are no API keys, no accounts and no write operations. The photographs stay copyrighted; the last section says how to credit them.

## REST API, version 1

Base URL `https://jenriks.com/api/v1`. Responses are JSON (UTF-8) with CORS open to any origin. The archive gains one photo every day at 00:00 Europe/Berlin. Contract: https://jenriks.com/openapi.json (OpenAPI 3.1, every response typed).

- `GET /api/v1`: index of endpoints
- `GET /api/v1/photos`: search, newest first. Parameters: `q` (free text over title, place, categories, tags, photographer), `photographer` (Erik or Jens), `category`, `year`, `location`, `limit` (1 to 50, default 10), `offset`
- `GET /api/v1/photos/latest`: today's photo
- `GET /api/v1/photos/random`: a random photo; optional `photographer`, `category`, `year`
- `GET /api/v1/photos/{YYYY-MM-DD}`: the photo published on that date
- `GET /api/v1/overview`: totals, photographers, categories, years, section URLs, license
- `GET /api/v1/health`: health of the API and the MCP server

Quickstart:

```
curl "https://jenriks.com/api/v1/photos?q=fog&photographer=Jens&limit=2"
```

Every photo object has: `title`, `photographer`, `date`, `url` (permanent page), `location`, `categories`, `tags`, `image.full` (1600 px), `image.thumbnail` (400 px) and a ready-made `credit` line. Search results wrap photos in `total_matches`, `offset`, `returned`, `photos` and, when more exist, `next_offset`.

## MCP server

Endpoint `https://jenriks.com/mcp`: Model Context Protocol over Streamable HTTP with JSON responses; stateless, no sessions, no event stream, no authentication. Protocol versions 2025-06-18, 2025-03-26 and 2024-11-05.

Tools: `search_photos`, `get_photo` (by date or URL), `get_latest_photo`, `random_photo`, `get_site_overview`; each declares an input and an output schema and returns `structuredContent`. Resources: `/llms.txt`, `/llms-full.txt`, `/feed.xml`, `/index.md`.

Client configuration: `{"mcpServers": {"jenriks": {"type": "http", "url": "https://jenriks.com/mcp"}}}`

Discovery: server card https://jenriks.com/.well-known/mcp/server-card.json (also `/mcp/server-card`), MCP Registry manifest https://jenriks.com/server.json, health https://jenriks.com/mcp/health.

## Errors

Every error from `/api`, `/mcp` and the discovery documents is an RFC 9457 problem document (`application/problem+json`); page URLs answer the same way when a client accepts only JSON. Fields: `type`, `title`, `status`, `detail`, `instance`, `code`, `resolution`, `documentation_url`.

Codes: `not_found` (404), `api_route_not_found` (404), `photo_not_found` (404), `method_not_allowed` (405, with `Allow`), `invalid_parameter` (400), `not_acceptable` (406), `unsupported_media_type` (415), `payload_too_large` (413, 64 KB limit), `rate_limit_exceeded` (429, with `Retry-After`), `service_unavailable` (503). JSON-RPC level errors inside the MCP server use the JSON-RPC `error` object.

## Rate limits

`/api` and `/mcp` allow 120 requests per client IP in each 60-second window. Responses carry `RateLimit-Policy` and `RateLimit` (IETF structured fields) plus `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`; a 429 carries `Retry-After`. Feeds, sitemap and pages are not counted.

## Versioning and deprecation

Stable REST operations carry a major version in the path, beginning with `/api/v1`. Backward-compatible fields may be added within v1; breaking changes get a new major path. Before a version is removed, JENRIKS publishes a migration note at https://jenriks.com/developers/#versioning and signals it with RFC 9745 `Deprecation` and `Link` headers; a dated `Sunset` header is announced at least 90 days before removal. No sunset is scheduled.

## Feeds, markdown and discovery documents

- RSS: https://jenriks.com/feed.xml (latest 20); sitemap: https://jenriks.com/sitemap.xml
- Agent indexes: https://jenriks.com/llms.txt and https://jenriks.com/llms-full.txt
- Markdown alternates: /index.md, /about.md, /contact.md, /developers.md, or `Accept: text/markdown` on the page URL
- Photo pages: `/YYYY/MM/DD/slug/` with BlogPosting and ImageObject JSON-LD; `/YYYY/MM/DD/` redirects to that day's photo
- Discovery: /.well-known/api-catalog, /.well-known/ai-catalog.json, /.well-known/agent-skills/index.json, /.well-known/ai-plugin.json, /auth.md, /robots.txt (Content-Signal)

## Credit and licensing

All photographs are © Jens Herrmann or © Erik Hehrmann, all rights reserved. Name the photographer and link the permanent page URL (the `credit` field is ready to paste). Do not redistribute, modify or train on the images without written permission. Prints and licensing: https://jenriks.com/contact/. The API documents, schemas and this page may be copied freely.

## Contact

jenriks@gmail.com or https://jenriks.com/contact/
