Skip to navigation

Media · Image · Scribble to image (ControlNet)

View as Markdown

Turn a rough sketch/scribble into a finished image via Stable Diffusion ControlNet, steered by prompt (and negative_prompt). Pass the scribble as image_url or base64 image. Generates a NEW image from line art; to edit an existing photo use magicInpaint / generativeFill. Async — returns a task_id (auto-polled).

Authentication

AuthorizationApi-Key

Header authentication of the form Api-Key <token>

OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
promptstringRequired
Text description of the desired output image.
negative_promptstringRequired
What to avoid in the generated image.
image_urlstringOptional

URL of the scribble/sketch input image.

imagestringOptional

Base64-encoded scribble image (alternative to image_url).

image_resolutionintegerOptional
Output resolution in pixels.
stepsintegerOptional

Diffusion steps (higher = better quality, slower).

guidance_scaledoubleOptional
How closely to follow the prompt.
countsintegerOptionalDefaults to 4
Number of variations to generate.

Response

Async task queued.
task_idstringOptional

Poll GET /api/v1/tasks/{task_id} until SUCCESS or FAILURE.