arazzo: 1.0.1 info: title: Adobe Firefly Generative Fill summary: Fill a masked region of an image with AI-generated content and poll the job to completion. description: >- Runs an Adobe Firefly generative fill operation. A source image and a mask image define the region to be replaced, and a text prompt guides the content generated into the masked area. The workflow submits the asynchronous fill job, polls the status endpoint until the job reaches a terminal state, and branches on the result to return either the filled output image URLs or 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-generative-fill summary: Submit a generative fill job and poll until it succeeds or fails. description: >- Submits a generative fill request using a source image, a mask, and a prompt, polls the job status to completion, and returns the filled output image URLs on success. inputs: type: object required: - imageUrl - maskUrl properties: imageUrl: type: string description: Publicly accessible URL of the source image to fill. maskUrl: type: string description: Publicly accessible URL of the mask image defining the fill region. prompt: type: string description: Text prompt describing what to fill in the masked area. negativePrompt: type: string description: Text describing what to avoid in the filled area. numVariations: type: integer description: Number of variations to generate (1 to 4). steps: - stepId: submitFill description: >- Submit the generative fill request referencing the source image and mask by URL. The API queues the job and returns a job id. operationId: fillImageAsync requestBody: contentType: application/json payload: prompt: $inputs.prompt negativePrompt: $inputs.negativePrompt image: source: url: $inputs.imageUrl mask: source: url: $inputs.maskUrl numVariations: $inputs.numVariations successCriteria: - condition: $statusCode == 202 outputs: jobId: $response.body#/jobId - stepId: pollStatus description: >- Poll the fill job status, repeating while it is pending or running and branching once it succeeds or fails. operationId: getGenerationStatus parameters: - name: jobId in: path value: $steps.submitFill.outputs.jobId successCriteria: - condition: $statusCode == 200 outputs: status: $response.body#/status 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 filled output image URLs from the succeeded job. operationId: getGenerationStatus parameters: - name: jobId in: path value: $steps.submitFill.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 fill job. operationId: getGenerationStatus parameters: - name: jobId in: path value: $steps.submitFill.outputs.jobId successCriteria: - condition: $statusCode == 200 outputs: errors: $response.body#/errors outputs: jobId: $steps.submitFill.outputs.jobId firstImageUrl: $steps.reportSuccess.outputs.firstImageUrl outputs: $steps.reportSuccess.outputs.outputs errors: $steps.reportFailure.outputs.errors