# Einführung

<div className="not-prose">

{/* ── Hero ── */}
<div className="rounded-2xl border border-border bg-card p-6 sm:p-8 mb-10">
  <div className="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-mono font-medium bg-primary/10 text-primary border border-primary/20 mb-3">
    <span className="w-1.5 h-1.5 rounded-full bg-primary animate-pulse" />
    REST API · JSON
  </div>
  <h1 className="text-3xl sm:text-4xl font-bold tracking-tight mb-2">pvnode API</h1>
  <p className="text-muted-foreground text-base sm:text-lg leading-relaxed max-w-2xl mb-6">
    PV-Leistungsprognosen, Monitoringdaten und Ertragsanalysen für Solaranlagen.
  </p>
  <div className="flex flex-wrap gap-3">
    <a href="/docs/de/quickstart" className="inline-flex items-center gap-2 px-5 py-2.5 text-sm font-semibold rounded-lg border border-border hover:border-primary/50 transition-colors">
      <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" strokeWidth="2" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M15.59 14.37a6 6 0 01-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 006.16-12.12A14.98 14.98 0 009.631 8.41m5.96 5.96a14.926 14.926 0 01-5.841 2.58m-.119-8.54a6 6 0 00-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 00-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 01-2.448-2.448 14.9 14.9 0 01.06-.312m-2.24 2.39a4.493 4.493 0 00-1.757 4.306 4.493 4.493 0 004.306-1.758M16.5 9a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z" /></svg>
      Schnellstart
    </a>
    <a href="https://pvnode.com/settings/api-keys" className="inline-flex items-center gap-2 px-5 py-2.5 text-sm font-semibold rounded-lg border border-border hover:border-primary/50 transition-colors">
      <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" strokeWidth="2" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z" /></svg>
      API-Key holen
    </a>
    <a href="/docs/api" className="inline-flex items-center gap-2 px-5 py-2.5 text-sm font-semibold rounded-lg border border-border hover:border-primary/50 transition-colors">
      <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" strokeWidth="2" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5" /></svg>
      API-Referenz
    </a>
  </div>
</div>

{/* ── Was ist pvnode ── */}
<div className="mb-10">
  <p className="text-muted-foreground leading-relaxed mb-3">
    pvnode ist eine Photovoltaik-Daten-API. Jeder Endpunkt nimmt Systemparameter entgegen und gibt modellierte PV-Daten zurück — als Zeitreihe, aggregierte Werte oder vollständige Systemsimulation, je nach Endpunkt.
  </p>
  <p className="text-muted-foreground leading-relaxed mb-3">
    Eine einfache Anfrage benötigt nur Standort, Neigung und Ausrichtung. Die API unterstützt darüber hinaus detailliertere Konfigurationen: Horizontprofile, Reihenverschattung, Tracker-Systeme, Modultechnologie (PERC, TOPCon, CdTe), Temperaturkoeffizienten, Albedo, Kabelverluste und mehr. Alle Parameter sind optional — wer Präzision braucht, gibt sie an.
  </p>
  <p className="text-muted-foreground leading-relaxed">
    Alle Endpunkte folgen demselben Muster: ein einzelner <span className="text-foreground font-mono text-sm">GET</span>-Request mit Query-Parametern, eine JSON-Antwort. Kein SDK erforderlich, kein Setup außer einem API-Key.
  </p>
</div>

{/* ── V1 Endpunkte ── */}
<div className="mb-4">
  <div className="flex items-center gap-3 mb-1">
    <h2 className="text-xl font-bold">V1 Endpunkte</h2>
    <span className="mt-4 px-2 py-0.5 rounded-full text-[10px] font-mono font-medium bg-primary/10 text-primary border border-primary/20">stable</span>
  </div>
</div>

{/* Prognose */}
<a href="/docs/api/v1-endpoints#forecast" className="group block rounded-xl border border-border bg-card p-6 hover:border-primary/50 hover:shadow-lg hover:shadow-primary/5 transition-all mb-4">
  <div className="flex items-center gap-3 mb-3">
    <div>
      <span className="px-2 py-0.5 rounded text-[10px] font-mono font-semibold text-primary bg-primary/10">GET</span>
      <span className="ml-2 font-mono text-sm">/v1/forecast</span>
    </div>
  </div>
  <h3 className="font-semibold text-base mb-1 group-hover:text-primary transition-colors">Leistungsprognose</h3>
  <p className="text-sm text-muted-foreground leading-relaxed">15-Minuten PV-Leistungsprognosen. +7 Tage voraus, −30 Tage zurück. Mehrfach täglich aktualisiert. Der zentrale Endpunkt für die meisten Anwendungsfälle.</p>
  <div className="flex gap-4 mt-4 text-xs text-muted-foreground font-mono">
    <span>Auflösung: 15 min</span><span>·</span><span>Bereich: −30d bis +7d</span>
  </div>
</a>

{/* Monitoring-Referenz */}
<a href="/docs/api/v1-endpoints#recent" className="group block rounded-xl border border-border bg-card p-6 hover:border-primary/50 hover:shadow-lg hover:shadow-primary/5 transition-all mb-6">
  <div className="flex items-center gap-3 mb-3">
    <div>
      <span className="px-2 py-0.5 rounded text-[10px] font-mono font-semibold text-primary bg-primary/10">GET</span>
      <span className="ml-2 font-mono text-sm">/v1/recent</span>
    </div>
  </div>
  <h3 className="font-semibold text-base mb-1 group-hover:text-primary transition-colors">Monitoring-Referenz</h3>
  <p className="text-sm text-muted-foreground leading-relaxed">Hochauflösende Referenzleistung der letzten 6 Monate. Erwartete vs. tatsächliche Leistung vergleichen, um Fehler und Degradation zu erkennen.</p>
  <div className="flex gap-4 mt-4 text-xs text-muted-foreground font-mono">
    <span>Auflösung: 15 min</span><span>·</span><span>Historie: 6 Monate</span>
  </div>
</a>

{/* Weitere Endpunkte */}
<h3 className="text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3">Weitere Endpunkte</h3>
<div className="grid sm:grid-cols-3 gap-3 mb-8">
  <a href="/docs/api/v1-endpoints#history" className="group block rounded-lg border border-border bg-card px-4 py-3 hover:border-primary/50 transition-all">
    <div className="flex items-center gap-2 mb-1">
      <span className="px-1.5 py-0.5 rounded text-[9px] font-mono font-semibold text-primary bg-primary/10">GET</span>
      <span className="font-mono text-xs">/v1/history</span>
    </div>
    <p className="text-xs text-muted-foreground">Historische Zeitreihen zurück bis 2015.</p>
  </a>
  <a href="/docs/api/v1-endpoints#yield" className="group block rounded-lg border border-border bg-card px-4 py-3 hover:border-primary/50 transition-all">
    <div className="flex items-center gap-2 mb-1">
      <span className="px-1.5 py-0.5 rounded text-[9px] font-mono font-semibold text-primary bg-primary/10">GET</span>
      <span className="font-mono text-xs">/v1/yield</span>
    </div>
    <p className="text-xs text-muted-foreground">Jahresertrag (kWh/kWp) mit vollständiger Verlustkette.</p>
  </a>
  <a href="/docs/api/v1-endpoints#system" className="group block rounded-lg border border-border bg-card px-4 py-3 hover:border-primary/50 transition-all">
    <div className="flex items-center gap-2 mb-1">
      <span className="px-1.5 py-0.5 rounded text-[9px] font-mono font-semibold text-primary bg-primary/10">GET</span>
      <span className="font-mono text-xs">/v1/system</span>
    </div>
    <p className="text-xs text-muted-foreground">PV + Batterie + Wärmepumpe + Verbraucher.</p>
  </a>
</div>

{/* V2 Hinweis */}
<div className="rounded-lg border border-primary/20 bg-primary/5 px-5 py-4">
  <div className="flex items-center gap-2 mb-1.5">
    <svg className="w-4 h-4 text-primary" fill="none" viewBox="0 0 24 24" strokeWidth="2" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z" /></svg>
    <span className="text-sm font-semibold text-primary">V2 API — Demnächst</span>
  </div>
  <p className="text-sm text-muted-foreground">
    Wir arbeiten an der nächsten Generation der pvnode API mit verbesserten Endpunkten und neuen Funktionen. Wir freuen uns über Feedback — schreib uns an <a href="mailto:info@pvnode.com" className="text-primary hover:underline">info@pvnode.com</a>
  </p>
</div>

</div>
