Floating rocky island archipelago above a vast cloud sea, each island hosting a different ecosystem — tropical jungle, walled medieval city, bare windswept cliffs — all connected by precarious rope bridges swaying in the wind, warm late afternoon light from the right, deep blue cloud sea below, saturated greens, warm sandstone, and deep azure sky, epic fantasy concept art
/api/v1/runapi/text_to_image
运行信息
模型
提供方
Runapi
服务
Runapi
Endpoint
Text To Image
1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一张图像:"Floating rocky island archipelago above a vast cloud sea, each island hosting a different ecosystem — tropical jungle, walled medieval city, bare windswept cliffs — all connected by precarious rope bridges swaying in the wind, warm late afternoon light from the right, deep blue cloud sea below, saturated greens, warm sandstone, and deep azure sky, epic fantasy concept art"
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"Floating rocky island archipelago above a vast cloud sea, each island hosting a different ecosystem — tropical jungle, walled medieval city, bare windswept cliffs — all connected by precarious rope bridges swaying in the wind, warm late afternoon light from the right, deep blue cloud sea below, saturated greens, warm sandstone, and deep azure sky, epic fantasy concept art"
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"Floating rocky island archipelago above a vast cloud sea, each island hosting a different ecosystem — tropical jungle, walled medieval city, bare windswept cliffs — all connected by precarious rope bridges swaying in the wind, warm late afternoon light from the right, deep blue cloud sea below, saturated greens, warm sandstone, and deep azure sky, epic fantasy concept art"
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"Floating rocky island archipelago above a vast cloud sea, each island hosting a different ecosystem — tropical jungle, walled medieval city, bare windswept cliffs — all connected by precarious rope bridges swaying in the wind, warm late afternoon light from the right, deep blue cloud sea below, saturated greens, warm sandstone, and deep azure sky, epic fantasy concept art"
curl -X POST https://runapi.ai/api/v1/runapi/text_to_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"prompt": "Floating rocky island archipelago above a vast cloud sea, each island hosting a different ecosystem — tropical jungle, walled medieval city, bare windswept cliffs — all connected by precarious rope bridges swaying in the wind, warm late afternoon light from the right, deep blue cloud sea below, saturated greens, warm sandstone, and deep azure sky, epic fantasy concept art"
}
JSON
import { RunapiClient } from "@runapi.ai/runapi";
const client = new RunapiClient({
apiKey: process.env.RUNAPI_API_KEY,
});
const result = await client.textToImage.run({
"prompt": "Floating rocky island archipelago above a vast cloud sea, each island hosting a different ecosystem — tropical jungle, walled medieval city, bare windswept cliffs — all connected by precarious rope bridges swaying in the wind, warm late afternoon light from the right, deep blue cloud sea below, saturated greens, warm sandstone, and deep azure sky, epic fantasy concept art"
});
console.log(result.id);
require "runapi/runapi"
client = RunApi::Runapi::Client.new
result = client.text_to_image.run(
prompt: "Floating rocky island archipelago above a vast cloud sea, each island hosting a different ecosystem — tropical jungle, walled medieval city, bare windswept cliffs — all connected by precarious rope bridges swaying in the wind, warm late afternoon light from the right, deep blue cloud sea below, saturated greens, warm sandstone, and deep azure sky, epic fantasy concept art"
)
puts result.id
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"prompt\":\"Floating rocky island archipelago above a vast cloud sea, each island hosting a different ecosystem — tropical jungle, walled medieval city, bare windswept cliffs — all connected by precarious rope bridges swaying in the wind, warm late afternoon light from the right, deep blue cloud sea below, saturated greens, warm sandstone, and deep azure sky, epic fantasy concept art\"}")
req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, "https://runapi.ai/api/v1/runapi/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)
}
Southern European hidden side street in late morning light, terracotta walls with layers of peeling cream, ochre, and dusty rose paint, narrow cobblestone lane, clay flower pots on iron-railed windowsills, single vintage bicycle leaning against a weathered wall, bougainvillea creating dappled shadows on the ground, travel photography with 28mm lens at mid-aperture
curl -X POST https://runapi.ai/api/v1/runapi/text_to_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"prompt": "Southern European hidden side street in late morning light, terracotta walls with layers of peeling cream, ochre, and dusty rose paint, narrow cobblestone lane, clay flower pots on iron-railed windowsills, single vintage bicycle leaning against a weathered wall, bougainvillea creating dappled shadows on the ground, travel photography with 28mm lens at mid-aperture"
}
JSON
City avenue reclaimed by nature twenty years after human abandonment, cracked asphalt split by tree roots pushing through, retail storefronts with shattered windows and young trees growing through the roofs, afternoon green-filtered light through the overhead canopy, muted greens, grey concrete, rust, and pale sky, quiet melancholy tone, photorealistic post-apocalyptic landscape
curl -X POST https://runapi.ai/api/v1/runapi/text_to_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"prompt": "City avenue reclaimed by nature twenty years after human abandonment, cracked asphalt split by tree roots pushing through, retail storefronts with shattered windows and young trees growing through the roofs, afternoon green-filtered light through the overhead canopy, muted greens, grey concrete, rust, and pale sky, quiet melancholy tone, photorealistic post-apocalyptic landscape"
}
JSON
Solarpunk cityscape with extensive rooftop gardens and elevated transit lines connecting green towers, bright optimistic mood, clean vector illustration style with defined shapes and limited gradients, ample negative space in the upper-left quadrant for text overlay, 16:9 ratio, warm golden sunlight, no text
curl -X POST https://runapi.ai/api/v1/gpt_image_2/text_to_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "gpt-image-2",
"prompt": "Solarpunk cityscape with extensive rooftop gardens and elevated transit lines connecting green towers, bright optimistic mood, clean vector illustration style with defined shapes and limited gradients, ample negative space in the upper-left quadrant for text overlay, 16:9 ratio, warm golden sunlight, no text"
}
JSON