算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
og-image-design【设计与创意】Design Open Graph images for link previews using each::sense AI. Generate compelling OG images that drive clicks when shared on Twitter, Facebook, LinkedIn, Slack, Discord, and iMessage. Optimized for 1200x630 dimensions with bold visuals and clear text areas for titles. Use for: OG images, link previews, social share images, meta images, Twitter car…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Design compelling Open Graph images for link previews 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 an OG image for a blog post about machine learning. Dark gradient background from deep navy to dark teal, a stylized neural network visualization glowing in the center, clean and techy, 1200x630 proportions with a large dark area on the left side for article title text overlay."
}
],
"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 an OG image for a blog post about machine learning. Dark gradient background from deep navy to dark teal, a stylized neural network visualization glowing in the center, clean and techy, 1200x630 proportions with a large dark area on the left side for article title text overlay."
}]
)
print(response.choices[0].message.content)
Use brand assets to create consistent OG images:
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": "Create an OG image background that matches this brand style. Same color palette and visual language, 1200x630 proportions, leave generous space for a large title on the left and a small logo area in the bottom right corner."},
{"type": "image_url", "image_url": {"url": "https://example.com/brand-style.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.
| Platform | Display | Notes |
|---|---|---|
| Twitter/X | Summary large image card | Crops to 2:1 on feed |
| Link preview | Full 1200x630 display | |
| Article/link share | Prominent in feed | |
| Slack | URL unfurl | Inline preview |
| Discord | Embed card | Sidebar preview |
| iMessage | Link preview bubble | Compact view |
OG image, link preview graphic, 1200x630 proportions, bold visual,
high contrast, clear focal point, dark background with text area,
branded and professional, eye-catching at small sizes, social share image
detailed small elements — OG images are often viewed at 300px wide
centered text — different platforms crop differently
important content at edges — safe zone is the inner 80%
light gray backgrounds — low contrast on white platform UIs
OG image for [content type], [visual elements], [background], [color palette], 1200x630 proportions, [text area placement]
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": "Design an OG image for a developer blog about API design. Dark charcoal background, stylized code brackets and curly braces floating in teal and green, subtle grid pattern, developer tool aesthetic, 1200x630, left half reserved for title text."
}
],
"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": "Create an OG image for a SaaS product launch. Gradient from deep indigo to violet, abstract dashboard mockup fading in from the right edge, glowing accent highlights, premium tech feel, 1200x630, center-left area clear for product name."
}
],
"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": "Design an OG image for a podcast episode share. Warm dark background with a vintage microphone illustration on the right side, abstract sound waves radiating outward in gold and amber tones, cozy and professional podcast aesthetic, 1200x630, left side for episode title."
}
],
"stream": false
}'
For blogs and content sites, batch-generate OG images:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_EACHLABS_API_KEY",
base_url="https://eachsense-agent.core.eachlabs.run/v1"
)
topics = [
"API authentication best practices",
"Database scaling strategies",
"CI/CD pipeline optimization"
]
for topic in topics:
response = client.chat.completions.create(
model="eachsense/beta",
messages=[{
"role": "user",
"content": f"Create an OG image background for a technical blog post about {topic}. Dark navy gradient, subtle tech-themed visual element on the right, clean left side for title overlay, professional developer aesthetic, 1200x630 proportions."
}]
)
print(f"OG image for '{topic}': {response.choices[0].message.content}")
# Step 1: Create the base OG template
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": "OG image template background for a design blog. Soft gradient from slate gray to warm charcoal, abstract paint brush strokes in muted teal and coral on the right side, editorial and artistic, 1200x630."
}
],
"stream": false
}'
# Step 2: Create a variation for a specific post
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": "OG image template background for a design blog. Soft gradient from slate gray to warm charcoal, abstract paint brush strokes in muted teal and coral on the right side, editorial and artistic, 1200x630."
},
{
"role": "assistant",
"content": "..."
},
{
"role": "user",
"content": "Create a variation where the brush strokes form the shape of a color palette. Same background and style but with this specific subject matter for an article about color theory."
}
],
"stream": false
}'