Swiss Alps in 1930s lithograph tourism poster style, bold simplified mountain silhouettes in deep ultramarine blue and white, steam train crossing a stone viaduct in the middle ground, geometric graphic style with limited palette of ultramarine, red, cream, and gold, illegible placeholder lettering at top, slight print registration imperfection visible
/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:生成一张图像:"Swiss Alps in 1930s lithograph tourism poster style, bold simplified mountain silhouettes in deep ultramarine blue and white, steam train crossing a stone viaduct in the middle ground, geometric graphic style with limited palette of ultramarine, red, cream, and gold, illegible placeholder lettering at top, slight print registration imperfection visible"
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"Swiss Alps in 1930s lithograph tourism poster style, bold simplified mountain silhouettes in deep ultramarine blue and white, steam train crossing a stone viaduct in the middle ground, geometric graphic style with limited palette of ultramarine, red, cream, and gold, illegible placeholder lettering at top, slight print registration imperfection visible"
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"Swiss Alps in 1930s lithograph tourism poster style, bold simplified mountain silhouettes in deep ultramarine blue and white, steam train crossing a stone viaduct in the middle ground, geometric graphic style with limited palette of ultramarine, red, cream, and gold, illegible placeholder lettering at top, slight print registration imperfection visible"
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"Swiss Alps in 1930s lithograph tourism poster style, bold simplified mountain silhouettes in deep ultramarine blue and white, steam train crossing a stone viaduct in the middle ground, geometric graphic style with limited palette of ultramarine, red, cream, and gold, illegible placeholder lettering at top, slight print registration imperfection visible"
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": "Swiss Alps in 1930s lithograph tourism poster style, bold simplified mountain silhouettes in deep ultramarine blue and white, steam train crossing a stone viaduct in the middle ground, geometric graphic style with limited palette of ultramarine, red, cream, and gold, illegible placeholder lettering at top, slight print registration imperfection visible"
}
JSON
import { RunapiClient } from "@runapi.ai/runapi";
const client = new RunapiClient({
apiKey: process.env.RUNAPI_API_KEY,
});
const result = await client.textToImage.run({
"prompt": "Swiss Alps in 1930s lithograph tourism poster style, bold simplified mountain silhouettes in deep ultramarine blue and white, steam train crossing a stone viaduct in the middle ground, geometric graphic style with limited palette of ultramarine, red, cream, and gold, illegible placeholder lettering at top, slight print registration imperfection visible"
});
console.log(result.id);
require "runapi/runapi"
client = RunApi::Runapi::Client.new
result = client.text_to_image.run(
prompt: "Swiss Alps in 1930s lithograph tourism poster style, bold simplified mountain silhouettes in deep ultramarine blue and white, steam train crossing a stone viaduct in the middle ground, geometric graphic style with limited palette of ultramarine, red, cream, and gold, illegible placeholder lettering at top, slight print registration imperfection visible"
)
puts result.id
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"prompt\":\"Swiss Alps in 1930s lithograph tourism poster style, bold simplified mountain silhouettes in deep ultramarine blue and white, steam train crossing a stone viaduct in the middle ground, geometric graphic style with limited palette of ultramarine, red, cream, and gold, illegible placeholder lettering at top, slight print registration imperfection visible\"}")
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)
}
Create a vertical launch poster for a fictional design conference called 'FRAME 2026'. Large headline: 'FRAME 2026'. Subtitle: 'DESIGNING WITH MACHINE IMAGINATION'. Clean Swiss grid layout, off-white textured background, black typography, one red geometric accent shape, generous negative space, perfectly legible text, no extra words, no watermark. Aspect ratio 9:16.
A clean infographic titled 'HOW IMAGE PROMPTS WORK' with five labeled steps arranged horizontally: 'Scene', 'Subject', 'Text', 'Composition', 'Constraints'. Flat editorial icons for each step, directional arrows between them, high contrast design, white background, readable sans-serif labels, consistent spacing throughout, no extra text, no watermark. 16:9 aspect ratio.
A stylish movie poster with the title 'MIDNIGHT ECHO' in bold art deco typography at the top. A silhouetted figure standing in a neon-lit rain-soaked alley below. 'Coming Summer 2026' in smaller text at the bottom. Moody teal and magenta color scheme. Dramatic backlighting creating long shadows. Film noir atmosphere.
curl -X POST https://runapi.ai/api/v1/ideogram_v3/text_to_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "ideogram-v3-text-to-image",
"prompt": "A stylish movie poster with the title 'MIDNIGHT ECHO' in bold art deco typography at the top. A silhouetted figure standing in a neon-lit rain-soaked alley below. 'Coming Summer 2026' in smaller text at the bottom. Moody teal and magenta color scheme. Dramatic backlighting creating long shadows. Film noir atmosphere."
}
JSON
A minimalist album cover with the title 'SOFT SIGNALS' in centered elegant serif typography, artist name 'MIRA VALE' in smaller tracking below, muted blue handmade paper texture background, a small silver line illustration of a radio tower centered between the text, elegant spacing throughout, no extra text, no logo. Square 1:1 format.
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": "A minimalist album cover with the title 'SOFT SIGNALS' in centered elegant serif typography, artist name 'MIRA VALE' in smaller tracking below, muted blue handmade paper texture background, a small silver line illustration of a radio tower centered between the text, elegant spacing throughout, no extra text, no logo. Square 1:1 format."
}
JSON
A bookstore window poster reading 'READ MORE SLOWLY' in large serif type with a smaller line 'SPRING READING WEEK' beneath it, warm evening street reflections visible in the glass surface, cream paper texture, all typography perfectly readable, no extra words, no watermark. 4:5 aspect ratio.
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": "A bookstore window poster reading 'READ MORE SLOWLY' in large serif type with a smaller line 'SPRING READING WEEK' beneath it, warm evening street reflections visible in the glass surface, cream paper texture, all typography perfectly readable, no extra words, no watermark. 4:5 aspect ratio."
}
JSON
Replace 'GALACTIC ODYSSEY' with 'FLUX KONTEXT' while keeping the same font style, size, color, and position. Maintain the exact same background, composition, and all other visual elements unchanged.
curl -X POST https://runapi.ai/api/v1/flux_kontext/text_to_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "flux-kontext-pro",
"prompt": "Replace 'GALACTIC ODYSSEY' with 'FLUX KONTEXT' while keeping the same font style, size, color, and position. Maintain the exact same background, composition, and all other visual elements unchanged."
}
JSON