1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一段视频:"In the depths of a dense tropical jungle with dappled sunlight filtering through leaves, an explorer in a khaki jacket kneels brushing soil from ancient fragments, reveals shimmering symbols. Camera pushes from wide angle to close-up of his brown pupils dilating."
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一段视频:"In the depths of a dense tropical jungle with dappled sunlight filtering through leaves, an explorer in a khaki jacket kneels brushing soil from ancient fragments, reveals shimmering symbols. Camera pushes from wide angle to close-up of his brown pupils dilating."
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一段视频:"In the depths of a dense tropical jungle with dappled sunlight filtering through leaves, an explorer in a khaki jacket kneels brushing soil from ancient fragments, reveals shimmering symbols. Camera pushes from wide angle to close-up of his brown pupils dilating."
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一段视频:"In the depths of a dense tropical jungle with dappled sunlight filtering through leaves, an explorer in a khaki jacket kneels brushing soil from ancient fragments, reveals shimmering symbols. Camera pushes from wide angle to close-up of his brown pupils dilating."
curl -X POST https://runapi.ai/api/v1/wan/text_to_video \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "wan-2.7-text-to-video",
"prompt": "In the depths of a dense tropical jungle with dappled sunlight filtering through leaves, an explorer in a khaki jacket kneels brushing soil from ancient fragments, reveals shimmering symbols. Camera pushes from wide angle to close-up of his brown pupils dilating."
}
JSON
import { WanClient } from "@runapi.ai/wan";
const client = new WanClient({
apiKey: process.env.RUNAPI_API_KEY,
});
const result = await client.textToVideo.run({
"model": "wan-2.7-text-to-video",
"prompt": "In the depths of a dense tropical jungle with dappled sunlight filtering through leaves, an explorer in a khaki jacket kneels brushing soil from ancient fragments, reveals shimmering symbols. Camera pushes from wide angle to close-up of his brown pupils dilating."
});
console.log(result.id);
require "runapi/wan"
client = RunApi::Wan::Client.new
result = client.text_to_video.run(
model: "wan-2.7-text-to-video",
prompt: "In the depths of a dense tropical jungle with dappled sunlight filtering through leaves, an explorer in a khaki jacket kneels brushing soil from ancient fragments, reveals shimmering symbols. Camera pushes from wide angle to close-up of his brown pupils dilating."
)
puts result.id
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"model\":\"wan-2.7-text-to-video\",\"prompt\":\"In the depths of a dense tropical jungle with dappled sunlight filtering through leaves, an explorer in a khaki jacket kneels brushing soil from ancient fragments, reveals shimmering symbols. Camera pushes from wide angle to close-up of his brown pupils dilating.\"}")
req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, "https://runapi.ai/api/v1/wan/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)
}
wan-2.7-text-to-video/api/v1/wan/text_to_video获取 API Key
Impressionist style, dusk, soft light, side light, low saturation, cold tone, center composition, medium shot, following shot. Watercolor-style fox walks slowly through forest, figure dissolving and integrating with blurred forest colors.
Abstract motion graphics of a floating sphere of liquid mercury that continuously morphs between geometric shapes — sphere to cube to tetrahedron to torus and back to sphere. Each transition is smooth and organic, with the reflective surface rippling and stretching. The metallic surface reflects a colorful studio environment with pink and blue gradient lighting visible in the reflections. The object floats in the center of frame against a soft gradient background that shifts from deep purple at the bottom to pale lavender at the top. Slow, hypnotic movement. Perfect loop.
curl -X POST https://runapi.ai/api/v1/wan/text_to_video \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "wan-2.7-text-to-video",
"prompt": "Abstract motion graphics of a floating sphere of liquid mercury that continuously morphs between geometric shapes — sphere to cube to tetrahedron to torus and back to sphere. Each transition is smooth and organic, with the reflective surface rippling and stretching. The metallic surface reflects a colorful studio environment with pink and blue gradient lighting visible in the reflections. The object floats in the center of frame against a soft gradient background that shifts from deep purple at the bottom to pale lavender at the top. Slow, hypnotic movement. Perfect loop."
}
JSON