Rendra Docs / Authentifizierung

Authentifizierung

Rendra verwendet API-Schlüssel zur Authentifizierung. Jede Anfrage an einen geschützten Endpunkt muss ein gültiges Bearer-Token enthalten.

Einen API-Schlüssel erhalten

API keys are created when you register an account. Send a POST request to /api/v1/users with your email address:

curl -X POST https://rendra.alphabros.eu/api/v1/users \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

Response:

{
  "id": "usr_abc123",
  "email": "you@example.com",
  "api_key": "rnd_live_xxxxxxxxxxxxxxxxxxxx",
  "plan": "free"
}
Important: Your api_key is shown only once at creation time. Store it securely — you cannot retrieve it again. If you lose it, you will need to contact support to rotate it.

Ihren API-Schlüssel verwenden

Pass your API key as a Bearer token in the Authorization header on every request:

Authorization: Bearer YOUR_API_KEY

Example — curl

curl -X POST https://rendra.alphabros.eu/api/v1/generate \
  -H "Authorization: Bearer rnd_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A clean product launch banner", "width": 1200, "height": 630}'

Example — JavaScript (fetch)

const response = await fetch('https://rendra.alphabros.eu/api/v1/generate', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.RENDRA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prompt: 'A clean product launch banner',
    width: 1200,
    height: 630,
  }),
});

Authentifizierungsfehler

Status Code Description
401 Unauthorized Missing or malformed Authorization header.
403 Forbidden API key is invalid or has been revoked.
429 Too Many Requests You have exceeded your plan's rate limit. See Abrechnung und Nutzung.

Bewährte Sicherheitspraktiken

Geben Sie Ihren API-Schlüssel niemals clientseitig preis

Rufen Sie die Rendra-API immer von Ihrem Server oder einer Serverless-Funktion aus auf. Betten Sie Ihren Schlüssel niemals in Browser-JavaScript oder in Binärdateien mobiler Apps ein.

Verwenden Sie Umgebungsvariablen

Store your key in an environment variable (RENDRA_API_KEY) and load it at runtime. Never hardcode it in source files or commit it to version control.

Rotieren Sie Schlüssel bei Kompromittierung

If you suspect your key has been leaked, contact support@alphabros.eu immediately to have it rotated.

Next step: Now that you're authenticated, explore the API-Referenz or jump straight to the SDK-Leitfaden.