Authentication
Rendra uses API keys for authentication. Every request to a protected endpoint must include a valid Bearer token.
Getting an API Key
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.
Using Your API Key
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,
}),
});
Authentication Errors
| 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 Billing & Usage. |
Security Best Practices
Never expose your API key client-side
Always call the Rendra API from your server or a serverless function. Never embed your key in browser JavaScript or mobile app binaries.
Use environment variables
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.
Rotate keys if compromised
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 Reference or jump straight to the SDK Guide.