Adobe Firefly Services: what a frontend engineer can contribute

Abstract

Adobe's Firefly Services runs generative image work as asynchronous jobs behind an API. This paper follows one batch job through the interface a frontend engineer would build, with the state model, the review step and the credential boundary, and marks what the public docs do not settle.

Generative image work in creative software is asynchronous and expensive, which makes the interface a cost decision as much as a design one. This paper uses Adobe’s Firefly Services as a case. It describes what the public material says, follows one batch job through the screens a frontend engineer would build, and marks the points the documentation leaves open. The sources are cited inline; the engineering judgements are mine.

What the platform provides

Adobe launched Firefly Services in March 2024 with more than twenty APIs, covering features such as Generative Fill and background removal (TechCrunch, March 2024). The developer overview now lists families including the Firefly API, a Creative Production API for running published workflows in batch with per-asset results, and separate APIs for Photoshop, Lightroom, Express, Audio and Video, InDesign, Substance 3D, Illustrator and Content Tagging (Firefly Services docs). That page carries no date and says nothing about authentication, SDK setup or pricing.

The JavaScript SDK’s package readme describes the target as “Node.js and web environments” and lists the FireflyClient methods generateImages, expandImage, fillImage and upload (@adobe/firefly-apis readme). The readme itself has no runnable example and defers setup to a separate page, which I did not read in full.

A batch job has more than two states

A user who submits 120 images does not experience “running” and “done”. They experience a queue, a partial result with some images failed, and sometimes a complete failure. An interface that collapses these into two states will mislead people. The model below uses a discriminated union, so the compiler reports any state that a view forgets to handle.

type JobState =
  | { status: 'queued'; submittedAt: number }
  | { status: 'running'; submittedAt: number; done: number; total: number }
  | { status: 'partial'; done: number; total: number; failed: string[] }
  | { status: 'complete'; outputs: string[] }
  | { status: 'failed'; reason: string };

export function label(s: JobState): string {
  switch (s.status) {
    case 'queued': return 'Waiting to start';
    case 'running': return `Processing ${s.done} of ${s.total}`;
    case 'partial': return `${s.done} of ${s.total} done, ${s.failed.length} need review`;
    case 'complete': return `Ready: ${s.outputs.length} files`;
    case 'failed': return `Failed: ${s.reason}`;
    default: { const x: never = s; return x; }
  }
}

Running this against a few states gives the text a user would see:

Waiting to start
Processing 40 of 120
115 of 120 done, 5 need review
Ready: 2 files
Failed: quota exceeded

The partial state is the one that matters most. Consider a batch of 120 where 115 succeed. If the interface says “Complete”, someone downloads the folder, assumes it is whole, and finds five missing images on Friday. Showing 115 of 120 done, 5 need review with a button to list the five keeps the user in control. The example numbers are illustrative; the point is the branch, not the count.

The review step

Generated images need a person to look at them before anything ships. The review screen is where that happens, and it has a few parts that are cheap to build and expensive to omit:

Element Why it is there Example
Original and result side by side The reviewer needs a reference Source photo left, generated fill right
Approve, reject, regenerate Three outcomes, each with a different cost Regenerate costs a new job
Reason codes on reject Turns opinions into counts you can act on brand, artefact, text, licence
Keyboard shortcuts Batch review is repetitive Left and right to move, A and R to decide

Reason codes are the cheapest of these and the most useful later. If 40 percent of rejections are text, the prompt or the workflow has a fixable problem. Without codes, the same information lives in people’s heads.

The credential boundary

A browser bundle is readable by anyone who opens the developer tools. Anything in it, including an API secret, is public. The usual design keeps the secret on a server and lets the interface ask that server for a short list of operations.

The check that the server runs can be small. This is the shape, tested in isolation with the list of operations an interface might need:

const ALLOWED = new Set(['generateImage', 'expandImage', 'fillImage']);

export function checkOperation(op: string): { ok: true } | { ok: false; error: string } {
  return ALLOWED.has(op) ? { ok: true } : { ok: false, error: `operation not allowed: ${op}` };
}
{ ok: true }
{ ok: false, error: 'operation not allowed: deleteAllAssets' }

The check belongs on the server. A check in the browser only shapes the interface; anyone can send a request without it. The allowlist also documents what the product is allowed to do, which is useful when someone asks why a new capability needs review.

What the public material leaves open

I could not confirm from the sources which authentication flow Firefly Services requires for browser-facing applications, whether the SDK’s web build avoids server-only dependencies, what rate limits apply, or what a batch costs. Each of these changes the design. The first two decide whether the backend described above is optional or required, and the cost question decides how many retries a job can afford. Verify them in Adobe’s current documentation, and test one real call from a sandbox before building the interface around it.

Conclusion

On a platform like this, the frontend decides whether people can see what happened to their work, whether they can check it before it ships, and whether the secret stays off the page. The three pieces to build first are the job state model with an explicit partial state, a review screen with reason codes, and a server-side operation allowlist. None depends on knowing Adobe’s internal roadmap, and all three are small enough to ship in a sprint.