1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一段视频:"Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing."
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一段视频:"Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing."
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一段视频:"Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing."
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一段视频:"Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing."
curl -X POST https://runapi.ai/api/v1/happyhorse/text_to_video \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "happyhorse-text-to-video",
"prompt": "Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing."
}
JSON
import { HappyhorseClient } from "@runapi.ai/happyhorse";
const client = new HappyhorseClient({
apiKey: process.env.RUNAPI_API_KEY,
});
const result = await client.textToVideo.run({
"model": "happyhorse-text-to-video",
"prompt": "Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing."
});
console.log(result.id);
require "runapi/happyhorse"
client = RunApi::Happyhorse::Client.new
result = client.text_to_video.run(
model: "happyhorse-text-to-video",
prompt: "Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing."
)
puts result.id
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"model\":\"happyhorse-text-to-video\",\"prompt\":\"Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing.\"}")
req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, "https://runapi.ai/api/v1/happyhorse/text_to_video", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("RUNAPI_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
fmt.Println(resp.Status)
}
happyhorse-text-to-video/api/v1/happyhorse/text_to_video获取 API Key
Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing.
curl -X POST https://runapi.ai/api/v1/happyhorse/text_to_video \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "happyhorse-text-to-video",
"prompt": "Clean motion graphics animation showing data packets as small glowing orbs traveling through a network of interconnected nodes. The nodes are arranged in a tree structure, branching outward from a central server node on the left to multiple endpoint nodes on the right. Each data packet leaves a fading light trail as it travels along the connection lines. When packets reach nodes, the node pulses briefly. Color scheme uses white lines and nodes on a dark blue background, with data packets in bright cyan. The animation flows continuously from left to right, showing the concept of API request routing."
}
JSON