Strong typography
The MMDiT architecture renders legible text and follows complex prompts reliably.
Stable Diffusion 3 Medium, a 2-billion-parameter Multimodal Diffusion Transformer from Stability AI known for photorealism, typography, and prompt understanding.
Integrate Stable Diffusion 3 with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.
model: "stable-diffusion-3" The MMDiT architecture renders legible text and follows complex prompts reliably.
Generate from a prompt or refine an image with prompt_strength control.
Just 7 credits per image with full control over cfg, steps, and output format.
A few outputs generated through the Stable Diffusion 3 API on Apiframe.
A cinematic portrait of an astronaut in a neon-lit alley, 85mm, shallow depth of field
Cozy isometric coffee shop, warm morning light, highly detailed 3D render
A majestic snow leopard on a misty mountain ridge at golden hour
Send a single POST /v2/images/generate request with your API key to
generate with Stable Diffusion 3. The call returns a jobId you can poll or
receive via webhook.
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 sleek silver sports car on a coastal highway at sunset, hyper-realistic",
"model": "stable-diffusion-3",
"stableDiffusionParams": {
"image": "https://example.com/input.jpg",
"prompt_strength": 0.85,
"negative_prompt": "What you do NOT want to see…",
"cfg": 3.5
}
}'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 sleek silver sports car on a coastal highway at sunset, hyper-realistic",
"model": "stable-diffusion-3",
"stableDiffusionParams": {
"image": "https://example.com/input.jpg",
"prompt_strength": 0.85,
"negative_prompt": "What you do NOT want to see…",
"cfg": 3.5
}
},
)
print(response.json()) # { "jobId": "...", "status": "QUEUED" }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 sleek silver sports car on a coastal highway at sunset, hyper-realistic",
"model": "stable-diffusion-3",
"stableDiffusionParams": {
"image": "https://example.com/input.jpg",
"prompt_strength": 0.85,
"negative_prompt": "What you do NOT want to see…",
"cfg": 3.5
}
}),
});
const { jobId } = await response.json();
console.log(jobId);Generation is asynchronous. A successful submission returns 202 Accepted with a jobId. Poll GET /v2/jobs/{id} (or supply a webhook_url) until the status is COMPLETED; the result field then holds the output URL(s).
{
"jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"status": "QUEUED"
}curl https://api.apiframe.ai/v2/jobs/JOB_ID \
-H "X-API-Key: afk_your_api_key_here"import requests, time
while True:
job = requests.get(
"https://api.apiframe.ai/v2/jobs/JOB_ID",
headers={"X-API-Key": "afk_your_api_key_here"},
).json()
if job["status"] in ("COMPLETED", "FAILED"):
break
time.sleep(2)
print(job["result"])let job;
do {
await new Promise((r) => setTimeout(r, 2000));
job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
headers: { "X-API-Key": "afk_your_api_key_here" },
}).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);Request parameters accepted by the Stable Diffusion 3 endpoint. Model-specific options are nested under the params object shown below.
| Parameter | Type | Required | Default | Allowed / range | Description |
|---|---|---|---|---|---|
| prompt | string | required | — | — | Text description of what to generate. |
| model | string | required | "stable-diffusion-3" | "stable-diffusion-3" | The model identifier for this endpoint. |
| stableDiffusionParams.image | string (URL) | optional | — | — | Optional image for image-to-image mode. Output matches its aspect ratio. |
| stableDiffusionParams.prompt_strength | number | optional | 0.85 | min 0, max 1, step 0.05 | Denoising strength for image-to-image (0–1). 1.0 ignores the input image. |
| stableDiffusionParams.negative_prompt | string | optional | — | — | Negative prompt |
| stableDiffusionParams.cfg | number | optional | 3.5 | min 0, max 20, step 0.1 | How strictly to follow the prompt. |
| stableDiffusionParams.steps | number | optional | 28 | min 1, max 40, step 1 | Steps |
| stableDiffusionParams.output_format | string | optional | "webp" | "webp", "jpg", "png" | Output format |
| stableDiffusionParams.output_quality | number | optional | 90 | min 0, max 100, step 1 | Output quality |
| stableDiffusionParams.seed | number | optional | — | step 1 | Reuse a number to reproduce the same result. |
Common questions about the Stable Diffusion 3 API.
Stable Diffusion 3 samples up to 28 steps. Higher values are automatically clamped to 28.
Pricing is flat: 7 credits per generated image.
Still have questions?
Get your API key and integrate Stable Diffusion 3 in minutes — Pay-as-you-go.
Questions? Join our Discord or contact sales.