Zum Inhalt springen

API-Dokumentation

Erzeugen Sie 800×480-BMP-Bilder für E-Ink-Displays mit F1-Rennzeitplänen im 1bit-, B/W/R-, B/W/R/Y- oder Spectra-6-Modus.

800×480 BMP 1bit / B/W/R / B/W/R/Y / Spectra 6 E-Ink REST API

GET /calendar.bmp

Erzeugt einen F1-Kalender als BMP-Bild (800×480) für 1bit-, 4-Bit-B/W/R-, 4-Bit-B/W/R/Y- und Spectra-6-E-Ink-Displays.

Ohne die Kombination aus year und round oder race_key wird das nächste Rennen ausgewählt. Übernehmen Sie round oder race_key aus /api/races/{year}. Ausnahme: race_key ohne year gibt HTTP 400 zurück.

Streckenstil: track_style=relief · Kartengrundlage: track_source=jules · Farbakzente: track_accent=all.

Höhe und Farbabschnitte sind dekorativ. Verwendet die vom Display unterstützten Farben. Für alle vier Akzente verwenden display=spectra6.

GET /api/tracks — Alle Stile, Akzente und Strecken. GET /api/tracks/{circuit_id} — Urheber und Lizenzen.

GET /api/tracks/{circuit_id}.{svg|png|bmp} · GET /preview/configure/calendar.png — Dieselben Parameter track_style, track_source, track_accent.

Madring · SVG · Credits

Parameter

Parameter Typ Beschreibung
lang string Sprachcode für den Kalendertext
Werte: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (standard: en)
year integer Saisonjahr für ein bestimmtes Rennen
optional — z. B. 2026
round integer Rundennummer aus der Saison-Rennliste; ohne year ignoriert
optional — z. B. ?year=2026&round=5
race_key string Rennkennung aus /api/races/{year}; erfordert year
optional — z. B. 2026-round-6-monaco-2026-06-07
tz string Zeitzone für Zeitangaben im Zeitplan (IANA-Format)
optional — z. B. America/New_York, Europe/Prague (standard: Europe/Prague)
display string Ausgabemodus für 1bit-, B/W/R-, B/W/R/Y- oder Spectra-6-Displays
Werte: 1bit, bwr, bwry, spectra6 (standard: 1bit)
weather boolean Wetter-Overlay aktivieren oder deaktivieren
Werte: true, false (standard: true)
weather_type string Welche Wetterdatenvariante gerendert werden soll
Werte: off, race_day, race, current (standard: race_day)
track_style string Streckenstil
Werte: relief, poster, clean, lino, riso, screenprint, contours, geometric, blueprint, ribbon, mosaic, halftone, negative, papercut, typographic, artdeco, stencil, pixel (standard: relief)
track_source string Kartengrundlage
Werte: jules, commons (standard: jules)
track_accent string Farbakzente
Werte: all, mono, red, yellow, blue, green, warm, red-blue, red-green, yellow-blue, yellow-green, cool, red-yellow-blue, red-yellow-green, red-blue-green, yellow-blue-green (standard: all)

Antwort

Content-Type image/bmp
Abmessungen 800×480
Farbtiefe 1bit / 4-bit B/W/R / 4-bit B/W/R/Y / Spectra 6
Cache public, max-age=3600

BMP-Antworten enthalten ETag. Senden Sie If-None-Match, um bei unverändertem Bild den Status 304 zu erhalten.

Bild öffnen

Codebeispiele

# Download next race calendar
curl -o calendar.bmp "https://f1.inkycloud.click/calendar.bmp"

# With Czech language and timezone
curl -o calendar.bmp "https://f1.inkycloud.click/calendar.bmp?lang=cs&tz=Europe/Prague"

# Specific race (year and round)
curl -o calendar.bmp "https://f1.inkycloud.click/calendar.bmp?year=2026&round=6"

# B/W/R/Y output for four-color E-Ink
curl -o calendar.bmp "https://f1.inkycloud.click/calendar.bmp?display=bwry"
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.inkycloud.click/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.inkycloud.click/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();
}

Nutzung mit E-Ink-Display

Rufen Sie /calendar.bmp ab und zeigen Sie es direkt auf Ihrem E-Ink-Display an. Empfohlenes Aktualisierungsintervall: alle 1 bis 6 Stunden. Kompatibel mit jedem 800×480-E-Ink-Display (z. B. Waveshare 7.5", LaskaKit).

Für LaskaKit / zivyobraz.eu:

  1. 1 In zivyobraz.eu als Inhaltsquelle auswählen: URL mit Bild
  2. 2 URL einfügen: https://f1.inkycloud.click/calendar.bmp?lang=cs&tz=Europe/Prague
  3. 3 Aktualisierungsintervall auf 1-6 Stunden setzen

GET /teams.bmp

Erzeugen Sie ein BMP-Bild mit allen F1-Teams inklusive Fahrern, Fotos und Meisterschaftspunkten in den Ausgabemodi 1bit, B/W/R, B/W/R/Y oder Spectra 6.

Bildnachweise und Lizenzen (Streckengrafiken CC BY 4.0, Open-Meteo-Wetterdaten CC BY 4.0): siehe Credits. Antworten enthalten außerdem einen Link-Header mit rel="license".

Parameter

Parameter Typ Beschreibung
lang string Sprachcode für den Kalendertext
Werte: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (standard: en)
year integer Saisonjahr für Teamdaten
optional — z. B. 2026
display string Ausgabemodus des Displays
Werte: 1bit, bwr, bwry, spectra6 (standard: 1bit)
extra string Optionales Panel: none (Standard), countdown, flags, track, weather. Verwendet lokale Saisondaten und zwischengespeichertes Wetter; nicht verfügbare Panels werden ausgeblendet.
tz string Optional IANA timezone for extra panels showing a time or date: countdown, flags, track, weather. Defaults to the server's DEFAULT_TIMEZONE; ignored for none or unavailable panels. Invalid values return HTTP 400. Also supported by /preview/configure/teams.png.

Antwort

Content-Type image/bmp
Abmessungen 800×480
Farbtiefe 1-bit / 4-bit / Spectra 6
Cache no-cache
Bild öffnen

Weitere Endpoints

GET /api/teams/{year}

Alle Teams mit Fahrern und Punkten für eine Saison abrufen (JSON)

GET /api/standings/leader

Aktuelle Meisterschaftsführende abrufen (Fahrer und Konstrukteur)

/api/standings/leader/{year}

GET /api/races/{year}

Liste aller Rennen einer Saison

GET /api/race/{year}/{round}

Detaillierte Renninformationen inklusive Zeitplan

GET /api/stats

Anfragestatistiken der letzten 24 Stunden

GET /api/stats/history

Stündlicher Anfrageverlauf; limit: 1–720 (Standard 168).

GET / POST /api/perf-metrics

GET: Leistungsübersichten; hours: 1–720 (Standard 24). POST: numerische Web Vitals; Besucher- und Gerätemetadaten werden ignoriert.

GET /preview/{screen_type}.png

GET /preview/configure/{screen_type}.png

PNG-Vorschauen für Kalender oder Teams; lang wählt die Sprache. Konfigurationsvorschauen akzeptieren auch display und für den Kalender weather_type (Standard off).

extra — Optionales Panel: none (Standard), countdown, flags, track, weather. Verwendet lokale Saisondaten und zwischengespeichertes Wetter; nicht verfügbare Panels werden ausgeblendet.

track_style, track_source, track_accent — Streckenstil, Kartengrundlage, Farbakzente (calendar).

GET /health/ready

Datenbank, beschreibbarer Speicher und Aktualität der Bilder; HTTP 200 bei Bereitschaft, andernfalls 503.

GET /health

Service-Statusprüfung

GET /api

JSON-API — API-Dokumentation im JSON-Format

Die Lese-APIs für Statistiken erfordern X-Admin-Token oder Authorization: Bearer <token>, wenn ADMIN_API_TOKEN konfiguriert ist. Bei MINIMAL_DATA_MODE=true geben alle Statistik-APIs den Status 410 zurück.

Anfragen, die das Ratenlimit überschreiten, erhalten den Status 429 mit Retry-After.

Menü