Models / Images / UplinkSwitch
Image Resizer API
Image Resizer API: $0.002 per image, prepaid, no subscription. Send an image URL and get the result back, on the same key as every image model.
image-resizerImagesper image
Price · per image, USD
Get a key| Settings | UplinkSwitch |
|---|---|
| any settings | $0.002 |
Charged when the request is accepted; refunded in full if the generation fails.
What a run costs · USD, live
$0.002 per image at any settings.
| Run | At $0.002 per image |
|---|---|
| One image | $0.002 |
| 10 images | $0.02 |
| 100 images | $0.20 |
Compare · per image, live
Image Resizer from $0.002 per image; Image Upscaler from $0.002; Background Remover from $0.0054.
Call it · POST /v1/generations
curl
curl https://api.uplinkswitch.com/v1/generations \
-H "Authorization: Bearer $UPLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "image-resizer",
"input": {
"image_url": "https://example.com/input.png"
}
}'
# the answer is already "succeeded", with the file at outputs[0].urlPython, requests
import os, time, requests
BASE = "https://api.uplinkswitch.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['UPLINK_API_KEY']}"}
payload = {
"model": "image-resizer",
"input": {
"image_url": "https://example.com/input.png"
}
}
gen = requests.post(f"{BASE}/generations", headers=HEADERS, json=payload, timeout=30).json()
while gen["status"] not in ("succeeded", "failed"):
time.sleep(5)
gen = requests.get(f"{BASE}/generations/{gen['id']}", headers=HEADERS, timeout=30).json()
if gen["status"] == "succeeded":
url = gen["outputs"][0]["url"]
with open(url.rsplit("/", 1)[-1], "wb") as f:
f.write(requests.get(url, headers=HEADERS, timeout=120).content)The answer comes back succeeded, with the file at outputs[0].url. Files stay downloadable for 30 days.
Settings · in input
| Name | Type | Values | Default |
|---|---|---|---|
| image_url required | url | — | — |
| width | integer | — | — |
| height | integer | — | — |
| fit | string | contain, cover, pad, squeeze, scale-down, crop | contain |
| background | string | — | — |
| output_format | string | png, jpeg, webp | png |
Questions
From $0.002 per image. The price depends on the settings in the table and is fixed when the request is accepted.
Create one in the console at uplinkswitch.ai/console: prepaid credit from $10, no subscription, and the key is live at once. Send it as the bearer token to /v1/generations with model image-resizer; the same key calls every other model in the catalog.
No. You add credit and each request is paid from it. There is no monthly fee and no minimum per request.
It is refunded in full, automatically. You pay only for files you receive.
Thirty days, at a URL on api.uplinkswitch.com. Download what you want to keep.
Yes. The same key calls every image, video, speech and 3D model and every chat model in the catalog.