Skip to content

Optimized Latent Consistency (SDv1.5)

Integrate

Model id lcm-sd15-i2i
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/lcm-sd15-i2i?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

This request: ≈$0.007 7 API credits Run it on this page

Get API key
Open model Image Editing Fast #diffusion#lcm#real-time

Few-step image-to-image transform on Stable Diffusion 1.5 using latent consistency, with strength control

Open model · Image

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Describe the image you want generated, using as much detail as possible to get the best results.

•required image_url
Drop a file, or

Base image for processing.

num_images default 1

Size of the returned image list, generated using a shared prompt and negative prompt but a distinct seed for each image.

Advanced negative_prompt · mask · request_id · strength · guidance_scale · num_inference_steps · seed · enable_safety_checks · enable_safety_checker
default

Negative prompt specifying unwanted image details. It can exclude colors, objects, scenery, or finer features and qualities, such as a moustache, blur, or low resolution.

mask_url
Drop a file, or

URL pointing to a mask, provided for generic LCM processing compatibility.

default

Request identifier for correlating a response with the request that produced it.

default 0.8

Image strength setting.

default 1

Prompt-adherence strength for image selection, expressed as CFG (Classifier Free Guidance).

default 4

Image-generation inference step count, with better image quality at larger counts at the expense of longer generation time.

Seed for reproducing images in Stable Diffusion. An image can be reproduced exactly on every run by keeping the model version, prompt, and seed unchanged.

POST /run/lcm-sd15-i2i?wait=20 quote → $0.007
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/lcm-sd15-i2i?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Optimized Latent Consistency (SDv1.5)

Restyles or modifies a base image from a text prompt, using a latent consistency approach that needs only a handful of steps. `num_inference_steps` defaults to 4 and goes up to 12. `strength` (0 to 1) sets how far the result departs from the input, and up to 8 images can be returned per call. An optional `mask_url`, `negative_prompt` and `seed` are accepted.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
promptrequired
Typestring
Describe the image you want generated, using as much detail as possible to get the best results.
image_urlrequired image
Typeurl · image
Base image for processing.
mask_urloptional mask
Typeurl · image
URL pointing to a mask, provided for generic LCM processing compatibility.
strengthoptional
Typenumber
Default0.8
0 – 1
Image strength setting.
negative_promptoptional
Typestring
Default
Negative prompt specifying unwanted image details. It can exclude colors, objects, scenery, or finer features and qualities, such as a moustache, blur, or low resolution.
seedoptional
Typeinteger | null
Seed for reproducing images in Stable Diffusion. An image can be reproduced exactly on every run by keeping the model version, prompt, and seed unchanged.
guidance_scaleoptional
Typenumber
Default1
0 – 16
Prompt-adherence strength for image selection, expressed as CFG (Classifier Free Guidance).
num_inference_stepsoptional
Typeinteger
Default4
1 – 12
Image-generation inference step count, with better image quality at larger counts at the expense of longer generation time.
num_imagesoptional num_outputs
Typeinteger
Default1
1 – 8
Size of the returned image list, generated using a shared prompt and negative prompt but a distinct seed for each image.
enable_safety_checksoptional
Typeboolean
Defaulttrue
Output safety-checking toggle, which only authorized accounts may disable; all unauthorized requests undergo checks regardless. When true, it screens the resulting image for potentially unsafe content and substitutes a black image if any is detected.
request_idoptional
Typestring
Default
Request identifier for correlating a response with the request that produced it.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Screening can be relaxed by setting false, provided the caller is authorized.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "lcm-sd15-i2i",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 7,
    "usd": "0.007",
    "charged": 7,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "width": 1024,
        "height": 768,
        "content_type": "image/jpeg"
      }
    ],
    "timings": {},
    "seed": 42,
    "num_inference_steps": 4,
    "request_id": "",
    "nsfw_content_detected": [
      false
    ]
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
images
array of object {url, width, height, content_type}File information for the generated images.
timings
object
seed
integerImage-generation seed, including the randomly chosen value if the input omitted a seed; otherwise, it repeats the supplied value.
num_inference_steps
integerResolved inference-step count for image generation, taken from the input when supplied and otherwise from the default.
request_id
stringRequest identifier for correlating a response with the request that produced it.
nsfw_content_detected
array of booleanPer-image safety results as a boolean list: each entry indicates potentially unsafe content, or is false when safety checking is disabled.

For AI agents: this page as Markdown is at https://doitong.com/developers/models/lcm-sd15-i2i.md. All models and guides: https://doitong.com/developers/llms.txt