Rendra Docs / Referencia de la API

Referencia de la API

Complete reference for all Rendra API endpoints. Base URL: https://rendra.alphabros.eu

Authentication: All endpoints marked 🔒 Protected require an Authorization: Bearer YOUR_API_KEY header. See Autenticación for details.

Generación de imágenes

POST /api/v1/generate Generate an image
🔒 Protected

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

HeaderValue
AuthorizationBearer YOUR_API_KEYRequired
Content-Typeapplication/jsonRequired

Request Body

FieldTypeDefault
promptstringRequired
widthinteger1200Optional
heightinteger630Optional
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
}
GET /api/v1/generate/:id Check generation status
🔒 Protected

Retrieve the status and result of a generation request. Poll this endpoint until status is completed or failed.

Path Parameters

ParameterType
idstringRequired

Status Values

ValueDescription
pendingJob queued, not yet started.
processingImage is being generated.
completedImage is ready. url will be populated.
failedGeneration 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
}

Cuenta

POST /api/v1/users Create user account
🔒 Protected

Register a new user account. Returns the user's API key. Accounts are created on the Free plan by default.

Request Body

FieldType
emailstring (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"
}

Panel

GET /api/v1/dashboard Get usage dashboard data
🔒 Protected

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
}
GET /api/v1/history Get generation history
🔒 Protected

Returns a paginated list of past image generations for the authenticated user.

Query Parameters

ParameterTypeDefault
limitinteger20
offsetinteger0

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"
  }
]

Facturación

POST /api/v1/billing/checkout Create Stripe checkout session
🔒 Protected

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"
}
POST /api/v1/billing/portal Open Stripe billing portal
🔒 Protected

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"
}

Estado

GET /health Health check
Public

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"
}