HERMES + IMAGEN 4

Hermes Agent で Imagen 4 を使う。

Imagen 4 は Google DeepMind の画像生成モデルで、正確なテキスト描画と高いプロンプト忠実度を誇ります。Hermes Agent はチャットで使用している RunAPI カスタムプロバイダーエンドポイントを通じて呼び出します。ComfyUI や GPU セットアップは不要です。

1 つの API キー · テキストから画像エンドポイント · 非同期タスクポーリング
Use RunAPI to generate an image with Google Imagen 4 from Hermes Agent.

Requirements:
- Read the API key from RUNAPI_API_KEY. Do not hardcode the key.
- Use the custom:runapi provider already configured in Hermes Agent.
- Send a POST request to https://runapi.ai/v1/text_to_image.
- Set the model to imagen-4.
- Write a descriptive prompt for the image you want.
- The response returns a task_id. Poll the task status endpoint until the task completes.
- When the task is complete, retrieve the image URL from the response.
curl -X POST https://runapi.ai/v1/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "imagen-4",
    "prompt": "A ceramic coffee mug on a wooden table with morning light, the text HELLO printed on the side in serif font, photorealistic"
  }'
{
  "task_id": "tsk_abc123",
  "status": "pending",
  "model": "imagen-4"
}
curl コマンドをコピーしてテスト imagen-4
仕組み

3 ステップで Hermes Agent で Imagen 4 を使う

1

RunAPI を設定する

RUNAPI_API_KEY 環境変数を設定します。Hermes Agent でチャット用に RunAPI を custom:runapi プロバイダーとして設定済みであれば、同じキーと base_url で画像生成が可能です。

export RUNAPI_API_KEY=runapi_xxx
2

Imagen 4 を呼び出す

model を imagen-4 に設定して text_to_image エンドポイントに POST リクエストを送ります。説明的なプロンプトを含め、必要に応じて aspect_ratio や negative_prompt を追加します。

POST /v1/text_to_image
3

結果を取得する

レスポンスには task_id が含まれます。ステータスが completed に変わるまでタスクステータスエンドポイントをポーリングします。完成したレスポンスに生成された画像 URL が含まれます。

task_id: tsk_abc123
パラメーター

Imagen 4 API パラメーター

パラメータ 説明
model string 必須。imagen-4、imagen-4-fast、または imagen-4-ultra。
prompt string 生成したい画像のテキスト説明。
aspect_ratio string 省略可。例:1:1、16:9、9:16。
negative_prompt string 省略可。生成画像に含めたくないもの。

Hermes AgentのImagen 4とは?

Google DeepMindのImagen 4は横断比較でトップクラスにランクされ、テキストレンダリングがクリアで多くの競合製品よりプロンプト追従性が高いです。3段階システム(Fast・Standard・Ultra)により画像ごとにコストと品質のトレードオフを選択できます。Hermes AgentはRunAPI custom provider経由で呼び出し、Vertex AIプロジェクトやGCPアカウントは不要です。

Imagen 4の活用例

チームに優しい画像生成

Imagen 4の高いプロンプト追従性により、非技術系メンバーがプロンプトを調整して使える画像を生成でき、プロンプトエンジニアリングの専門知識は不要です。

冒険的・エディトリアル写真

正確なライティング・被写界深度・自然な色調でエディトリアル品質の写真——風景・料理・建築・ライフスタイル——を生成します。

コスト最適化されたバッチ生成

単一ワークフロー内でティアを混在させ——下書きラウンドはFast(1枚$0.02)、最終選択はUltra——最終出力品質を犠牲にせずバッチコストを抑えます。

FAQ

Imagen 4 + Hermes Agent よくある質問

Hermes Agent 全般セットアップ

まだ設定していませんか?Hermes Agent の RunAPI セットアップガイドから始めてください。

Hermes Agent セットアップガイド →

Imagen 4 モデルカタログ

Imagen 4 の全バリアント、料金、API ドキュメントを確認します。

Imagen 4 モデル →

今すぐ Hermes Agent で Imagen 4 を試す。

無料の RunAPI キーを取得し、custom:runapi プロバイダーを設定して、Google Imagen 4 で画像生成を始めましょう。