算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
ai-recipe-visualization【设计与创意】Visualize recipes and dishes using each::sense AI. Generate step-by-step cooking process images, ingredient layouts, finished dish presentations, and recipe card visuals. Create visual guides for cookbooks, food blogs, and cooking tutorials. Use for: recipe visualization, cooking steps, ingredient photos, cookbook images, recipe cards, cooking tutori…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Visualize recipes, cooking processes, and dish presentations 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": "A recipe visualization showing all ingredients for homemade pasta laid out in a flat lay: a mound of 00 flour with a well in the center, eggs, olive oil, salt, and a fork, all arranged on a rustic wooden cutting board, recipe card style, bright even lighting, cookbook 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": "A recipe visualization showing all ingredients for homemade pasta laid out in a flat lay: a mound of 00 flour with a well in the center, eggs, olive oil, salt, and a fork, all arranged on a rustic wooden cutting board, recipe card style, bright even lighting, cookbook 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": "Create a recipe visualization showing what this finished dish looks like before cooking: display all the raw ingredients laid out in small prep bowls arranged neatly, mise en place style, matching the warm lighting and surface of the reference"},
{"type": "image_url", "image_url": {"url": "https://example.com/finished-dish.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": "A mise en place photograph for a Thai green curry recipe: small glass prep bowls arranged in a circle containing diced chicken, green curry paste, coconut milk in a measuring cup, sliced bell peppers, Thai basil leaves, fish sauce, palm sugar, and bamboo shoots, clean white marble surface, overhead view, cooking blog 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 cooking process photograph: hands tossing pasta in a large stainless steel pan with garlic, olive oil, and fresh cherry tomatoes, steam rising, dynamic action shot, warm kitchen lighting, close-up angle showing the pasta mid-toss, authentic Italian cooking moment"
}
],
"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 side-by-side recipe visualization: on the left, raw marinated steak on a cutting board with fresh rosemary and garlic cloves; on the right, the same steak perfectly grilled with char marks, sliced and fanned out on a warm plate with roasted potatoes, consistent lighting and surface across both sides, cookbook tutorial style"
}
],
"stream": false
}'