mcpField
E
each-sense

each-sense

github.com/eachlabsクリエイティブ・メディア44200 回インストール今日更新
リポジトリ

each-sense について

each::senseは、クリエイター向けの生成メディアAIエージェントです。単一のインターフェースで画像、動画、音声、3Dコンテンツを生成でき、ウェブ検索や会話の記憶、複数段階のワークフローにも対応します。

主な機能

  1. 01画像、動画、音声、3Dコンテンツの生成
  2. 02単一インターフェースで複数のAIモデルを調整
  3. 03複数段階のワークフロー構築
  4. 04セッション記憶による反復作業
  5. 05実行計画の提示や確認質問

活用シーン

  1. 01マーケティング素材や広告クリエイティブの制作
  2. 02EC向け商品画像の生成
  3. 03ソーシャルメディア動画の制作
  4. 04複数モデルを組み合わせた創作ワークフロー

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/eachlabs/skills --skill each-sense

インストール後、Claude Code で/each-senseを入力して読み込まれたか確認します。

同梱ファイルreferences/SSE-EVENTS.md

詳細

each::sense - 生成メディアのインテリジェントレイヤー

each::sense は、画像、動画、音声、3D モデルの生成、ワークフローの構築、ウェブ検索、会話形式のやり取りが可能な OpenAI 互換の AI エージェントです。単一の統合インターフェースを通じて、500 以上の AI モデルをオーケストレーションします。

each::sense 自体は完全無料です。料金が発生するのは、使用するモデルに対してのみです。

ユーザーが次のものを必要としている場合に、each::sense をお使いください:

  • マーケティング素材や広告クリエイティブ
  • 商品画像や E コマース向けビジュアル
  • 動画コンテンツ(広告、UGC、ソーシャルメディア)
  • 音声や音楽の生成
  • あらゆるクリエイティブコンテンツの生成
  • 複数の AI モデルを組み合わせたマルチステップのワークフロー

認証

Header: X-API-Key: <your-api-key>

OpenAI SDK 互換の認証にも対応しています:

Header: Authorization: Bearer <your-api-key>

API キーは eachlabs.ai で取得してください。

EACHLABS_API_KEY 環境変数を設定してください。

ベース URL

https://eachsense-agent.core.eachlabs.run

エンドポイント

メソッドパス用途
POST/v1/chat/completionsメインのチャットエンドポイント
POST/workflowワークフロービルダー
GET/v1/models利用可能なモデルの一覧
GET/memory?session_id={id}セッションメモリの取得
DELETE/memory?session_id={id}セッションメモリの消去
GET/sessionsすべてのセッションの一覧

クイックスタート

curl を使用する場合
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a portrait of a woman with golden hour lighting"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
Python(OpenAI SDK)を使用する場合
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_EACHLABS_API_KEY",
    base_url="https://eachsense-agent.core.eachlabs.run/v1"
)

# Non-streaming
response = client.chat.completions.create(
    model="eachsense/beta",
    messages=[{"role": "user", "content": "Generate a sunset landscape"}],
    stream=False
)
print(response.generations)  # List of media URLs

# Streaming
stream = client.chat.completions.create(
    model="eachsense/beta",
    messages=[{"role": "user", "content": "Generate a sunset landscape"}],
    stream=True
)
for chunk in stream:
    eachlabs_data = chunk.model_extra.get("eachlabs")
    if eachlabs_data:
        event_type = eachlabs_data.get("type")
        if event_type == "generation_response":
            print(eachlabs_data["generations"])
JavaScript(OpenAI SDK)を使用する場合
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "YOUR_EACHLABS_API_KEY",
  baseURL: "https://eachsense-agent.core.eachlabs.run/v1"
});

// Non-streaming
const response = await client.chat.completions.create({
  model: "eachsense/beta",
  messages: [{ role: "user", content: "Generate a sunset landscape" }],
  stream: false
});
console.log(response.generations);

// Streaming
const stream = await client.chat.completions.create({
  model: "eachsense/beta",
  messages: [{ role: "user", content: "Generate a sunset landscape" }],
  stream: true
});
for await (const chunk of stream) {
  const eachlabs = chunk.eachlabs;
  if (eachlabs?.type === "generation_response") {
    console.log(eachlabs.generations);
  }
}

リクエストスキーマ

{
  "messages": [{"role": "user", "content": "string (required) - User's request"}],
  "model": "string (optional, default: 'eachsense/beta')",
  "stream": "boolean (optional, default: true) - Enable SSE streaming",
  "session_id": "string (optional) - Session ID for conversation history and multi-turn chats",
  "mode": "string (optional, default: 'max') - Quality mode: 'max' or 'eco'",
  "behavior": "string (optional, default: 'agent') - Behavior: 'agent', 'plan', or 'ask'",
  "image_urls": "array[string] (optional) - Image URLs for editing/processing (max 4)",
  "workflow_id": "string (optional) - Execute specific workflow",
  "version_id": "string (optional) - Workflow version",
  "web_search": "boolean (optional, default: true) - Enable/disable web search",
  "enable_safety_checker": "boolean (optional, default: true) - Set to false to allow NSFW content generation"
}
パラメーターの詳細
パラメーター型デフォルト説明
messagesarrayrequiredrole と content を含むチャットメッセージ
modelstring"eachsense/beta"モデル識別子
streambooleantrueSSE ストリーミングを有効にします
session_idstringnull会話履歴用のセッション ID。以前のチャットの続行、追加説明への対応、出力の反復的な調整に使用します
modestring"max"max = 最高品質(プレミアムモデル)、eco = 最速/最安
behaviorstring"agent"agent = 自動実行、plan = 最初にプランを表示、ask = 最初に確認
image_urlsarraynull処理/編集する画像の URL(最大 4 件)
workflow_idstringnull特定のワークフローを実行します
version_idstringnullワークフローのバージョン。workflow_id と併用します
web_searchbooleantrue情報のウェブ検索を許可します
enable_safety_checkerbooleantruefalse に設定すると、NSFW コンテンツの生成が許可されます

OpenAI SDK の追加パラメーター: OpenAI SDK を使用する場合は、標準以外のパラメーターを extra_body 経由で渡します:

response = client.chat.completions.create(
    model="eachsense/beta",
    messages=[{"role": "user", "content": "Generate a quick sketch"}],
    extra_body={"mode": "eco", "session_id": "my-session"},
    stream=False
)

非ストリーミングレスポンス

{
  "id": "chatcmpl-123",
  "object": "chat.completion",
  "choices": [{"message": {"role": "assistant", "content": "Here's your image..."}}],
  "generations": ["https://cdn.example.com/image.png"],
  "task_id": "task-456",
  "session_id": "my-session"
}

モード

MAX モード(デフォルト)

プレミアム品質のモデル(flux-2-max、veo-3 など)を使用します。最終出力、クライアント向けの作業、品質を最優先する場合に最適です。処理時間:10~300 秒。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a product shot"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
ECO モード

高速で費用対効果の高いモデル(flux-2-pro、veo3-1-fast など)を使用します。プロトタイピング、ドラフト、大量生成に最適です。処理時間:5~180 秒。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a product shot"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco"
  }'

動作モード

Agent(デフォルト)

リクエストを自動的に実行し、最適なモデルを選択して、すぐに出力を生成します。

{
  "messages": [{"role": "user", "content": "Generate a sunset video"}],
  "model": "eachsense/beta",
  "behavior": "agent"
}
Plan

実行前に、所要時間とコストの見積もりを含む実行プランを表示します。アプローチを確認したい複雑なリクエストに適しています。

{
  "messages": [{"role": "user", "content": "Create a marketing video for my bakery"}],
  "model": "eachsense/beta",
  "behavior": "plan"
}
Ask

処理を進める前に、必ず確認の質問をします。最大限に制御したい場合に適しています。

{
  "messages": [{"role": "user", "content": "Generate a portrait"}],
  "model": "eachsense/beta",
  "behavior": "ask"
}

セッション管理

session_id を使用すると、複数のリクエストにわたって会話履歴とコンテキストを保持できます。これにより、次のことが可能になります:

  • 複数ターンの会話:コンテキストを繰り返さずに、以前のリクエストへの追加依頼ができます
  • 反復的な調整:以前に生成したコンテンツの変更を依頼できます
  • 確認のやり取り:clarification_needed イベントに応答し、会話を続けられます
  • コンテキストの把握:AI が以前の生成内容、設定、指示を記憶します
セッション制限
指標制限
アイドルタイムアウト15 minutes
セッション TTL30 days
セッションあたりのメッセージ数50

セッションは、API キーと session_id の組み合わせごとに管理されます。異なる API キーから他のキーのセッションにアクセスすることはできません。

セッション管理エンドポイント
# Retrieve session memory
curl https://eachsense-agent.core.eachlabs.run/memory?session_id=my-session \
  -H "X-API-Key: $EACHLABS_API_KEY"

# Clear session memory
curl -X DELETE https://eachsense-agent.core.eachlabs.run/memory?session_id=my-session \
  -H "X-API-Key: $EACHLABS_API_KEY"

# List all sessions
curl https://eachsense-agent.core.eachlabs.run/sessions \
  -H "X-API-Key: $EACHLABS_API_KEY"
例:反復生成
# First request - generate initial image
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a logo for a coffee shop called Brew Lab"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "logo-project-001"
  }'

# Follow-up - modify the result (same session_id)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Make it more minimalist and change the color to dark green"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "logo-project-001"
  }'

# Another follow-up - request variation (same session_id)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create 3 variations of this logo"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "logo-project-001"
  }'
例:追加確認への対応
# Ambiguous request - AI will ask for clarification
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Edit this image"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "edit-task-001",
    "image_urls": ["https://example.com/photo.jpg"]
  }'
# Response: clarification_needed event asking what edit to make

# Respond to clarification (same session_id)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background and make it transparent"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "edit-task-001",
    "image_urls": ["https://example.com/photo.jpg"]
  }'

ユースケースの例

1. 画像生成
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a professional headshot of a business executive, studio lighting"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
2. 動画生成
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a 5 second video of a sunset over the ocean"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
3. 画像編集(アップロードした画像を使用)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from this image"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'
4. 画像から動画へのアニメーション化
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Animate this image with gentle camera movement"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/landscape.jpg"]
  }'
5. 商品写真
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a product shot of a coffee mug on a wooden table with morning light"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
6. マーケティング素材
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a social media ad for a fitness app, show someone working out with energetic vibes"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
7. 複雑なワークフロー(UGC 動画)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a 30 second UGC video with a consistent presenter explaining why fitness is important. The presenter is a 30-year-old fit woman with brown hair in workout clothes, gym background."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
8. ワークフロービルダー
curl -X POST https://eachsense-agent.core.eachlabs.run/workflow \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "message": "Create a workflow that generates an image and then upscales it",
    "stream": true,
    "session_id": "my-session"
  }'

SSE レスポンス形式

エンドポイントは、OpenAI chat.completion.chunk 形式と eachlabs 拡張フィールドでラップされた Server-Sent Events(SSE)を返します。

各イベントの形式は次のとおりです。

data: {"id":"chatcmpl-123","object":"chat.completion.chunk","choices":[{"delta":{"content":""}}],"eachlabs":{"type":"event_type",...}}\n\n

ストリームは次の形式で終了します。

data: [DONE]\n\n
イベントタイプ(全 18 種類)

AI の推論:

イベント説明
thinking_deltaリアルタイムの AI 推論
text_responseテキストコンテンツ(説明、回答)

ツール操作:

イベント説明
status実行中の操作(tool_name、parameters を含む)
tool_call呼び出されるツールの詳細
message情報メッセージ
progresspercent を含む進捗状況の更新

生成:

イベント説明
generation_response生成されたメディアの URL(url、generations[]、model、execution_time_ms)

対話:

イベント説明
clarification_neededAI が追加情報を必要としている状態(question、options[]、context)

ウェブ検索:

イベント説明
web_search_query実行中のウェブ検索
web_search_citationstitle、url、snippet を含む引用

ワークフロー:

イベント説明
workflow_created新しいワークフローが作成されました
workflow_fetched既存のワークフローが読み込まれました
workflow_builtワークフロー定義が構築されました
workflow_updatedワークフローが API に送信されました

実行:

イベント説明
execution_startedワークフローの実行が開始されました
execution_progressステップの進捗(step_id、completed_steps、total_steps)
execution_completedワークフローが完了しました(output、all_outputs、total_time_ms)

終了:

イベント説明
completeタスクが完了しました(status:ok/error/clarification_needed、generations[])
errorエラーが発生しました(message、error_code)
一般的なイベントの流れ
thinking_delta → status → status → text_response → generation_response → complete → [DONE]
主なイベントの例
generation_response
{
  "type": "generation_response",
  "url": "https://storage.eachlabs.ai/outputs/abc123.png",
  "generations": ["https://storage.eachlabs.ai/outputs/abc123.png"],
  "model": "flux-2-max",
  "execution_time_ms": 8500
}
clarification_needed
{
  "type": "clarification_needed",
  "question": "What type of edit would you like to make to this image?",
  "options": ["Remove the background", "Apply a style transfer", "Upscale to higher resolution"],
  "context": "I can see your image but need to know the specific edit you want."
}
complete
{
  "type": "complete",
  "task_id": "chat_1708345678901",
  "status": "ok",
  "generations": ["https://storage.eachlabs.ai/outputs/abc123.png"],
  "model": "flux-2-max"
}

エージェントツール

ツール種類用途
search_models非終端ユースケースに合ったモデルを検索
get_model_details非終端モデルの入力スキーマを取得
web_search非終端ウェブ検索
vision_preprocessor非終端画像コンテンツを分析
execute_model終端モデルの予測を実行
generate_text終端テキストレスポンスを生成
create_workflow非終端ワークフローを作成
trigger_workflow非終端ワークフローを実行
build_workflow非終端ワークフロー定義を構築
check_execution非終端実行状況を確認
ask_clarification終端追加確認を求める

モデル早見表

用途モデルスラッグ速度
最高画質の画像flux-2-max中
高速な画像生成flux-2-pro高速
画像内のテキスト/ロゴflux-kontext-pro高速
迅速なプロトタイピングnano-banana-pro非常に高速
写実的な画像gemini-imagen-4中
芸術的/創造的な画像seedream-v4-5中
最高品質の動画(音声付き)veo-3低速
高速な動画生成veo3-1-fast高速
高品質な動画kling-3-0中
画像から動画への変換kling-2-1-image-to-video中
指示に基づく編集flux-2-edit高速
背景の削除eachlabs-bg-remover-v1非常に高速
画像のアップスケーリングtopaz-upscale-image高速
顔の入れ替えkling-face-swap高速
テキスト読み上げelevenlabs-tts非常に高速
音楽生成mureka-generate-music中

モデルの別名

自動的に解決される、一般的な略称です。

別名解決先
Flux Maxflux-2-max
Flux Proflux-2-pro
Flux Editflux-2-edit
Flux Fillflux-fill-pro
Flux Kontextflux-kontext-pro
Imagen 4gemini-imagen-4
Veo 3veo-3
Kling 3kling-3-0
Sorasora-2-pro
ElevenLabselevenlabs-tts

エラー処理

HTTP エラー
コード応答原因
401{"error": "Invalid or missing API key"}API キーがないか、無効です
422{"error": "..."}必須フィールドがないか、パラメーターが無効です
429{"error": "..."}レート制限に達しました。指数バックオフを実装してください
500{"error": "..."}内部サーバーエラーです。バックオフして再試行してください
ストリーミングエラー
{"type": "error", "message": "Failed to execute model: Invalid parameters", "error_code": "..."}
エラーメッセージ原因解決策
Model execution failed基盤モデルのエラーモデルのパラメーターを確認してください
Session not foundセッションが無効か、期限切れです新しいセッションを作成してください
Workflow execution timeout15 分の制限を超過しました小さなワークフローに分割してください

再試行戦略: 429 および 500 エラーには指数バックオフを使用します。2^attempt 秒待機し、最大 3 回まで再試行してください。

タイムアウト

クライアントのタイムアウト推奨値: HTTP クライアントのタイムアウトは最低 10 分に設定してください。複雑なユースケースでは、複数の AI モデルを順番に実行する必要がある場合があります(例:UGC 動画では 10 回以上のモデル実行)。

操作タイムアウト
HTTP リクエスト300 秒
ストリーミングのアイドル時間15 分
画像生成10~60 秒
動画生成60~600 秒
ワークフロー実行15 分
# curl example with 10 minute timeout
curl --max-time 600 -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a complex UGC video..."}],
    "model": "eachsense/beta",
    "stream": true
  }'

レート制限

プランリクエスト/分同時実行数
Free102
Pro6010
Enterprise30050

レート制限ヘッダー:X-RateLimit-Limit、X-RateLimit-Remaining、X-RateLimit-Reset

入力検証の制限

入力タイプ制約
1 リクエストあたりの画像数最大 4 枚
画像形式JPEG、PNG、WebP、GIF
画像サイズ最大 20MB、64~8192px
動画形式MP4、WebM、MOV
動画サイズ最大 500MB、10 分
音声形式MP3、WAV、M4A、OGG
音声サイズ最大 50MB、5 分
プロンプトの長さ最大 10,000 文字
セッションメモリ最大 50 メッセージ

ベストプラクティス

  1. コンテキストを維持するため、複数ターンの会話には session_id を使用します
  2. プロトタイピングやコスト重視のアプリケーションには ECO モード を使用します
  3. 確認イベントを処理します。同じセッション内で、要求された情報を返してください
  4. 明確なプロンプトを入力します。スタイル、雰囲気、構図を具体的に指定してください
  5. SSE イベントを監視します。進捗には thinking_delta、出力には generation_response を使用します
  6. より簡単に統合するには OpenAI SDK を使用します。each::sense のベース URL を指定するだけです
  7. 再試行ロジックを実装します。一時的なエラーには指数バックオフを使用してください

コメント