Zum Hauptinhalt springen

Documentation Index

Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt

Use this file to discover all available pages before exploring further.

POST /credits/checkout

Dieser Endpunkt erstellt eine Stripe-Checkout-Sitzung zum Kauf eines Credit-Pakets. Erfordert Sitzungsauthentifizierung (JWT-Access-Token nach Login).
Für Drittanbieter-Integrationen: Verwenden Sie stattdessen POST /credits/checkout/api mit API-Schlüssel-Authentifizierung.

Anfragetext

packageId
string
erforderlich
Kennung des zu kaufenden Credit-Pakets. Verfügbare Pakete über /credits/packages.
successUrl
string
URL nach erfolgreichem Kauf. Standard: Dashboard mit Erfolgsanzeige.
cancelUrl
string
URL bei Abbruch des Kaufs. Standard: Dashboard mit Abbruchanzeige.

Antwort

sessionId
string
Kennung der Stripe-Checkout-Sitzung.
url
string
URL der Stripe-Checkout-Seite. Nutzer zur Zahlungsabschluss dorthin weiterleiten.
package
object
Details des gewählten Pakets.
curl -X POST https://api.llmgenerator.com/api/v1/credits/checkout \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "packageId": "pkg_pro",
        "successUrl": "https://example.com/success?session_id={CHECKOUT_SESSION_ID}",
        "cancelUrl": "https://example.com/cancel"
      }'
{
  "sessionId": "cs_test_a1b2c3d4e5f6g7h8i9j0",
  "url": "https://checkout.stripe.com/c/pay/cs_test_a1b2c3d4e5f6g7h8i9j0",
  "package": {
    "id": "pkg_pro",
    "name": "Pro Pack",
    "credits": 500,
    "priceCents": 1999
  }
}

POST /credits/checkout/api

Erstellt eine Stripe-Checkout-Sitzung mit API-Schlüssel-Authentifizierung. Geeignet für Drittanbieter-Integrationen und externe Anwendungen.

Authentifizierung

API-Schlüssel erforderlich. Übergeben Sie ihn im Header Authorization:
Authorization: Bearer llmgen_your_api_key_here

Anfragetext

Wie bei /credits/checkout oben.

Antwort

Wie bei /credits/checkout oben.
curl -X POST https://api.llmgenerator.com/api/v1/credits/checkout/api \
  -H "Authorization: Bearer llmgen_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
        "packageId": "pkg_pro",
        "successUrl": "https://yourapp.com/success?session_id={CHECKOUT_SESSION_ID}",
        "cancelUrl": "https://yourapp.com/cancel"
      }'