Optimagio
Developer API

An image optimization API your CI/CD can depend on

Authenticate with an API key, POST an image or URL, and get back an optimized result with the numbers that matter — original size, optimized size, percent saved, and the output format. Single calls for hot paths, upload-first batches for catalogs.

  • API keys with an opt_ prefix; plaintext shown once
  • Sync optimize, URL optimize, async jobs, and batch endpoints
  • Idempotency keys, tier rate limits, and explicit error codes
50/chunk
files per batch request

Real product capability — not a placeholder.

Optimize a file in one request

Authenticate, upload, and receive an optimized result.

bash
curl -X POST https://optimagio.com/api/optimize \
  -H "X-API-Key: opt_your_key" \
  -F "accept_file=true" \
  -F "[email protected]" \
  -F "format=webp" \
  -F "compression=max"

# -> { optimized_url, original_size, optimized_size,
#      saved_bytes, percent, format, width, height, cached }

Use Authorization: Bearer opt_... or X-API-Key. Cache hits do not spend monthly quota.

Endpoints

The surface you need, nothing you don’t

01

POST /api/optimize

Synchronous compress/convert/resize by file or URL — perfect for request-time optimization.

02

POST /api/v1/optimize/batch

Upload-first batches: up to 50 files per chunk, one stable client_batch_id, idempotency per chunk.

03

Async jobs

Queue URL or upload jobs and poll GET /api/v1/jobs/:id for status without holding a connection open.

04

Idempotency

A unique Idempotency-Key per chunk makes retries safe; a changed payload on the same key returns 409.

05

Per-item results

Batches report rejected_files separately while accepted files keep processing — no all-or-nothing failures.

06

Bulk ZIP

Pull completed results as a single ZIP, with honest 409s when results have expired from storage.

Rate limits that scale with your plan

300
requests/min on Starter
1,000 on Pro · 3,000 on Business
3–25
API keys per account
Starter → Business; Scale custom
500k+
images/month on Scale
100 on Free to start

From a free key to production volume

Every account can create API keys — Free includes 1, Starter 3, Pro 10, Business 25, and Scale is custom by contract. Move up a tier the moment your throughput needs it.

FAQ

Frequently asked questions

How do I authenticate with the Optimagio API?

Create an API key in your dashboard (it starts with opt_ and is shown in full only once), then send it as X-API-Key: opt_... or Authorization: Bearer opt_... on each request.

How do I optimize many images through the API?

Use the upload-first batch endpoint POST /api/v1/optimize/batch. Send up to 50 files per chunk, reuse one client_batch_id across chunks, and give each chunk a unique Idempotency-Key. A single batch supports up to 50,000 files.

Do cached results count against my quota?

No. When a request matches a previously optimized result (same content hash and parameters), the response is served from cache and does not consume monthly image quota, though it is still recorded in analytics.

What are the API rate limits?

Rate limits are tier-based: roughly 300 requests/minute on Starter, 1,000 on Pro, and 3,000 on Business, with per-API-key result limits defaulting to half the account RPM.

Start optimizing your images today

Try the free public tool now, then upgrade for higher limits, bulk batches, the API, storage, and reports.

Free tier available · No card required to start · Cancel anytime