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
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
Backlight, medium shot, sunset, soft light, silhouette, center composition, orbiting shot, the lens follows the character from back to front showing rugged cowboy clutching holster, looking alertly around desolate western ghost town.
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": "Backlight, medium shot, sunset, soft light, silhouette, center composition, orbiting shot, the lens follows the character from back to front showing rugged cowboy clutching holster, looking alertly around desolate western ghost town."
}
JSON
Drone lens, fast passing through, looking up from the inside of a circular pipe covered with frost and cracks. Then, the lens flies out of pipe revealing polar snowfield at sunrise with golden light.
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": "Drone lens, fast passing through, looking up from the inside of a circular pipe covered with frost and cracks. Then, the lens flies out of pipe revealing polar snowfield at sunrise with golden light."
}
JSON