计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
image-to-video-pipeline【效率与协作】Multi-step pipeline: generate an image then animate it to video using each::sense AI. First create a high-quality still image from a text prompt, then animate the result into a short video with motion and camera effects. Use for: image animation, still to video, photo animation, motion from image, animated stills. Triggers: image to video, animate im…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate an image and then animate it into a video in a multi-step pipeline 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 majestic eagle perched on a snow-covered pine branch in a winter mountain landscape, dramatic morning light breaking through storm clouds, photorealistic wildlife photography, sharp detail on the feathers"
}
],
"stream": false
}'
Once you have the generated image URL from Step 1, use it as the reference image for animation:
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": "Animate this image: the eagle slowly spreads its wings preparing to take flight, snow particles drift gently in the wind, clouds move slowly in the background, subtle camera zoom in, cinematic wildlife documentary style"}
]
}
],
"stream": false
}'
from openai import OpenAI
import json
client = OpenAI(
api_key="YOUR_EACHLABS_API_KEY",
base_url="https://eachsense-agent.core.eachlabs.run/v1"
)
# Step 1: Generate the image
image_response = client.chat.completions.create(
model="eachsense/beta",
messages=[{
"role": "user",
"content": "A majestic eagle perched on a snow-covered pine branch in a winter mountain landscape, dramatic morning light breaking through storm clouds, photorealistic wildlife photography, sharp detail on the feathers"
}]
)
image_result = image_response.choices[0].message.content
print("Step 1 - Image generated:", image_result)
# Extract image URL from the response
# (parse the URL from the response content)
image_url = "EXTRACTED_IMAGE_URL"
# Step 2: Animate the image into video
video_response = client.chat.completions.create(
model="eachsense/beta",
messages=[{
"role": "user",
"content": "Animate this image: the eagle slowly spreads its wings preparing to take flight, snow particles drift gently in the wind, clouds move slowly in the background, subtle camera zoom in, cinematic wildlife documentary style"
}],
# Images are included in the message content array above
)
video_result = video_response.choices[0].message.content
print("Step 2 - Video generated:", video_result)
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.
Step 1: Generate the still
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 serene Japanese garden with a red torii gate reflected in a still koi pond, cherry blossoms in full bloom, soft morning mist, photorealistic landscape photography"
}
],
"stream": false
}'
Step 2: Animate
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": "Animate this scene: cherry blossom petals gently falling and landing on the pond surface creating small ripples, koi fish slowly swimming beneath the surface, a very gentle breeze moving the branches, slow cinematic pan from left to right"}
]
}
],
"stream": false
}'
Step 1: Generate the product shot
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 premium perfume bottle on a reflective black surface, golden liquid inside a faceted crystal bottle, dramatic studio lighting with a single spotlight from above, luxury product photography, dark background"
}
],
"stream": false
}'
Step 2: Animate into a reveal
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": "Animate this product shot: slow 360-degree rotation of the perfume bottle, light catching different facets as it turns, subtle sparkle effects on the crystal, smooth cinematic rotation, luxury brand commercial style"}
]
}
],
"stream": false
}'