API Beta

Ship image workflows with OpusImg

A small, stable HTTP API for compression, conversion, and background removal. Beta access is included with Pro while we learn from production integrations.

Quickstart

  1. 1. Create a keyOpen Developer API in your dashboard. Copy the secret when it appears—it is shown once.
  2. 2. Send multipart dataAuthorize with a Bearer key and attach one image field plus endpoint parameters.
  3. 3. Handle the resultCompress and convert return bytes; background removal returns a job to poll.

Beta pricing and limits

AccessIncluded usageRate limitInput
Pro, Business1,000 operations/month30 requests/minute per key20 MB maximum

The beta does not debit AI credits. Higher-volume API pricing is not yet available; when it launches it will be published here at a fixed rate. Get in touch with any questions.

Endpoint examples

Compress

Synchronous image compression. The response body is the transformed image.

curl

curl -X POST https://api.opusimg.com/v1/compress \
  -H "Authorization: Bearer $OPUSIMG_API_KEY" \
  -F "image=@photo.jpg" \
  -F "quality=80" \
  -F "format=webp" \
  --output photo.webp

JavaScript

const form = new FormData();
form.append("image", file);
form.append("quality", "80");
form.append("format", "webp");

const response = await fetch("https://api.opusimg.com/v1/compress", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.OPUSIMG_API_KEY}` },
  body: form,
});
const image = await response.blob();

Convert

Synchronous conversion to JPEG, PNG, WebP, or AVIF.

curl

curl -X POST https://api.opusimg.com/v1/convert \
  -H "Authorization: Bearer $OPUSIMG_API_KEY" \
  -F "image=@photo.png" \
  -F "format=avif" \
  -F "quality=82" \
  --output photo.avif

JavaScript

const form = new FormData();
form.append("image", file);
form.append("format", "avif");
form.append("quality", "82");

const response = await fetch("https://api.opusimg.com/v1/convert", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.OPUSIMG_API_KEY}` },
  body: form,
});
const image = await response.blob();

Remove background

Asynchronous background removal. Poll the returned status URL until the job completes.

curl

curl -X POST https://api.opusimg.com/v1/remove-background \
  -H "Authorization: Bearer $OPUSIMG_API_KEY" \
  -F "image=@portrait.jpg" \
  -F "model=fast" \
  -F "background=transparent" \
  -F "refine_edges=true"

JavaScript

const form = new FormData();
form.append("image", file);
form.append("model", "fast");
form.append("background", "transparent");
form.append("refine_edges", "true");

const job = await fetch("https://api.opusimg.com/v1/remove-background", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.OPUSIMG_API_KEY}` },
  body: form,
}).then((response) => response.json());
// GET job.status_url until status is "done".

Job webhooks

Register an endpoint through API v1 to receive job_completed and job_failed events. Deliveries contain job and asset references—not image bytes—and are signed with HMAC-SHA256 in X-OpusImg-Signature. Failed deliveries are retried three times with exponential backoff.

View webhook management endpoints in OpenAPI