一個驗證,對應所有 provider
一組 RunAPI key 即可解鎖整個 catalog。無需分開帳戶,亦無需為每個整合輪換密鑰。
It looks like you may prefer a different language. Switch anytime.
透過 RunAPI 使用 Imagen 4 API,包含 model skill、統一驗證與按用量計費。
curl -X POST https://runapi.ai/api/v1/imagen_4/text_to_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "imagen-4-ultra",
"prompt": "Generate a product hero image of a matte-black water bottle on a beige stone surface, soft side light, 2K."
}'
import { Imagen4Client } from "@runapi.ai/imagen-4";
const client = new Imagen4Client();
const result = await client.textToImage.run({
model: "imagen-4-ultra",
prompt: "Generate a product hero image of a matte-black water bottle on a beige stone surface, soft side light, 2K.",
});
<?php
require __DIR__ . "/vendor/autoload.php";
use RunApi\Imagen4\Imagen4Client;
$client = new Imagen4Client();
$result = $client->textToImage->run([
'model' => 'imagen-4-ultra',
'prompt' => 'Generate a product hero image of a matte-black water bottle on a beige stone surface, soft side light, 2K.',
]);
require "runapi/imagen_4"
client = RunApi::Imagen4::Client.new
result = client.text_to_image.run(
model: "imagen-4-ultra",
prompt: "Generate a product hero image of a matte-black water bottle on a beige stone surface, soft side light, 2K."
)
npx skills add runapi-ai/imagen-4 -g
# Claude Code
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
# Codex
codex plugin install runapi-mcp@agents
# Cursor / Windsurf / VS Code
npx @runapi.ai/mcp init cursor
Imagen 4 is Google's photorealistic image generation model with strong typography rendering and support for resolutions up to 2K. It produces detailed, true-to-life images with accurate color and lighting.
| Endpoint | 解析度 | 時長 | 價格 | |
|---|---|---|---|---|
| text_to_image | — | — | $0.08 / image |
以下為 imagen-4 的定價。其他變體保留各自的 endpoint 定價。
挑選符合輸出類型、品質門檻與延遲目標的模型與變體。
設定 RunAPI key,並在 coding workspace 安裝 model skill。
使用 skill 指引,在你的 app 內加入模型功能。
透過 task ID 查詢、在支援時串流,或處理 webhook callback。
一組 RunAPI key 即可解鎖整個 catalog。無需分開帳戶,亦無需為每個整合輪換密鑰。
按次以 USD 收費,每月結算。失敗的生成不會收費。
型別化 schema 與 setup 備註打包在 model skill 內,讓實作從正確契約開始。
Up to 2K resolution natively. The ultra variant pushes quality further for brand and marketing use.
Fast generates in ~2.7 seconds for drafts. Standard balances quality and cost. Ultra delivers maximum photorealism for final production assets.
Imagen 4 has strong typography support — it reliably renders short text like brand names, labels, and headlines within images.
It takes source images as style or content seeds and generates a new image guided by both the sources and your text prompt.
Not natively. For transparent backgrounds, generate the image and then use a background removal tool like Recraft.
先選最平而且符合你質素要求的版本。大多數團隊會先用快速版本,之後再升級到 pro 用於正式生產。