1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一段视频:"Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor."
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一段视频:"Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor."
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一段视频:"Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor."
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一段视频:"Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor."
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.6-text-to-video",
"prompt": "Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor."
}
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.6-text-to-video",
"prompt": "Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor."
});
console.log(result.id);
require "runapi/wan"
client = RunApi::Wan::Client.new
result = client.text_to_video.run(
model: "wan-2.6-text-to-video",
prompt: "Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor."
)
puts result.id
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"model\":\"wan-2.6-text-to-video\",\"prompt\":\"Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor.\"}")
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.6-text-to-video/api/v1/wan/text_to_video获取 API Key
Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor.
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.6-text-to-video",
"prompt": "Close-up shot of skilled hands shaping wet clay on a spinning pottery wheel. The camera focuses on the hands and clay, showing fingers pressing inward to form the walls of a bowl. Muddy water splashes slightly with each rotation. The clay surface glistens under warm overhead workshop lighting. The potter's hands are steady and precise, pulling the clay upward in smooth practiced motions. Background is a soft blur of shelves with finished ceramics in earth-toned glazes. The wheel spins counterclockwise at a steady pace. Natural sound design — the wet squelch of clay and the hum of the wheel motor."
}
JSON