Smart Resize API
Resize an image into one or more exact target dimensions using composition-aware recomposition powered by fal-ai/smart-resize.
Endpoint
POST https://netwrck.com/api/smart-resize
Pricing
Standard outputs cost $0.18 each. 4K outputs cost $0.36 each. Each request includes a $0.06 vision analysis floor.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | yes | Your Netwrck API key. You can also send it as X-API-Key. |
| image_url | string | yes | Public source image URL. |
| target_sizes | array<string> | yes | Dimensions as WIDTHxHEIGHT, for example 1920x1080. |
| prompt | string | no | Optional extra resize instruction. |
| num_images_per_size | integer | no | Defaults to 1. Maximum 4 on Netwrck. |
| resolution | string | no | 1K, 2K, or 4K. Defaults to 1K. |
| output_format | string | no | png, jpeg, or webp. Defaults to png. |
| safety_tolerance | string | no | 1 through 6. Defaults to 4. |
| seed | integer | no | Optional reproducibility seed. |
Example
curl -X POST https://netwrck.com/api/smart-resize \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"image_url": "https://v3b.fal.media/files/b/0a98165f/n_OY7Sfccg39BnOnNqa89_VZbUgMoL.png",
"target_sizes": ["1024x1300", "1920x1080", "768x1344"],
"prompt": "",
"num_images_per_size": 1,
"resolution": "1K",
"output_format": "png",
"safety_tolerance": "4"
}'
Response
{
"success": true,
"image_url": "https://netwrckstatic.netwrck.com/static/uploads/...",
"images": ["https://netwrckstatic.netwrck.com/static/uploads/..."],
"target_sizes": ["1024x1300", "1920x1080", "768x1344"],
"credits_charged": 60,
"cost": "0.6000",
"result": {}
}
Netwrck