Stable Image Core - Sketch to Image
Convert simple sketches and line drawings into detailed, realistic images using Stability AI's Stable Image Core model. This advanced AI model combines your sketch input with text descriptions to generate high-quality images that maintain your structural vision while adding realistic details, textures, and colors.
Model Information
- Provider: Stability AI
- Model ID:
stable-image
- Input: Sketch/line drawing + text prompt
- Output: High-quality generated image
- Formats: PNG, JPEG, WebP
Request Parameters
Field Name | Type | Example | Description | Required |
---|---|---|---|---|
type | text | SKETCH_TO_IMAGE | Feature identifier | ✔️ |
model | text | stable-image | AI model identifier | ✔️ |
conversationId | text | SKETCH_TO_IMAGE | Conversation context | ✔️ |
promptObject.imageUrl | string | https://example.com/sketch.jpg | URL of the sketch image to transform | ✔️ |
promptObject.prompt | string | A beautiful landscape with mountains and trees | Text description of desired output | ✔️ |
promptObject.control_strength | number | 0.7 | How closely to follow the sketch (0.0-1.0) | ✔️ |
promptObject.output_format | string | png | Output image format | ✔️ |
promptObject.negative_prompt | string | blurry, low quality, distorted | What to avoid in the output | ✖️ |
promptObject.seed | number | 12345 | Seed for reproducible results (0 for random) | ✖️ |
promptObject.style_preset | string | photographic | Visual style to apply | ✖️ |
Parameter Details
Control Strength:
0.0
: Minimal sketch influence, more creative freedom0.5
: Balanced sketch guidance and AI creativity1.0
: Maximum sketch adherence, strict structural following
Output Format Options:
png
- Lossless, supports transparencyjpeg
- Compressed, smaller file sizewebp
- Modern format, good compression
Style Preset Options:
3d-model
- 3D rendered appearanceanalog-film
- Vintage film aestheticanime
- Japanese animation stylecinematic
- Movie-like qualitycomic-book
- Comic book illustration styledigital-art
- Digital artwork styleenhance
- Enhanced realismfantasy-art
- Fantasy illustration styleisometric
- Isometric perspectiveline-art
- Line art stylelow-poly
- Low polygon 3D stylemodeling-compound
- Clay-like appearanceneon-punk
- Cyberpunk neon styleorigami
- Paper folding art stylephotographic
- Realistic photographic stylepixel-art
- Pixel art styletile-texture
- Tileable texture style
Endpoint
Request Headers
Field | Value |
---|---|
API-KEY | <api-key> |
Content-Type | application/json |
Code Example
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "SKETCH_TO_IMAGE",
"model": "stable-image",
"conversationId": "SKETCH_TO_IMAGE",
"promptObject": {
"imageUrl": "https://example.com/my-sketch.jpg",
"prompt": "A beautiful mountain landscape at sunset with vibrant colors and detailed textures",
"control_strength": 0.7,
"output_format": "png",
"negative_prompt": "blurry, low quality, distorted, ugly",
"seed": 0,
"style_preset": "photographic"
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'SKETCH_TO_IMAGE',
model: 'stable-image',
conversationId: 'SKETCH_TO_IMAGE',
promptObject: {
imageUrl: 'https://example.com/my-sketch.jpg',
prompt: 'A beautiful mountain landscape at sunset with vibrant colors and detailed textures',
control_strength: 0.7,
output_format: 'png',
negative_prompt: 'blurry, low quality, distorted, ugly',
seed: 0,
style_preset: 'photographic'
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "SKETCH_TO_IMAGE",
"model": "stable-image",
"conversationId": "SKETCH_TO_IMAGE",
"promptObject": {
"imageUrl": "https://example.com/my-sketch.jpg",
"prompt": "A beautiful mountain landscape at sunset with vibrant colors and detailed textures",
"control_strength": 0.7,
"output_format": "png",
"negative_prompt": "blurry, low quality, distorted, ugly",
"seed": 0,
"style_preset": "photographic"
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/features
Generated cURL Command:
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "SKETCH_TO_IMAGE",
"model": "stable-image",
"conversationId": "SKETCH_TO_IMAGE",
"promptObject": {
"imageUrl": "https://example.com/my-sketch.jpg",
"prompt": "A beautiful mountain landscape at sunset with vibrant colors and detailed textures",
"control_strength": 0.7,
"output_format": "png",
"negative_prompt": "blurry, low quality, distorted, ugly",
"seed": 0,
"style_preset": "photographic"
}
}'
Response Format
{}
Tips for Best Results
- Clear Sketches: Use clean, well-defined line drawings for better results
- Detailed Prompts: Be specific about colors, textures, lighting, and atmosphere
- Control Strength: Start with 0.7 and adjust based on how closely you want to follow your sketch
- Negative Prompts: Use negative prompts to avoid unwanted elements or artifacts
- Style Consistency: Choose style presets that match your artistic vision
- Iterative Approach: Experiment with different seeds and settings to refine results
Authentication
This endpoint requires an API key to be provided in the API-KEY
header.