Skip to content

SD1 image generation

SD1 is Stable Diffusion 1.x — the original open-weights family. Mature ecosystem, huge model catalog, native resolution 512×512, prompt style is Booru-like tag-soup plus quality boosters (masterpiece, best quality, …). Two invocation paths on the orchestrator:

engineBest forNotes
sdcpp (ecosystem sd1)Default — Stable Diffusion C++ on Civitai workerssampleMethod + schedule sdcpp enums, textual-inversion embeddings, uCache mode.
comfy (ecosystem sd1)When you specifically need ComfyUI sampler/scheduler enums or a Comfy-only featuresampler + scheduler Comfy enums, denoiseStrength (vs sdcpp's strength) on variants.

Default choice for new integrations: engine: "sdcpp", ecosystem: "sd1". Reach for comfy only when you specifically need a ComfyUI-exclusive sampler.

Both engines support createImage and createVariant (img2img). Neither supports editImage — use Flux 1 Kontext or Flux 2 Klein if you need prompt-driven editing.

Prerequisites

sdcpp (default path)

Text-to-image

http
POST https://orchestration.civitai.com/v2/consumer/workflows?wait=60
Authorization: Bearer <your-token>
Content-Type: application/json

{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "sdcpp",
      "ecosystem": "sd1",
      "operation": "createImage",
      "model": "urn:air:sd1:checkpoint:civitai:4384@128713",
      "prompt": "masterpiece, best quality, 1girl, solo, portrait, looking at viewer, cinematic lighting",
      "negativePrompt": "worst quality, low quality, blurry, bad anatomy",
      "width": 512,
      "height": 512,
      "cfgScale": 7,
      "steps": 20,
      "clipSkip": -1
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Common sdcpp-sd1 parameters:

FieldDefaultRangeNotes
model— ✅AIR URNSD1 checkpoint. See the catalog.
prompt— ✅≤ 10 000 charsBooru-style tags work best. Lead with quality tags (masterpiece, best quality, …).
negativePrompt(none)≤ 10 000 charsStrongly recommended on SD1 — worst quality, low quality, blurry, bad anatomy, bad hands is a solid starting point.
width / height512642048, divisible by 16SD1's native resolution is 512×512. Aspect-ratio variants like 512×768 or 768×512 work; going much bigger often produces duplicated subjects.
cfgScale703068 is the sweet spot for SD1.
steps2011502030 typical; 30+ rarely helps.
sampleMethodeulerenumSdCppSampleMethod.
schedulediscreteenumSdCppSchedule.
clipSkip-1int-1 = model default. 2 is a common hand-tuned value on many SD1 checkpoints — try it if output feels stiff.
vaeModel(checkpoint VAE)AIR URNOverride baked-in VAE. Rarely needed.
loras{}{ airUrn: strength }Stack multiple; 0.61.0 strengths typical.
embeddings[]array of AIR URNsTextual inversions. Reference them in the prompt / negative prompt by their embedding name.
quantity1112Number of images per call.
seedrandomint64Pin for reproducibility.
uCache(default)enumSdCppUCacheMode. Caching strategy; leave default unless you know you want otherwise.

With LoRAs

LoRAs are a map of AIR URN → strength. Style LoRAs usually want 0.61.0; character / concept LoRAs often sit higher.

json
{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "sdcpp",
      "ecosystem": "sd1",
      "operation": "createImage",
      "model": "urn:air:sd1:checkpoint:civitai:4384@128713",
      "prompt": "masterpiece, best quality, cyberpunk street at night, neon signs",
      "negativePrompt": "worst quality, low quality, blurry",
      "width": 512,
      "height": 768,
      "cfgScale": 7,
      "steps": 25,
      "loras": {
        "urn:air:sd1:lora:civitai:123456@789012": 0.8
      }
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Image-to-image (createVariant)

Pass a source image + a new prompt; the model re-imagines it. strength controls how much of the source to preserve — 0.0 returns the source unchanged, 1.0 discards it entirely. 0.60.8 is the sweet spot.

json
{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "sdcpp",
      "ecosystem": "sd1",
      "operation": "createVariant",
      "model": "urn:air:sd1:checkpoint:civitai:4384@128713",
      "prompt": "masterpiece, best quality, daytime with clear blue sky",
      "negativePrompt": "worst quality, low quality",
      "width": 512,
      "height": 512,
      "cfgScale": 7,
      "steps": 20,
      "image": "https://image.civitai.com/.../source.jpeg",
      "strength": 0.7
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Note image is a plain string URL (not a { url: ... } wrapper), and the field is strength (not denoiseStrength like on Comfy).

Comfy (alternative path)

Use engine: "comfy" when you specifically need a ComfyUI sampler/scheduler enum that sdcpp doesn't expose.

json
{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "comfy",
      "ecosystem": "sd1",
      "operation": "createImage",
      "model": "urn:air:sd1:checkpoint:civitai:4384@128713",
      "prompt": "masterpiece, best quality, 1girl, solo, portrait, looking at viewer",
      "negativePrompt": "worst quality, low quality, blurry, bad hands",
      "width": 512,
      "height": 512,
      "steps": 30,
      "cfgScale": 7,
      "sampler": "euler_ancestral",
      "scheduler": "normal",
      "clipSkip": 2
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Key differences from sdcpp:

Fieldsdcppcomfy
SamplersampleMethod (SdCppSampleMethod)sampler (ComfySampler)
Scheduleschedule (SdCppSchedule)scheduler (ComfyScheduler)
Img2img strengthstrength (default 0.7)denoiseStrength (default 0.75)
Default steps2030
Default clipSkip-1 (model default)2
embeddings array
uCache

Comfy also supports createVariant with image (plain string URL) + denoiseStrength; see the ComfySd1VariantImageGenInput schema.

Reading the result

Both engines emit the standard imageGen output — an images[] array, one entry per quantity:

json
{
  "status": "succeeded",
  "steps": [{
    "name": "0",
    "$type": "imageGen",
    "status": "succeeded",
    "output": {
      "images": [
        { "id": "blob_...", "url": "https://.../signed.jpeg" }
      ]
    }
  }]
}

Blob URLs are signed and expire — refetch the workflow or call GetBlob for a fresh URL.

Runtime

SD1 at 512×512 is one of the fastest image-gen paths available — typical wall time 3–10 s per image (sdcpp) or 5–15 s (comfy, slightly heavier). wait=60 works comfortably for quantity ≤ 4. Going beyond 768px on either axis compounds runtime quadratically; submit with wait=0 and poll for large batches or dimensions.

Cost

Billed in Buzz on the workflow's transactions. Use whatif=true for an exact preview; see Payments (Buzz) for currency selection.

Both engines use the same per-pixel / per-step shape — different reference values:

total = base × (width × height / referencePixels) × (steps / referenceSteps) × quantity
PathbasereferencePixelsreferenceStepsDefaults → Buzz
sdcpp + sd14512²20512²/steps: 20/q: 1~4 Buzz
comfy + sd14512²30512²/steps: 30/q: 1~4 Buzz

Examples:

  • 512² at quantity: 4 → ~16 Buzz
  • 768×512 at steps: 25 → ~4 × 1.5 × 1.25 = ~7.5 Buzz (sdcpp)
  • 512² at steps: 40~8 Buzz (sdcpp)

SD1 is the cheapest per-image option Civitai exposes — native 512² defaults keep the formula at 1.0 on each axis.

Troubleshooting

SymptomLikely causeFix
400 with "model must match AIR pattern"Passed a bare model ID or version slugUse a full AIR URN: urn:air:sd1:checkpoint:civitai:<modelId>@<versionId>.
400 with unknown propertyField not valid for this engine (e.g. sampler on sdcpp, sampleMethod on comfy, denoiseStrength on sdcpp)Match the schema for your chosen engine — see the difference table above.
Output has duplicated subjects / Frankenstein anatomyDimensions too far from SD1's native 512×512Generate at 512 / 768 max; upscale with imageUpscaler if you need more resolution.
Output looks flat / low-contrast on SD1clipSkip at model default where the checkpoint expects 2Try clipSkip: 2 — the convention for many SD1 community checkpoints.
Prompts feel ignored on SD1Missing quality boosters, or cfgScale too lowLead the prompt with masterpiece, best quality, … tags; bump cfgScale toward 8.
LoRA has no visible effectWrong AIR URN, model private / not published, or ecosystem mismatchVerify the URN on the LoRA's Civitai page; only SD1-tagged LoRAs work on the sd1 ecosystem.
Request timed out (wait expired)Large quantity, non-native dimensionsResubmit with wait=0 and poll.
Step failed, reason = "blocked"Prompt hit content moderationDon't retry the same input — see Errors & retries → Step-level failures.
  • SubmitWorkflow — operation used by every example here
  • GetWorkflow — for polling
  • SDXL image generation — higher-resolution successor to SD1
  • Flux 2 / Flux 1 image generation — newer open-weights families with stronger prompt adherence
  • Image upscaling — chain after imageGen for higher-res output
  • Prompt enhancement — LLM-rewrite a prompt before feeding it in via $ref (use ecosystem: "sd1" on the enhancer)
  • Full parameter catalog: the Sd1CreateImageGenInput / Sd1VariantImageGenInput / ComfySd1CreateImageGenInput / ComfySd1VariantImageGenInput schemas in the API reference
  • imageGen endpoint OpenAPI spec — standalone OpenAPI 3.1 YAML covering the full imageGen surface; import into Postman / OpenAPI Generator

Civitai Developer Documentation