Understanding Firefly API Seeds
Use seeds to generate similar AI images across multiple API requests. Learn about seeds and how they're used with Firefly AI.
![]() Original Image | ![]() Same Seed Variation | ![]() Different Seed Variation |
About seeds
Whenever Firefly AI generates an image it begins that process by picking a random number called a "seed". In the context of AI, the seed is a starting value or series of values for a random number generator (RNG) to help vary the generated results.
Computer programs are completely deterministic, so they can't create true randomness. A random seed facilitates pseudorandomness with AI so that generated images are different even when other parameters remain the same. Using the same seed, prompt, and other presets, would generate the same image every time.
When Firefly generates an image that you want to preserve and modify more precisely using Firefly's other image options (such as style presets, reference images, etc.), you'll use that image's seed to limit the variations and hone in on the image you want.
Concepts in action
Prerequisites
You'll need a Firefly Client ID and Access Token for this exercise. Learn how to retrieve them in the Authentication Guide. Securely store these credentials and never expose them in client-side or public code.
Find the seed
- First, open a secure terminal and
export
your Client ID and Access Token as environment variables:
Copied to your clipboardexport FIREFLY_SERVICES_CLIENT_ID=yourClientIdAsdf123export FIREFLY_SERVICES_ACCESS_TOKEN=yourAccessTokenAsdf123
- Run the following command to generate an AI image of a futuristic city with a unique seed:
Copied to your clipboardcurl --location 'https://firefly-api.adobe.io/v3/images/generate-async' \--header 'Content-Type: application/json' \--header 'Accept: application/json' \--header "x-api-key: $FIREFLY_SERVICES_CLIENT_ID" \--header "Authorization: Bearer $FIREFLY_SERVICES_ACCESS_TOKEN" \--data '{"prompt": "a futuristic future cityscape with flying cars"}'
The request returns a rapid response for the async job:
Copied to your clipboard{"jobId":"<YOUR_JOB_ID>","statusUrl":"https://firefly-epo854211.adobe.io/v3/status/urn:ff:jobs:...","cancelUrl":"https://firefly-epo854211.adobe.io/v3/cancel/urn:ff:jobs:..."}
- Use the
jobId
to check the status of the job:
Copied to your clipboardcurl -X GET "https://firefly-api.adobe.io/v3/status/<YOUR_JOB_ID>" \-H "x-api-key: $FIREFLY_SERVICES_CLIENT_ID" \-H "Authorization: Bearer $FIREFLY_SERVICES_ACCESS_TOKEN" \-H "Content-Type: application/json"
After Firefly successfully generates the image, the JSON response for the final status will contain the image seed in outputs
, along with other details.
Below is an example of our sample image response and the image it generated:
Copied to your clipboard{"status": "succeeded","jobId": "urn:ff:jobs:epo854211:783e1c22-5a15-4a01-ab2b-32966a06ce6c","result": {"size": {"width": 2048,"height": 2048},"outputs": [{"seed": 1842533538, // Here is the seed for our generated image"image": {"url": "https://pre-signed-firefly-prod.s3-accelerate.amazonaws.com/images/asdf-1234..."}}],"contentClass": "art"}}
Generate a seed image
Use Firefly's other image generation options (like style presets or size) while keeping the results consistent with the original generated image. Generate similar cityscapes by using its seed:
1842533538
![]() Original Image | ![]() Same Seed Image with Preset Variation |
- Use the command below to generate an image variation of our cityscape. This variation has "landscape photography" and "science fiction" style presets applied to it. Or include other options to experiment with new results.
Copied to your clipboardcurl --location 'https://firefly-api.adobe.io/v3/images/generate-async' \--header 'Content-Type: application/json' \--header 'Accept: application/json' \--header "x-api-key: $FIREFLY_SERVICES_CLIENT_ID" \--header "Authorization: Bearer $FIREFLY_SERVICES_ACCESS_TOKEN" \--data '{"prompt": "a futuristic future cityscape with flying cars","seeds": [1842533538],"style": {"presets": ["landscape_photography", "science_fiction"]}}'
The request returns a rapid response for the async job:
Copied to your clipboard{"jobId":"<YOUR_JOB_ID>","statusUrl":"https://firefly-epo854211.adobe.io/v3/status/urn:ff:jobs:...","cancelUrl":"https://firefly-epo854211.adobe.io/v3/cancel/urn:ff:jobs:..."}
- Use the
jobId
to see the result:
Copied to your clipboardcurl -X GET "https://firefly-api.adobe.io/v3/status/<YOUR_JOB_ID>" \-H "x-api-key: $FIREFLY_SERVICES_CLIENT_ID" \-H "Authorization: Bearer $FIREFLY_SERVICES_ACCESS_TOKEN" \-H "Content-Type: application/json"
The differences are obvious, but you'll also notice the similarities. Those characteristics come from the seed.