Riferimento API
Complete reference for all Rendra API endpoints. Base URL: https://rendra.alphabros.eu
Authorization: Bearer YOUR_API_KEY header.
See Autenticazione for details.
Generazione di immagini
Submit an image generation request. Returns immediately with a generation ID and processing status. Poll GET /api/v1/generate/:id for the result, or use the SDK's generateAndWait() method.
Request Headers
| Header | Value | |
|---|---|---|
| Authorization | Bearer YOUR_API_KEY | Required |
| Content-Type | application/json | Required |
Request Body
| Field | Type | Default | |
|---|---|---|---|
| prompt | string | — | Required |
| width | integer | 1200 | Optional |
| height | integer | 630 | Optional |
| format | "png" | "jpeg" | "png" | Optional |
Request
curl -X POST https://rendra.alphabros.eu/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A modern tech blog header with gradient background",
"width": 1200,
"height": 630,
"format": "png"
}'
Response — 202 Accepted
{
"id": "gen_abc123",
"status": "processing",
"url": null
}
Retrieve the status and result of a generation request. Poll this endpoint until status is completed or failed.
Path Parameters
| Parameter | Type | |
|---|---|---|
| id | string | Required |
Status Values
| Value | Description |
|---|---|
pending | Job queued, not yet started. |
processing | Image is being generated. |
completed | Image is ready. url will be populated. |
failed | Generation failed. Retry or contact support. |
Request
curl https://rendra.alphabros.eu/api/v1/generate/gen_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
Response — 200 OK
{
"id": "gen_abc123",
"status": "completed",
"url": "https://cdn.rendra.dev/gen_abc123.png",
"width": 1200,
"height": 630
}
Account
Register a new user account. Returns the user's API key. Accounts are created on the Free plan by default.
Request Body
| Field | Type | |
|---|---|---|
| string (email) | Required |
Request
curl -X POST https://rendra.alphabros.eu/api/v1/users \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com"}'
Response — 201 Created
{
"id": "usr_xyz789",
"email": "user@example.com",
"api_key": "rnd_live_xxxxxxxxxxxxxxxxxxxx",
"plan": "free"
}
Dashboard
Returns current usage statistics, plan information, and generation counts for the authenticated user.
Request
curl https://rendra.alphabros.eu/api/v1/dashboard \
-H "Authorization: Bearer YOUR_API_KEY"
Response — 200 OK
{
"plan": "free",
"usage": {
"current_period": 12,
"limit": 50,
"resets_at": "2026-05-01T00:00:00Z"
},
"total_generations": 48
}
Returns a paginated list of past image generations for the authenticated user.
Query Parameters
| Parameter | Type | Default |
|---|---|---|
| limit | integer | 20 |
| offset | integer | 0 |
Request
curl "https://rendra.alphabros.eu/api/v1/history?limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Response — 200 OK
[
{
"id": "gen_abc123",
"prompt": "A modern tech blog header",
"status": "completed",
"url": "https://cdn.rendra.dev/gen_abc123.png",
"width": 1200,
"height": 630,
"created_at": "2026-04-24T10:30:00Z"
}
]
Fatturazione
Creates a Stripe checkout session to upgrade the authenticated user to a paid plan. Returns a url to redirect the user to.
Response — 200 OK
{
"url": "https://checkout.stripe.com/pay/cs_test_xxx"
}
Creates a Stripe billing portal session so the user can manage their subscription, update payment methods, or cancel.
Response — 200 OK
{
"url": "https://billing.stripe.com/p/session/xxx"
}
Stato
Returns the current health status of the API. Use this endpoint for uptime monitoring.
Response — 200 OK
{
"status": "ok",
"service": "rendra",
"version": "1.0.0",
"timestamp": "2026-04-24T10:00:00.000Z"
}