Adobe Creative Suite · Arazzo Workflow

Adobe Firefly Text-to-Image Generation

Version 1.0.0

Submit a text-to-image Firefly job, poll until it finishes, and return the generated image URLs.

1 workflow 1 source API 1 provider
View Spec View on GitHub CreativeDesignGraphicsPhotographyVideoArazzoWorkflows

Provider

adobe-creative-suite

Workflows

firefly-text-to-image
Generate images from a text prompt and poll the async job to completion.
Submits a text-to-image generation request to Adobe Firefly, polls the job status until it succeeds or fails, and returns the generated output image URLs on success.
4 steps inputs: contentClass, height, negativePrompt, numVariations, prompt, width outputs: errors, firstImageUrl, jobId, outputs
1
submitGeneration
generateImagesAsync
Submit the text-to-image generation request. The API accepts the job and returns a job id used for polling.
2
pollStatus
getGenerationStatus
Poll the generation job status. Repeats until the job leaves the pending or running state, then branches on success or failure.
3
reportSuccess
getGenerationStatus
Surface the generated output images from the succeeded job.
4
reportFailure
getGenerationStatus
Surface the error details from the failed generation job.

Source API Descriptions

Arazzo Workflow Specification

adobe-creative-suite-firefly-text-to-image-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Adobe Firefly Text-to-Image Generation
  summary: Submit a text-to-image Firefly job, poll until it finishes, and return the generated image URLs.
  description: >-
    Generates images from a natural-language prompt using the asynchronous Adobe
    Firefly generative model. The workflow submits the generation request, takes
    the returned job id, polls the status endpoint until the job reaches a
    terminal state, and then branches on the result: when the job succeeds it
    surfaces the temporary signed URLs of the generated outputs, and when it
    fails it surfaces the error details. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: fireflyApi
  url: ../openapi/adobe-creative-suite-firefly-openapi.yml
  type: openapi
workflows:
- workflowId: firefly-text-to-image
  summary: Generate images from a text prompt and poll the async job to completion.
  description: >-
    Submits a text-to-image generation request to Adobe Firefly, polls the job
    status until it succeeds or fails, and returns the generated output image
    URLs on success.
  inputs:
    type: object
    required:
    - prompt
    properties:
      prompt:
        type: string
        description: Text description of the image to generate.
      negativePrompt:
        type: string
        description: Text description of elements to avoid in the generated image.
      contentClass:
        type: string
        description: Broad content category to guide generation (photo or art).
      numVariations:
        type: integer
        description: Number of image variations to generate (1 to 4).
      width:
        type: integer
        description: Output image width in pixels.
      height:
        type: integer
        description: Output image height in pixels.
  steps:
  - stepId: submitGeneration
    description: >-
      Submit the text-to-image generation request. The API accepts the job and
      returns a job id used for polling.
    operationId: generateImagesAsync
    requestBody:
      contentType: application/json
      payload:
        prompt: $inputs.prompt
        negativePrompt: $inputs.negativePrompt
        contentClass: $inputs.contentClass
        numVariations: $inputs.numVariations
        size:
          width: $inputs.width
          height: $inputs.height
    successCriteria:
    - condition: $statusCode == 202
    outputs:
      jobId: $response.body#/jobId
  - stepId: pollStatus
    description: >-
      Poll the generation job status. Repeats until the job leaves the pending
      or running state, then branches on success or failure.
    operationId: getGenerationStatus
    parameters:
    - name: jobId
      in: path
      value: $steps.submitGeneration.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
      outputs: $response.body#/outputs
      errors: $response.body#/errors
    onSuccess:
    - name: jobSucceeded
      type: goto
      stepId: reportSuccess
      criteria:
      - context: $response.body
        condition: $.status == "succeeded"
        type: jsonpath
    - name: jobFailed
      type: goto
      stepId: reportFailure
      criteria:
      - context: $response.body
        condition: $.status == "failed"
        type: jsonpath
    - name: stillRunning
      type: retry
      stepId: pollStatus
      retryAfter: 5
      retryLimit: 30
      criteria:
      - context: $response.body
        condition: $.status == "pending" || $.status == "running"
        type: jsonpath
  - stepId: reportSuccess
    description: Surface the generated output images from the succeeded job.
    operationId: getGenerationStatus
    parameters:
    - name: jobId
      in: path
      value: $steps.submitGeneration.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.status == "succeeded"
      type: jsonpath
    outputs:
      firstImageUrl: $response.body#/outputs/0/image/url
      outputs: $response.body#/outputs
    onSuccess:
    - name: done
      type: end
  - stepId: reportFailure
    description: Surface the error details from the failed generation job.
    operationId: getGenerationStatus
    parameters:
    - name: jobId
      in: path
      value: $steps.submitGeneration.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      errors: $response.body#/errors
  outputs:
    jobId: $steps.submitGeneration.outputs.jobId
    firstImageUrl: $steps.reportSuccess.outputs.firstImageUrl
    outputs: $steps.reportSuccess.outputs.outputs
    errors: $steps.reportFailure.outputs.errors