算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
ai-coloring-page【设计与创意】Generate printable coloring pages using each::sense AI. Create line art illustrations perfect for coloring books, children's activities, adult relaxation coloring, educational worksheets, and therapeutic art. Supports simple children's designs, detailed mandala patterns, and complex adult coloring pages. Use for: coloring books, children's activities…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate printable coloring pages and line art illustrations 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": "Generate a coloring page: a friendly dragon sitting in a garden surrounded by flowers and butterflies. Black and white line art, clean outlines, no shading or filled areas, suitable for children ages 5-8 to color in. White background."
}
],
"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": "Generate a coloring page: a friendly dragon sitting in a garden surrounded by flowers and butterflies. Black and white line art, clean outlines, no shading or filled areas, suitable for children ages 5-8 to color in. White background."
}]
)
print(response.choices[0].message.content)
Convert a photo or artwork into a coloring page:
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": "Convert this image into a coloring page. Extract the main outlines and shapes, remove all color and shading, create clean black line art on a white background suitable for coloring with crayons or colored pencils."},
{"type": "image_url", "image_url": {"url": "https://example.com/colorful-scene.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 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.
| Level | Age Group | Characteristics |
|---|---|---|
| Simple | Ages 2-4 | Large shapes, thick outlines, few details, big open areas |
| Easy | Ages 5-7 | Medium shapes, clear outlines, some detail, recognizable subjects |
| Medium | Ages 8-12 | More detail, smaller areas, varied line weights |
| Detailed | Teens/Adults | Fine details, intricate patterns, many small sections |
| Complex | Adults | Mandala-level intricacy, tiny sections, pattern fills |
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": "Coloring page for young children: a cute cartoon cat wearing a party hat, sitting next to a birthday cake with candles. Simple shapes, thick black outlines, large areas to color, minimal small details. Black and white line art on white background."
}
],
"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": "Intricate mandala coloring page for adults. Circular symmetrical design with layers of floral petals, geometric shapes, and ornate filigree patterns radiating from the center. Fine detailed line art, many small sections to color, black lines on white background. Meditative and complex."
}
],
"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": "Educational coloring page: the solar system with the sun in the center and all eight planets in their orbits. Each planet should be recognizable by its features — Saturn with rings, Jupiter with bands, Earth with continents. Labels space for planet names. Black and white line art, suitable for elementary school students."
}
],
"stream": false
}'
THEMES=(
"Coloring page: an underwater coral reef scene with tropical fish, a sea turtle, an octopus, and seaweed"
"Coloring page: a medieval castle with a knight on horseback, a drawbridge, and flags on turrets"
"Coloring page: a space station orbiting Earth with an astronaut floating outside, stars, and a shuttle approaching"
"Coloring page: a dense jungle scene with a toucan, a monkey, a tree frog, vines, and large tropical leaves"
)
for THEME in "${THEMES[@]}"; do
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\": \"$THEME. Black and white line art, clean outlines, no shading, white background, suitable for ages 6-10.\"}],
\"stream\": false
}"
echo "---"
done