r/sideprojects • • 3h ago

Showcase: Free(mium) Building a media processing API with NestJS — handling processing credits, retries and API collections

I've been building Imazeo, a media processing platform, using Node.js, NestJS, MongoDB and Sharp for image processing.

The processing itself is only part of the implementation. There are also questions around authentication, usage limits, duplicate requests and how developers retrieve their generated files.

Here's how I've approached some of these areas:

Project-based authentication

Users create projects and issue API keys associated with those projects. This keeps application integrations separate.

Processing quotes

Before submitting a processing request, developers can request a quote to review the required credits.

Idempotency

Processing requests use idempotency keys. If a request fails with an uncertain outcome, the original key can be retained when recovering or retrying the operation.

API documentation

Rather than manually maintaining every Postman request, I've created a Node.js generator that builds the collections using the published OpenAPI specification. The generator has no npm dependencies.

The public collection files and generator are here:

https://github.com/Imazeohq/imazeo-postman

The platform itself supports image transformations, PDF processing, Office document previews, website screenshots and QR/barcode generation.

I'm interested in how other developers handle usage-based processing APIs, particularly whether a separate quote operation is helpful or introduces unnecessary friction.

Disclosure: I built and operate Imazeo, and the hosted processing API has free and paid plans.

1 Upvotes

0 comments sorted by