API Documentation
Generate 800×480 1-bit BMP images for E-Ink displays showing F1 race schedules.
/calendar.bmp
Generates F1 calendar as 1-bit BMP image (800×480) for E-Ink displays.
Parameters
| Parameter | Type | Description |
|---|---|---|
| lang | string |
Language code for calendar text
Values: en, cs (default: en)
|
| year | integer |
Season year for specific race
optional — e.g. 2025
|
| round | integer |
Round number (1-24) for specific race
optional — e.g. 5
|
| tz | string |
Timezone for schedule times (IANA format)
optional — e.g. America/New_York, Europe/Prague
|
Response
image/bmp
800×480
1-bit
1 hour
Code Examples
# Download next race calendar
curl -o calendar.bmp "https://f1-eink.example.com/calendar.bmp"
# With Czech language and timezone
curl -o calendar.bmp "https://f1-eink.example.com/calendar.bmp?lang=cs&tz=Europe/Prague"
# Specific race (year and round)
curl -o calendar.bmp "https://f1-eink.example.com/calendar.bmp?year=2025&round=5"
import httpx
async def get_f1_calendar(lang: str = "en", tz: str = "Europe/Prague"):
"""Download F1 calendar as BMP image."""
async with httpx.AsyncClient() as client:
response = await client.get(
"https://f1-eink.example.com/calendar.bmp",
params={"lang": lang, "tz": tz}
)
response.raise_for_status()
with open("calendar.bmp", "wb") as f:
f.write(response.content)
print("Calendar saved as calendar.bmp")
# Usage
import asyncio
asyncio.run(get_f1_calendar(lang="cs"))
// Fetch and display calendar
async function loadF1Calendar(lang = 'en', tz = 'Europe/Prague') {
const url = new URL('https://f1-eink.example.com/calendar.bmp');
url.searchParams.set('lang', lang);
url.searchParams.set('tz', tz);
const response = await fetch(url);
const blob = await response.blob();
// Display in img element
const img = document.getElementById('calendar');
img.src = URL.createObjectURL(blob);
}
// Download as file
async function downloadCalendar() {
const response = await fetch('/calendar.bmp?lang=cs');
const blob = await response.blob();
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = 'f1-calendar.bmp';
link.click();
}
E-Ink Display Usage
Fetch /calendar.bmp and display directly on your E-Ink display. Recommended refresh interval: every 1-6 hours. Compatible with any 800×480 E-Ink display (e.g., Waveshare 7.5", LaskaKit).
For LaskaKit / zivyobraz.eu:
- In zivyobraz.eu select content source: URL with image
- Paste URL:
https://your-server.com/calendar.bmp?lang=cs&tz=Europe/Prague - Set refresh interval to 1-6 hours
Other Endpoints
/api/races/{year}
List of all races for a given season
/api/race/{year}/{round}
Detailed race information including schedule
/api/stats
Request statistics (last hour and 24h counts)
/health
Service health check