Documentation Index Fetch the complete documentation index at: https://docs.vlm.run/llms.txt
Use this file to discover all available pages before exploring further.
VLM Run’s Orion agents can leverage various image-editing tools such as cropping, rotating, super-resolution, and de-oldify. These tools are designed to help you enhance image quality, extract specific regions, correct orientation, and restore historical photos with modern AI techniques.
For best results, we recommend using the Structured Outputs API to get responses in a structured and validated data format.
1. Image Cropping
Extract specific regions or focus on particular subjects within an image.
Crop the clock to tell the time more clearly.
Python
Python - Structured Outputs
Node.js
Node.js - Structured Outputs
from vlmrun.client import VLMRun
# Initialize the VLMRun client
client = VLMRun( api_key = "<VLMRUN_API_KEY>" )
# Crop image to focus on main subject
response = client.agent.completions.create(
model = "vlmrun-orion-1:auto" ,
messages = [
{
"role" : "user" ,
"content" : [
{ "type" : "text" , "text" : "Crop the clock to tell the time more clearly" },
{ "type" : "image_url" , "image_url" : { "url" : "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.agent/clock.jpg" , "detail" : "auto" }}
]
}
]
)
print (response.choices[ 0 ].message.content)
# >>> {"url": "https://.../cropped.jpg", "label": "clock", "xywh": [0.2, 0.2, 0.6, 0.6]}
While the demonstration uses a single crop, we also support cropping multiple regions at once.
2. Image Rotation
Correct image orientation or apply creative rotations for better composition.
Rotate the image 90 degrees clockwise to correct the orientation.
Python
Python - Structured Outputs
Node.js
Node.js - Structured Outputs
from vlmrun.client import VLMRun
# Initialize the VLMRun client
client = VLMRun( api_key = "<VLMRUN_API_KEY>" )
# Rotate image to correct orientation
response = client.agent.completions.create(
model = "vlmrun-orion-1:auto" ,
messages = [
{
"role" : "user" ,
"content" : [
{ "type" : "text" , "text" : "Rotate this image 90 degrees clockwise" },
{ "type" : "image_url" , "image_url" : { "url" : "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.object-detection/cats.jpg" }}
]
}
]
)
print (response.choices[ 0 ].message.content)
# >>> {"url": "https://.../rotated.jpg", "angle": 90}
3. Super-Resolution Enhancement
Upscale images while maintaining quality and adding realistic details.
Enhance this image using super-resolution to increase its resolution while preserving quality.
Python
Python - Structured Outputs
Node.js
Node.js - Structured Outputs
from vlmrun.client import VLMRun
# Initialize the VLMRun client
client = VLMRun( api_key = "<VLMRUN_API_KEY>" )
# Apply super-resolution enhancement
response = client.agent.completions.create(
model = "vlmrun-orion-1:auto" ,
messages = [
{
"role" : "user" ,
"content" : [
{ "type" : "text" , "text" : "Enhance this image using super-resolution to increase its resolution while preserving quality" },
{ "type" : "image_url" , "image_url" : { "url" : "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.agent/vegetables-lo.jpg" }}
]
}
]
)
print (response.choices[ 0 ].message.content)
# >>> {"url": "https://.../enhanced.jpg"}
4. De-Oldify (Colorization)
Transform black and white or sepia images into vibrant color photos using AI.
De-oldify this image so that it's colorized and upsampled.
Python
Python - Structured Outputs
Node.js
Node.js - Structured Outputs
from vlmrun.client import VLMRun
# Initialize the VLMRun client
client = VLMRun( api_key = "<VLMRUN_API_KEY>" )
# Colorize black and white image
response = client.agent.completions.create(
model = "vlmrun-orion-1:auto" ,
messages = [
{
"role" : "user" ,
"content" : [
{ "type" : "text" , "text" : "De-oldify this image so that it's colorized and upsampled" },
{ "type" : "image_url" , "image_url" : { "url" : "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.agent/lunch-skyscraper.jpg" }}
]
}
]
)
print (response.choices[ 0 ].message.content)
# >>> {"url": "https://.../colorized.jpg"}
FAQ
What image formats are supported for editing?
What are the best practices for image cropping?
Rule of Thirds : Align subjects with intersection points for better composition
Aspect Ratio : Maintain consistent aspect ratios for professional results
Subject Focus : Keep the main subject centered or following composition rules
Background Removal : Remove distracting elements while preserving context
How accurate is the super-resolution enhancement?
AI-Powered : Uses advanced neural networks for realistic detail generation
Multiple Scales : Supports 2x, 4x, and 8x upscaling with quality preservation
Detail Enhancement : Intelligently adds realistic textures and patterns
Quality Metrics : Provides confidence scores for enhancement quality
How realistic is the de-oldify colorization?
Historical Accuracy : Uses context-aware AI to suggest period-appropriate colors
Natural Colors : Generates realistic skin tones, clothing, and environmental colors
Confidence Scoring : Provides confidence levels for color accuracy
Region Analysis : Identifies and colors different regions with appropriate palettes