Stable Diffusion XL - Image Text Editor
Edit images using text prompts with Stable Diffusion XL model.
Endpoint
Request Body
The request must include the following parameters:
Parameter | Type | Required | Description |
---|---|---|---|
type | string | Yes | Feature type identifier. Must be IMAGE_EDITOR |
model | string | Yes | AI model identifier. Must be stable-diffusion-xl-1024-v1-0 |
promptObject | object | Yes | Feature-specific parameters |
Prompt Object Parameters
Parameter | Type | Required | Description |
---|---|---|---|
imageUrl | string | Yes | Path to the image |
prompt | string | Yes | Editing description |
samples | number | Yes | Number of outputs |
isMasked | boolean | Yes | Using mask or not |
cfg_scale | number | Yes | Configuration scale |
clip_guidance_preset | string | Yes | Clip guidance preset |
image_strength | number | Yes | Image strength |
seed | number | Yes | Random seed |
step_schedule_start | number | Yes | Step schedule start |
steps | number | Yes | Number of steps |
Example Request
- JavaScript
- cURL
- Python
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'IMAGE_EDITOR',
model: 'stable-diffusion-xl-1024-v1-0',
promptObject: {
imageUrl: 'development/images/2025_02_16_15_42_40_711_human.jpg',
prompt: 'turn into cartoon',
samples: 1,
isMasked: false,
cfg_scale: 7,
clip_guidance_preset: 'NONE',
image_strength: 0.35,
seed: 0,
step_schedule_start: 0.65,
steps: 30
}
})
})
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_EDITOR",
"model": "stable-diffusion-xl-1024-v1-0",
"promptObject": {
"imageUrl": "development/images/2025_02_16_15_42_40_711_human.jpg",
"prompt": "turn into cartoon",
"samples": 1,
"isMasked": false,
"cfg_scale": 7,
"clip_guidance_preset": "NONE",
"image_strength": 0.35,
"seed": 0,
"step_schedule_start": 0.65,
"steps": 30
}
}'
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "IMAGE_EDITOR",
"model": "stable-diffusion-xl-1024-v1-0",
"promptObject": {
"imageUrl": "development/images/2025_02_16_15_42_40_711_human.jpg",
"prompt": "turn into cartoon",
"samples": 1,
"isMasked": False,
"cfg_scale": 7,
"clip_guidance_preset": "NONE",
"image_strength": 0.35,
"seed": 0,
"step_schedule_start": 0.65,
"steps": 30
}
}
response = requests.post(url, headers=headers, json=data)
Responses
Success Response (200)
Successful response contains the generated edited image.
{}