算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
inpainting-outpainting【设计与创意】Fill masked areas or extend image boundaries using each::sense AI. Inpaint to remove objects and fill seamlessly, outpaint to expand canvas and generate new content beyond the original frame. Supports context-aware fills, creative extensions, and object replacement. Use for: object removal, canvas extension, image repair, panorama creation, aspect ra…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Fill masked areas or extend image boundaries 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": "Remove the parked car in the center of this street photo and fill the area with the surrounding cobblestone road and a few fallen leaves to match the scene"},
{"type": "image_url", "image_url": {"url": "https://example.com/street-with-car.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": "Extend this landscape photo to the left and right to create a wider panoramic view. Continue the mountain range, sky, and meadow naturally."},
{"type": "image_url", "image_url": {"url": "https://example.com/mountain-landscape.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": "Extend this portrait photo downward to show the full outfit. Continue the style, fabric, and lighting naturally."
}],
# 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.
| Task | Prompt Approach |
|---|---|
| Object Removal | "Remove [object] and fill with surrounding [surface/texture]" |
| Object Replacement | "Replace [object] with [new object], matching lighting and scale" |
| Blemish Repair | "Fix the scratches/damage and restore the original look" |
| Watermark Removal | "Remove the watermark and reconstruct the image behind it" |
| Person Removal | "Remove the person on the right, fill with the beach/park behind" |
| Task | Prompt Approach |
|---|---|
| Widen Landscape | "Extend left and right, continue the natural scene" |
| Uncrop Portrait | "Extend downward to show full body" |
| Aspect Ratio Fix | "Extend to 16:9 aspect ratio, fill new areas naturally" |
| Environment Build | "Extend upward to show more sky and clouds" |
| Panorama Creation | "Extend both sides to create a wide panoramic view" |
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": "Replace the empty vase on the table with a lush bouquet of sunflowers. Match the lighting and shadows of the surrounding scene."},
{"type": "image_url", "image_url": {"url": "https://example.com/table-scene.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 image is square (1:1). Extend it to a 16:9 landscape ratio by adding content to the left and right sides. Continue the environment seamlessly."},
{"type": "image_url", "image_url": {"url": "https://example.com/square-photo.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 old photo has tears and creases across the middle. Repair the damaged areas, reconstruct missing details, and make the photo look intact and natural."},
{"type": "image_url", "image_url": {"url": "https://example.com/torn-old-photo.jpg"}}
]
}
],
"stream": false
}'