capabilities.work

Blob Upload and Image-to-Image Generation

A 4-step recipe with Civitai. We can help you get access.

Recipe · 4 steps

Blob Upload and Image-to-Image Generation

with Civitai · Artificial Intelligence Management

Upload a blob, submit an img2img workflow, poll, and read the output.

  1. Upload the source image as a blob with moderation and capture its blob id.
  2. Submit an imageGen step that references the uploaded blob as an input image and capture the new workflow id.
  3. Poll the workflow until it reaches a terminal state, looping while still processing and continuing to read the output on success.
  4. Read the completed workflow and collect the transformed output blob URL.
What you'll need to have ready
  • apiKey: Civitai personal API token used as a Bearer credential.
  • file: The binary source image to upload as a blob for img2img.
  • engine: Generation engine identifier (e.g. flux2, sdxl).
  • prompt: The positive prompt steering the image-to-image transformation.
  • moderate: Whether to run NSFW moderation on the uploaded blob.
For your developer

Arazzo workflow civitai:blob-upload-img2img, 4 operations: uploadBlob → submitWorkflow → getWorkflow → getWorkflow. Specs on APIs.io.