HERMES + FLUX KONTEXT

Hermes Agent で Flux Kontext を使う。

Flux Kontext(Black Forest Labs 製)はキャラクターの一貫性を保ちながらテキスト誘導の画像編集・生成を行います。Hermes Agent は custom:runapi プロバイダーを通じて RunAPI 経由で呼び出します。チャットで設定済みのキーと base URL がそのまま使えます。

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

Requirements:
- Use the custom:runapi provider already configured in Hermes Agent
- Call the RunAPI text_to_image endpoint at https://runapi.ai/v1/text_to_image
- Set model to "flux-kontext-pro"
- The RUNAPI_API_KEY environment variable provides authorization
- The response is async — poll the task status endpoint until the task completes, then retrieve the image URL
curl -X POST https://runapi.ai/v1/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-kontext-pro",
    "prompt": "a matte-black water bottle on a beige stone surface, soft side light, studio photography"
  }'
{
  "task_id": "tsk_abc123",
  "status": "pending",
  "model": "flux-kontext-pro"
}
curl コマンドをコピーしてテスト flux-kontext
仕組み

3 ステップで Hermes Agent で Flux Kontext を使う

1

RunAPI を設定する

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

export RUNAPI_API_KEY=runapi_xxx
2

Flux Kontext を呼び出す

model を flux-kontext-pro に設定して text_to_image エンドポイントに POST リクエストを送ります。生成したい画像を説明するテキストプロンプトを含めてください。インコンテキスト編集には image_url を渡します。

text_to_image
3

結果を取得する

エンドポイントはタスク ID を返します。ステータスが completed に変わるまでタスクステータスエンドポイントをポーリングし、レスポンスから生成された画像 URL を取得します。

task_id: tsk_abc123
パラメーター

Flux Kontext API パラメーター

パラメータ 説明
model string 必須。flux-kontext-pro または flux-kontext-max。
prompt string 生成または編集のテキスト指示。
image_url string インコンテキスト編集用のソース画像 URL。
aspect_ratio string 省略可。出力アスペクト比。

Hermes AgentのFlux Kontextとは?

Flux KontextはBlack Forest Labsによる120億パラメータの整流フロートランスフォーマー上に構築された命令ベースの画像エディターです。複数ラウンドの編集をサポートし、各ステップで前のステップのコンテキストを保持します。Hermes AgentはRunAPIカスタムproviderエンドポイント経由で呼び出し、マルチステップ編集パイプラインを簡単に構築できます。

Flux Kontextの活用例

マルチラウンド編集ワークフロー

複数の編集ステップを順番に連結します——画像を生成し、ライティングを調整し、背景を差し替え、テキストを追加——各ステップが前の結果の上に積み重なります。

スタイル変換パイプライン

被写体の構図を維持したまま写真を絵画・スケッチ・アニメスタイルに変換し、同じコンテンツのスタイルバリエーション制作に活用します。

天気・ライティングの調整

シーン全体を最初から再生成することなく、既存写真の時間帯・天気・ライティング設定を変更します。

FAQ

Flux Kontext + Hermes Agent よくある質問

Hermes Agent 全般セットアップ

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

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

Flux Kontext モデルカタログ

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

Flux Kontext モデル →

今すぐ Hermes Agent で Flux Kontext を試す。

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