Skip to main content
Every request requires a bearer API key, passed in the Authorization header:
Authorization: Bearer <YOUR_API_KEY>
Requests without a valid, active key return 401 Unauthorized.
Create and manage API keys in the web panel at bananahub.io. Keys can be scoped to specific models — a key without permission for the requested model returns 403.

Idempotency

All generation endpoints accept an optional Idempotency-Key header. Replaying the same key returns the original job_id without creating a duplicate job or charging again.
Idempotency-Key: 9f1c8b1e-7c2a-4a86-9b6e-2c5fa0b7d8e1
Use a fresh UUID per logical request and retry with the same key on network failures — this makes job creation safe to retry.
Example
curl -s -X POST https://bananahub.io/api/v1/text-generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 9f1c8b1e-7c2a-4a86-9b6e-2c5fa0b7d8e1" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a red panda astronaut floating in a nebula",
    "aspect_ratio": "16:9",
    "resolution": "2K"
  }'