It looks like you may prefer a different language. Switch anytime.

Image Google

Imagen 4 API

透過 RunAPI 使用 Imagen 4 API,包含 model skill、統一驗證與按用量計費。

runapi.ai
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
@runapi.ai/imagen-4 v1
OVERVIEW

關於 Imagen 4

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.

供應商
Google
模式
Image

比較所有 API 變體

變體 計費 定價
imagen-4 call $0.080 查看 →
imagen-4-fast call $0.040 查看 →
imagen-4-pro-remix-image call $0.240 查看 →
imagen-4-ultra call $0.120 查看 →
PRICING

Imagen 4 定價

Endpoint 解析度 時長 價格
text_to_image $0.08 / image

以下為 imagen-4 的定價。其他變體保留各自的 endpoint 定價。

Agent 整合

透過 Agent 執行 Imagen 4

運作方式

開始使用 Imagen 4

  1. 選擇模型

    挑選符合輸出類型、品質門檻與延遲目標的模型與變體。

  2. 設定

    設定 RunAPI key,並在 coding workspace 安裝 model skill。

  3. 開發

    使用 skill 指引,在你的 app 內加入模型功能。

  4. 接收

    透過 task ID 查詢、在支援時串流,或處理 webhook callback。

CONTEXT

Imagen 4 API 是甚麼?

Imagen 4 係 Google 最新嘅文字生成圖像模型,提供逼真效果同廣泛風格支援。透過 RunAPI,每個 Imagen 4 變體都共用一把 API 金鑰。

供應商
Google
查看全部 →
模式
Image
瀏覽模型 →

為何透過 RunAPI 使用 Imagen 4 API

一個驗證,對應所有 provider

一組 RunAPI key 即可解鎖整個 catalog。無需分開帳戶,亦無需為每個整合輪換密鑰。

統一定價與計費

按次以 USD 收費,每月結算。失敗的生成不會收費。

內含 schema 的 skill

型別化 schema 與 setup 備註打包在 model skill 內,讓實作從正確契約開始。

Imagen 4 常見問題

What is the maximum output resolution?

Up to 2K resolution natively. The ultra variant pushes quality further for brand and marketing use.

How do the fast, standard, and ultra variants differ?

Fast generates in ~2.7 seconds for drafts. Standard balances quality and cost. Ultra delivers maximum photorealism for final production assets.

How accurate is text rendering in Imagen 4?

Imagen 4 has strong typography support — it reliably renders short text like brand names, labels, and headlines within images.

What is the pro remix image variant for?

It takes source images as style or content seeds and generates a new image guided by both the sources and your text prompt.

Does Imagen 4 support transparent backgrounds?

Not natively. For transparent backgrounds, generate the image and then use a background removal tool like Recraft.

我應該先用邊個版本?

先選最平而且符合你質素要求的版本。大多數團隊會先用快速版本,之後再升級到 pro 用於正式生產。

相似模型

如果你鍾意 Imagen 4 API,可以試吓呢些

開始用 Imagen 4 API 開發。