Presigned Blob Upload Then Generate
A 3-step recipe with Civitai. We can help you get access.
Recipe · 3 steps
Presigned Blob Upload Then Generate
with Civitai · Artificial Intelligence Management
Get a presigned upload URL, submit a workflow referencing it, and poll.
- Request a presigned upload URL for the declared mime type and capture the blob id the upload will populate.
- Submit an imageGen workflow that references the presigned blob id as an input image and configures webhook callbacks for completion events.
- Poll the workflow until it reaches a terminal state, looping while still processing.
What you'll need to have ready
- apiKey: Civitai personal API token used as a Bearer credential.
- mimeType: MIME type of the blob that will be uploaded to the presigned URL.
- sizeBytes: Optional declared size of the blob in bytes.
- engine: Generation engine identifier (e.g. flux2, sdxl).
- prompt: The positive prompt steering the generation.
- callbackUrl: HTTPS callback URL for webhook delivery of workflow events.
For your developer
Arazzo workflow civitai:presigned-blob-generate, 3 operations: getBlobUploadUrl → submitWorkflow → getWorkflow. Specs on APIs.io.