コンテンツへスキップ

API ドキュメント

1bit、B/W/R、B/W/R/Y、または Spectra 6 モードで F1 レース日程を表示する E-Ink ディスプレイ向けに、800×480 の BMP 画像を生成します。

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

GET /calendar.bmp

F1 カレンダーを BMP 画像 (800×480) として生成し、1bit、4-bit B/W/R、4-bit B/W/R/Y、Spectra 6 の E-Ink ディスプレイに対応します。

year と round または race_key の組み合わせを指定しない場合、次のレースが選択されます。round または race_key を /api/races/{year} からコピーしてください。 例外:year なしで race_key を指定すると HTTP 400 が返されます。

コースのスタイル: track_style=relief · 地図の出典: track_source=jules · アクセントカラー: track_accent=all.

高さと色分けは装飾です。ディスプレイが対応する色を使用します。 全4色を使う場合 display=spectra6.

GET /api/tracks — すべてのスタイル、色、コース. GET /api/tracks/{circuit_id} — 作者とライセンス.

GET /api/tracks/{circuit_id}.{svg|png|bmp} · GET /preview/configure/calendar.png — 共通の track_style、track_source、track_accent パラメーター.

Madring · SVG · Credits

パラメータ

Parameter 型 説明
lang string カレンダーテキスト用の言語コード
値: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (デフォルト: en)
year integer 特定レース用のシーズン年
任意 — 例 2026
round integer シーズンのレース一覧のラウンド番号(year がなければ無視)
任意 — 例 ?year=2026&round=5
race_key string /api/races/{year} のレース識別子。year が必要です
任意 — 例 2026-round-6-monaco-2026-06-07
tz string スケジュール時刻用のタイムゾーン (IANA 形式)
任意 — 例 America/New_York, Europe/Prague (デフォルト: Europe/Prague)
display string 1bit、B/W/R、B/W/R/Y、Spectra 6 ディスプレイ用の出力モード
値: 1bit, bwr, bwry, spectra6 (デフォルト: 1bit)
weather boolean 天気オーバーレイの有効化または無効化
値: true, false (デフォルト: true)
weather_type string 描画する天気データの種類
値: off, race_day, race, current (デフォルト: race_day)
track_style string コースのスタイル
値: relief, poster, clean, lino, riso, screenprint, contours, geometric, blueprint, ribbon, mosaic, halftone, negative, papercut, typographic, artdeco, stencil, pixel (デフォルト: relief)
track_source string 地図の出典
値: jules, commons (デフォルト: jules)
track_accent string アクセントカラー
値: 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 (デフォルト: all)

レスポンス

Content-Type image/bmp
サイズ 800×480
色深度 1bit / 4-bit B/W/R / 4-bit B/W/R/Y / Spectra 6
Cache public, max-age=3600

BMP レスポンスには ETag が含まれます。If-None-Match を送信すると、画像が変更されていない場合に 304 が返されます。

コード例

# 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();
}

E-Ink ディスプレイでの使用

/calendar.bmp を取得して、そのまま E-Ink ディスプレイに表示できます。推奨更新間隔は 1〜6 時間です。800×480 の E-Ink ディスプレイ(例: Waveshare 7.5", LaskaKit)で利用できます。

LaskaKit / zivyobraz.eu 向け:

  1. 1 zivyobraz.eu でコンテンツソースとして画像 URL を選択
  2. 2 URL を貼り付け: https://f1.inkycloud.click/calendar.bmp?lang=cs&tz=Europe/Prague
  3. 3 更新間隔を 1〜6 時間に設定

GET /teams.bmp

1bit、B/W/R、B/W/R/Y、または Spectra 6 出力モードで、すべての F1 チーム、ドライバー、写真、チャンピオンシップポイントを表示する BMP 画像を生成します。

画像の帰属表示とライセンス(サーキット図 CC BY 4.0、Open-Meteo 天気データ CC BY 4.0):Credits を参照してください。レスポンスには rel="license" の Link ヘッダーも含まれます。

パラメータ

Parameter 型 説明
lang string カレンダーテキスト用の言語コード
値: cs, de, en, es, fr, it, ja, nl, pl, pt-BR, sk, tr, zh-CN (デフォルト: en)
year integer チームデータのシーズン年
任意 — 例 2026
display string ディスプレイ出力モード
値: 1bit, bwr, bwry, spectra6 (デフォルト: 1bit)
extra string 追加パネル:none(既定)、countdown、flags、track、weather。ローカルのシーズンデータとキャッシュ済みの天気のみを使用し、利用できない場合は表示しません。
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.

レスポンス

Content-Type image/bmp
サイズ 800×480
色深度 1-bit / 4-bit / Spectra 6
Cache no-cache

その他のエンドポイント

GET /api/teams/{year}

シーズンの全チーム・ドライバー・ポイントを取得(JSON)

GET /api/standings/leader

現在のチャンピオンシップ首位(ドライバーとコンストラクター)を取得

/api/standings/leader/{year}

GET /api/races/{year}

指定シーズンの全レース一覧

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

スケジュールを含む詳細なレース情報

GET /api/stats

直近24時間のリクエスト統計

GET /api/stats/history

1 時間ごとのリクエスト履歴。limit: 1–720(デフォルト 168)。

GET / POST /api/perf-metrics

GET: パフォーマンスの概要。hours: 1–720(デフォルト 24)。POST: Web Vitals の数値。訪問者とデバイスのメタデータは無視されます。

GET /preview/{screen_type}.png

GET /preview/configure/{screen_type}.png

カレンダーまたはチームの PNG プレビュー。lang で言語を選択します。設定画面のプレビューでは display と、カレンダー用の weather_type(デフォルト off)も指定できます。

extra — 追加パネル:none(既定)、countdown、flags、track、weather。ローカルのシーズンデータとキャッシュ済みの天気のみを使用し、利用できない場合は表示しません。

track_style, track_source, track_accent — コースのスタイル, 地図の出典, アクセントカラー (calendar).

GET /health/ready

データベース、書き込み可能なストレージ、画像の鮮度を確認します。準備完了時は HTTP 200、それ以外は 503 を返します。

GET /health

サービス稼働状況チェック

GET /api

JSON API — JSON 形式の API ドキュメント

ADMIN_API_TOKEN が設定されている場合、統計読み取り API には X-Admin-Token または Authorization: Bearer <token> が必要です。MINIMAL_DATA_MODE=true の場合、すべての統計 API が 410 を返します。

レート制限を超えたリクエストには、Retry-After 付きの 429 が返されます。

メニュー