算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
ai-campaign-visuals【设计与创意】Generate campaign visual assets across platforms using each::sense AI. Create coordinated imagery for multi-channel marketing campaigns spanning social media, email, web, and print. Use for: marketing campaigns, multi-platform visuals, social media campaigns, email graphics, promotional imagery. Triggers: campaign visuals, marketing campaign, multi-p…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate coordinated visual assets for multi-platform marketing campaigns 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": "Create a campaign visual for a spring wellness product launch: a serene scene of botanical ingredients like lavender, eucalyptus, and chamomile arranged around a minimalist glass bottle on a stone surface, soft morning light, clean natural palette, editorial product photography"
}
],
"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": "Create a campaign visual for a spring wellness product launch: a serene scene of botanical ingredients like lavender, eucalyptus, and chamomile arranged around a minimalist glass bottle on a stone surface, soft morning light, clean natural palette, editorial product photography"
}]
)
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": "Using this product image as the centerpiece, create a campaign visual: place the product in a lifestyle context with complementary props, warm ambient lighting, social media ready composition, aspirational lifestyle mood"},
{"type": "image_url", "image_url": {"url": "https://example.com/product.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.
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": "An Instagram square post for a fitness app campaign: a dynamic action shot of a runner mid-stride on a city bridge at dawn, silhouetted against an orange and pink sky, motion blur on the background, energetic and motivational, high contrast photography"
}
],
"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": "A wide email header image for a Black Friday sale campaign: elegant dark background with gold accents, scattered gift boxes and shopping bags in black and gold, subtle sparkle effects, luxurious and exclusive feel, landscape format with space for text overlay on the left"
}
],
"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": "A visual for a tech conference promotion: a futuristic auditorium filled with holographic displays and connected nodes of light, deep purple and cyan color scheme, sleek modern architecture, sci-fi atmosphere, wide angle perspective"
}
],
"stream": false
}'
# Generate platform-specific variations for the same campaign
PLATFORMS=(
"Instagram square post: a flat lay of organic coffee beans, a ceramic mug, and a French press on a dark wooden table, overhead view, moody warm lighting, artisan coffee campaign"
"Facebook cover landscape: an artisan coffee roastery interior with warm industrial lighting, exposed brick walls, bags of coffee beans, cozy inviting atmosphere, wide panoramic shot"
"Pinterest tall pin: a step-by-step visual of pour-over coffee being prepared, steam rising from a ceramic cup, close-up detail shot, warm amber tones, vertical composition"
)
for PLATFORM in "${PLATFORMS[@]}"; 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\": \"$PLATFORM\"}],
\"stream\": false
}"
echo "---"
done