Intelligente Bildskalierung
Suradil
Algorithmische Kantenerweiterung — skaliert Bilder auf beliebige Zielgrößen mit Stretch- oder Mirror-Algorithmus.
Pricing
25Tokens
Bildskalierungpro 1024×1024 Block
Berechnung
ceil(width × height / 1.048.576)Beispiele
750×4001 Block1920×10802 Blöcke4096×21609 BlöckePOST
/v1/suradil/resizeSkaliert ein Bild auf eine Zielgröße und erweitert die Ränder intelligent. Antwort: PNG (Base64).
Parameter
| Name | Typ | Status | Beschreibung |
|---|---|---|---|
image | string | Ja | Quellbild — JPEG, PNG, WebP, TIFF, GIF (URL, Base64 oder Data URI) |
target_width | integer | Ja | Zielbreite in Pixel (max. 8192) |
target_height | integer | Ja | Zielhöhe in Pixel (max. 8192) |
use_mirror | boolean | Optional | Mirror-Modus statt Stretch (Standard: false) |
Request
curl -X POST "https://api.centra.dbpg.io/v1/suradil/resize" \
-H "Authorization: Bearer sk-live-your_api_key" \
-H "Content-Type: application/json" \
-d '{
"image": "https://example.com/photo.jpg",
"target_width": 1920,
"target_height": 1080
}'Response
{
"image": "iVBORw0KGgoAAAANSUhEUgAA...",
"format": "png",
"metadata": {
"originalWidth": 1600,
"originalHeight": 400,
"targetWidth": 1920,
"targetHeight": 1080
},
"usage": {
"tokens_used": 50,
"remaining_balance": 45000
}
}