executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
ai-face-restorationRestore damaged, blurry, or low-quality face photos using each::sense AI. Fix old photos, remove scratches and damage, enhance resolution, sharpen details, recover lost facial features, and upscale low-resolution portraits. Use for: old family photo restoration, damaged photo repair, low-res face enhancement, historical photo recovery, blurry photo fix, her…
Independent GitHub snapshot · Automated classification · Original documentation governs
Restore damaged, blurry, or low-quality face photos to sharp, clear portraits 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": "Restore this old damaged family photo. Fix the scratches, remove the fading and yellowing, sharpen the faces, and enhance the overall quality to look like a modern photograph while preserving the original composition."},
{"type": "image_url", "image_url": {"url": "https://example.com/old-damaged-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": "Restore this old damaged family photo. Fix the scratches, remove the fading and yellowing, sharpen the faces, and enhance the overall quality to look like a modern photograph while preserving the original composition."
}],
# Images are included in the message content array above
)
print(response.choices[0].message.content)
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": "Restore and enhance this blurry low-resolution face photo. Sharpen all facial details, improve clarity, and upscale to high quality"},
{"type": "image_url", "image_url": {"url": "https://example.com/blurry-face.jpg"}}
]
}
],
"stream": false
}'
Images are sent inside messages using the OpenAI multimodal content format. Maximum 4 images per request.
Set "stream": true for real-time SSE responses, or "stream": false for complete result in a single response. Streaming is useful for showing progress in UIs; non-streaming is simpler for scripts and automation.
| Issue | What AI Can Fix | Difficulty |
|---|---|---|
| Blur/Out of Focus | Sharpens features, recovers detail | Easy |
| Low Resolution | Upscales and adds realistic detail | Easy |
| Scratches/Tears | Removes physical damage artifacts | Medium |
| Fading/Yellowing | Restores original tones and contrast | Easy |
| Water Damage | Reconstructs warped or stained areas | Medium |
| Missing Sections | Intelligently fills in gaps | Hard |
| Noise/Grain | Reduces excessive film grain | Easy |
| Color Loss | Re-colorizes faded or B&W photos | Medium |
Be specific about what needs fixing so the AI can prioritize:
Restore this photo: [describe damage]. Fix [specific issues]. Enhance [quality aspects]. Preserve [what to keep unchanged].
Always mention what to preserve:
Keep the original composition, maintain the person's identity,
preserve the original expression, don't change the background,
keep the vintage clothing accurate
sharpen facial details, enhance resolution, improve clarity,
restore true-to-life colors, recover fine details, upscale
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": "Restore this 1960s family photograph. It has multiple scratches across the surface, yellowed with age, and the faces have lost detail. Remove all scratches, correct the yellowing to natural colors, sharpen the faces so individual features are clear, and enhance the overall resolution. Keep the vintage clothing and setting accurate."},
{"type": "image_url", "image_url": {"url": "https://example.com/1960s-family.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": "This is a very low-resolution, blurry face photo, probably from an old phone camera. Upscale it to high resolution, sharpen all facial features including eyes, nose, lips, and eyebrows. Recover skin texture and hair detail. Make it look like it was taken with a modern camera."},
{"type": "image_url", "image_url": {"url": "https://example.com/low-res-face.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": "This photo has water damage with warping and discoloration stains, especially in the lower half. Restore the damaged areas, fix the color staining, straighten any warped features, and recover the original appearance. The subject face in the upper portion is partially affected too."},
{"type": "image_url", "image_url": {"url": "https://example.com/water-damaged.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": "Restore and colorize this black and white portrait from the 1940s. Sharpen the face, enhance details, and add natural realistic colors: skin tones, hair color matching the era, colorize the clothing appropriately for the 1940s. Keep it photorealistic, not painted-looking."},
{"type": "image_url", "image_url": {"url": "https://example.com/bw-1940s-portrait.jpg"}}
]
}
],
"stream": false
}'
# Step 1: Fix physical damage first
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": "Remove all scratches, tears, and physical damage from this old photo. Do not change the resolution or colors yet, just clean up the damage artifacts."},
{"type": "image_url", "image_url": {"url": "https://example.com/damaged-original.jpg"}}
]
}
],
"stream": false
}'
# Step 2: Enhance quality and resolution
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 enhance this restored photo. Sharpen all faces, improve resolution, correct the faded colors to look vibrant and natural, and enhance overall clarity. Preserve the original composition exactly."},
{"type": "image_url", "image_url": {"url": "https://example.com/cleaned-photo.jpg"}}
]
}
],
"stream": false
}'
# Step 3: Final color correction
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": "Apply final color correction to this restored photo. Balance the white point, ensure natural skin tones, and adjust contrast for a clean modern look. Do not change the composition or faces."},
{"type": "image_url", "image_url": {"url": "https://example.com/enhanced-photo.jpg"}}
]
}
],
"stream": false
}'