stable-diffusion (dalle format)
Overview
- Method:
POST
- Method:
- Path:
/v1/images/generations
- Path:
- Content-Type:
application/json
- Content-Type:
Authentication
Authorization: Bearer sk-xxxx(required)
Request Example
Header
| Header | Example | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Authorization | Bearer sk-xxxx | Yes |
Request Body (JSON)
json
{
"model": "stable-diffusion-3.5-large-turbo",
"prompt": "A detailed illustration of a vast Stone Age city...",
"size": "1024x1024",
"num_inference_steps": 5,
"guidance_scale": 2
}Parameter Description
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | - | Optional: stable-diffusion-3.5-large-turbo, stable-diffusion-3-medium, stable-diffusion-v1-4, stable-diffusion-xl-base-1.0 |
| prompt | string | Yes | - | Prompt |
| size | string | No | - | Image size |
| num_inference_steps | number | No | - | Number of inference steps 0-30 |
| guidance_scale | number | No | - | Guidance scale 0-7 |
| negative_prompt | string | No | - | Negative prompt |
Response Example (200)
json
{
"data": [
{"b64_json": "/9j/4AAQSkZJRgABAQ..."}
],
"created": 1738749745824
}