Migrating to the Image5 Model

Understand how API implementations have changed using Image5.

Overview

The new Generate Image API using the Image5 model introduces significant changes from the other Firefly Image APIs.

The old and new schemas are not compatible, and migration requires rewriting the request payload. This guide will help you understand the changes and how to migrate your existing implementation.

Breaking schema changes

This API update constitutes a major version upgrade with non-backwards-compatible changes. A structured migration is required for all clients.

Payloads and schemas in the new API include significant changes. These are breaking changes. Payloads that do not conform to the new schema will be rejected by the API.

New control fields

The new API introduces several new configuration properties which may now be required depending on the model:

Removed fields

The new Image5 model API eliminates the following previously accepted fields:

These have no direct replacements and should not be included in the request payloads to the API.

Repurposed fields

These fields have been renamed and repurposed:

Outdated field
New field
Details
N
numVariations
Now produces variations instead of raw N images.
modelId
customModelId
New semantics; not a direct mapping.

Migration recommendations

These recommendations provide mapping and guidance for converting requests to the older APIs to the new API format for Image5.

Model selection

⚠️ Important: This is not simply a rename. The new API does not expose explicit model versioning. Model selection is now at a higher level, in the header.

Old Format (previous model)

"modelId": "firefly_image",
  "modelVersion": "image5"

New Format (Image5 model)

"contentClass": "photo",
"customModelId": "string"

Number of images

Use the new format for the number of images.

Old Format (previous model)

"n": 1

New Format (Image5 model)

"numVariations": 1

Prompts

The new fields are optional, but powerful.

Old Format (previous model)

"prompt": "string"

New Format (Image5 model)

"prompt": "string",
"negativePrompt": "string",
"promptBiasingLocaleCode": "string"