1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一张图像:"Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness."
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness."
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness."
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness."
curl -X POST https://runapi.ai/api/v1/seedream/text_to_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "seedream-5-lite-text-to-image",
"prompt": "Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness."
}
JSON
import { SeedreamClient } from "@runapi.ai/seedream";
const client = new SeedreamClient({
apiKey: process.env.RUNAPI_API_KEY,
});
const result = await client.textToImage.run({
"model": "seedream-5-lite-text-to-image",
"prompt": "Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness."
});
console.log(result.id);
require "runapi/seedream"
client = RunApi::Seedream::Client.new
result = client.text_to_image.run(
model: "seedream-5-lite-text-to-image",
prompt: "Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness."
)
puts result.id
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"model\":\"seedream-5-lite-text-to-image\",\"prompt\":\"Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness.\"}")
req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, "https://runapi.ai/api/v1/seedream/text_to_image", 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)
}
seedream-5-lite-text-to-image/api/v1/seedream/text_to_image获取 API Key
Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness.
curl -X POST https://runapi.ai/api/v1/seedream/text_to_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "seedream-5-lite-text-to-image",
"prompt": "Whimsical children's book illustration of a small red fox sitting on a moss-covered log in an autumn forest. Golden and amber leaves drift down around the fox, who looks upward with bright curious eyes. The trees are stylized with round, soft canopies in warm oranges, yellows, and deep reds. Soft watercolor textures with visible paper grain. Gentle, warm lighting as if the entire scene glows from within. The style is cozy and inviting, suitable for ages 3-7, with slightly oversized eyes on the fox for expressiveness."
}
JSON