Developer Guide

Batch Upscale Images via API

By UpRes Team·

Whether you're upscaling product catalogs, automating a photo lab workflow, or building image tooling for your SaaS, this guide shows how to drive UpRes programmatically at scale.

API Access and Authentication

The UpRes API requires the Business plan ($49/month) or unlimited. Other paid plans and a pay-as-you-go credit balance alone do not grant API access. With an eligible plan, generate an API key at Settings → API Keys.

All requests use Bearer token authentication. Include your key in the Authorization header:

curl -X POST https://api.upres.ai/v1/jobs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flare",
    "image_url": "https://example.com/photo.jpg",
    "scale": 4
  }'

Model Selection for Batch Workflows

For batch pipelines where throughput matters, Flare is the best default. Each image uses one credit, so a batch of 500 images needs 500 credits; with 10 concurrent requests, throughput depends on queue load.

For premium output — hero images, product shots for large e-commerce displays, portrait work — swap to Lumen or Mirage on a subset of your batch.

Handling a Large Batch

The API supports up to 10 concurrent requests. For batches of 100+ images, use a queue with concurrency control. Here's a pattern in Node.js:

import pLimit from 'p-limit';

const limit = pLimit(10); // max 10 concurrent

const upscale = (imageUrl: string) =>
  fetch('https://api.upres.ai/v1/jobs', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.UPRES_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      model: 'flare',
      image_url: imageUrl,
      scale: 4,
    }),
  }).then((r) => r.json());

const results = await Promise.all(
  imageUrls.map((url) => limit(() => upscale(url)))
);

Poll long jobs

The public jobs API is poll-based. Submit with image_url, model, and scale, then read result_url when status is completed. Download that URL into your own storage before it expires.

{
  "image_url": "https://your-bucket.s3.amazonaws.com/photo.jpg",
  "model": "mirage",
  "scale": 8
}

Error Handling and Retries

The API returns standard HTTP status codes. On 429 Too Many Requests, back off and retry. On 5xx errors, retry up to 3 times with exponential backoff. The API is idempotent — submitting the same image URL twice will create two separate jobs.

Use Cases for Batch API

  • ›E-commerce: nightly upscale of new product SKUs before listing
  • ›Photo lab: automated restoration pipeline for customer-submitted scans
  • ›Real estate: batch upscaling of property listing photos
  • ›Publishing: resolution enhancement for print-quality output
  • ›Stock photography: bulk enhancement before upload to stock platforms

Related

Frequently Asked Questions

Does UpRes have an API for batch image upscaling?

Yes. The UpRes API is available on the Business plan ($49/month). It accepts image URLs or base64 input, supports all upscaling models, and returns results via webhook or polling. See the API docs at upres.ai/docs/api.

What rate limits does the UpRes API have?

Business plan API limits are 500 images/month and 10 concurrent requests. API keys require the Business plan or higher; a PAYG credit balance alone does not grant API access.

Can I upscale images from an S3 bucket via the API?

Yes. Generate a presigned S3 URL for each image and pass it as the image parameter. UpRes fetches and processes the image server-side. The output URL can be stored back to S3 via your webhook handler.

Free tier available

Get API access on the Business plan — start free, upgrade when ready.

5 free upscales per month. Creator from $9/mo. No watermarks on paid plans.