ApiframeApiframe Docs
Image GenerationStable Diffusion

Stable Diffusion 3.5 Large

Stability AI's highest-quality SD 3.5 model for detailed, photorealistic images.

POST /v2/images/generatemodel: "stable-diffusion-3.5-large"

The largest and highest-quality Stable Diffusion 3.5 model. An 8-billion-parameter MMDiT model with excellent prompt adherence, typography, and image quality. Supports image-to-image via the image parameter.

See Image Generation overview for common request fields, response format, and error codes.

Model-specific parameters

ParameterTypeDescription
stableDiffusionParams.aspect_ratiostringOutput aspect ratio. Values: "1:1", "16:9", "21:9", "3:2", "2:3", "4:5", "5:4", "9:16", "9:21". Ignored when image is set
stableDiffusionParams.cfgnumberGuidance scale (0–20). How strictly to follow the prompt. Default 3.5
stableDiffusionParams.stepsintegerNumber of sampling steps (1–40). Default 28
stableDiffusionParams.seedintegerRandom seed for reproducible generation
stableDiffusionParams.negative_promptstringWhat you do NOT want to see in the image
stableDiffusionParams.imagestringInput image URL for image-to-image mode. Output aspect ratio matches this image
stableDiffusionParams.prompt_strengthnumberDenoising strength for image-to-image (0–1). 1.0 fully replaces the input image. Default 0.85
stableDiffusionParams.output_formatstringOutput image format. Values: "webp", "jpg", "png". Default "webp"
stableDiffusionParams.output_qualityintegerOutput quality for lossy formats (0–100). Default 90

Credit cost

Credits per generation
12

Example result

Once the job is COMPLETED, the result object on GET /v2/jobs/:id looks like:

{
  "images": [
    "https://cdn2.apiframe.ai/images/a1b2c3d4-e5f6-7890-abcd-ef1234567890-1.png"
  ]
}

See Result format for field details.

Code examples

curl -X POST https://api.apiframe.ai/v2/images/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A photorealistic portrait of an astronaut in a field of wildflowers",
    "model": "stable-diffusion-3.5-large",
    "stableDiffusionParams": {
      "aspect_ratio": "1:1",
      "cfg": 3.5,
      "steps": 28
    }
  }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/images/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "A photorealistic portrait of an astronaut in a field of wildflowers",
        "model": "stable-diffusion-3.5-large",
        "stableDiffusionParams": {
            "aspect_ratio": "1:1",
            "cfg": 3.5,
            "steps": 28,
        },
    },
)
print(response.json())
const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "A photorealistic portrait of an astronaut in a field of wildflowers",
    model: "stable-diffusion-3.5-large",
    stableDiffusionParams: { aspect_ratio: "1:1", cfg: 3.5, steps: 28 },
  }),
});
console.log(await response.json());

Try it

POST/v2/images/generateTry it

On this page