feat: banatie script
This commit is contained in:
@@ -150,12 +150,21 @@ When generating HTML worksheets:
|
||||
|
||||
## Banatie API
|
||||
|
||||
REST API for generating images.
|
||||
REST API at `https://api.banatie.app` for generating images. Auth via `X-API-Key` header (reads `BANATIE_KEY` from `.env`).
|
||||
|
||||
- **Backgrounds:** ~1200×1700px, themed illustrations (forest, space, ocean, etc.)
|
||||
- **Icons:** 128×128px, transparent PNG, simple collectible items (stars, gems, animals)
|
||||
**POST `/api/v1/generations`** — create generation:
|
||||
- `prompt` (string, required) — image description
|
||||
- `aspectRatio` — `1:1`, `16:9`, `9:16`, `3:2`, `21:9` (default: `1:1`)
|
||||
- `referenceImages` (string[]) — image IDs as references
|
||||
- `autoEnhance` (boolean) — prompt enhancement (default: true)
|
||||
|
||||
Configuration is in `src/scripts/banatie.mjs`. Set the `BANATIE_API_KEY` environment variable for authentication.
|
||||
Response returns JSON with `data.outputImage.storageUrl` (CDN URL to download).
|
||||
|
||||
Script `src/scripts/banatie.mjs` wraps the API with presets:
|
||||
- `background` → `aspectRatio: "9:16"` (vertical, for page backgrounds)
|
||||
- `icon` → `aspectRatio: "1:1"` (square, for problem card icons)
|
||||
|
||||
Rate limit: 100 requests/hour per API key.
|
||||
|
||||
## Background Removal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user