算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
image-upscaling【设计与创意】Enhance image resolution with AI upscaling using each::sense AI. Upscale low-resolution images to high resolution while preserving detail, sharpness, and natural texture. Supports 2x and 4x scaling for photos, artwork, screenshots, and legacy media. Use for: photo enlargement, print preparation, low-res recovery, thumbnail upscaling, legacy photo res…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Enhance image resolution with AI-powered upscaling using each::sense — the intelligent AI agent that automatically selects the best model for your request.
Requires an each::labs API key. Get one at eachlabs.ai.
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Upscale this image to 4x resolution. Enhance sharpness and detail while keeping the original look natural. Remove any compression artifacts."},
{"type": "image_url", "image_url": {"url": "https://example.com/low-res-photo.jpg"}}
]
}
],
"stream": false
}'
from openai import OpenAI
client = OpenAI(
api_key="YOUR_EACHLABS_API_KEY",
base_url="https://eachsense-agent.core.eachlabs.run/v1"
)
response = client.chat.completions.create(
model="eachsense/beta",
messages=[{
"role": "user",
"content": "Upscale this image to 4x resolution. Enhance sharpness and detail while keeping the original look natural. Remove any compression artifacts."
}],
# Images are included in the message content array above
)
print(response.choices[0].message.content)
Images are sent inside messages using the OpenAI multimodal content format. Maximum 4 images per request.
Set "stream": true for real-time Server-Sent Events (SSE) responses, or "stream": false to receive the complete result in a single response. Streaming is useful for showing progress in UIs; non-streaming is simpler for scripts and automation.
| Scenario | Prompt Focus | Expected Improvement |
|---|---|---|
| Photo Enlargement | Preserve natural skin texture, avoid over-sharpening | Print-ready from web-size |
| Artwork Upscaling | Maintain brush strokes, color fidelity | Gallery print from digital |
| Screenshot Enhancement | Clean edges, readable text, sharp UI elements | Presentation-ready captures |
| Legacy Photo Recovery | Reduce grain, restore detail, fix color | Modern quality from old scans |
| Thumbnail Expansion | Reconstruct facial features, add detail | Usable image from tiny source |
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Upscale this photograph for large-format printing. Increase resolution while preserving natural skin textures, fine hair detail, and fabric weave. Do not over-sharpen or add artificial detail."},
{"type": "image_url", "image_url": {"url": "https://example.com/portrait-web.jpg"}}
]
}
],
"stream": false
}'
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Upscale this digital illustration to high resolution. Preserve the clean line art, flat color areas, and intentional brush strokes. Keep the artistic style intact without adding photorealistic detail."},
{"type": "image_url", "image_url": {"url": "https://example.com/illustration-small.png"}}
]
}
],
"stream": false
}'
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Upscale and restore this old scanned photograph. Remove film grain and scanning artifacts. Enhance facial details and sharpness. Correct faded colors to look natural. Output at 4x the original resolution."},
{"type": "image_url", "image_url": {"url": "https://example.com/old-family-photo-scan.jpg"}}
]
}
],
"stream": false
}'
| Source Size | 2x Upscale | 4x Upscale | Best For |
|---|---|---|---|
| 256x256 | 512x512 | 1024x1024 | Thumbnails, icons |
| 512x512 | 1024x1024 | 2048x2048 | Social media |
| 1024x1024 | 2048x2048 | 4096x4096 | Web, presentations |
| 1920x1080 | 3840x2160 | 7680x4320 | 4K/8K display |