Back to skills
SkillHub ClubGrow & DistributeFull StackData / AITech Writer

each-sense

each::sense is the intelligent layer for generative media. A unified AI agent that generates marketing assets, ads, product images, videos, and creative content. It knows all AI models and automatically selects the best one for your task. Use for any creative content generation request.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
3,084
Hot score
99
Updated
March 20, 2026
Overall rating
C4.0
Composite score
4.0
Best-practice grade
B73.6

Install command

npx @skill-hub/cli install openclaw-skills-each-sense

Repository

openclaw/skills

Skill path: skills/eftalyurtseven/each-sense

each::sense is the intelligent layer for generative media. A unified AI agent that generates marketing assets, ads, product images, videos, and creative content. It knows all AI models and automatically selects the best one for your task. Use for any creative content generation request.

Open repository

Best for

Primary workflow: Grow & Distribute.

Technical facets: Full Stack, Data / AI, Tech Writer.

Target audience: everyone.

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: openclaw.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install each-sense into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/openclaw/skills before adding each-sense to shared team environments
  • Use each-sense for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: each-sense
description: each::sense is the intelligent layer for generative media. A unified AI agent that generates marketing assets, ads, product images, videos, and creative content. It knows all AI models and automatically selects the best one for your task. Use for any creative content generation request.
metadata:
  author: eachlabs
  version: "1.0"
---

# each::sense - Intelligent Layer for Generative Media

each::sense is a unified AI agent that can generate images, videos, build workflows, search the web, and hold conversational interactions. It uses Claude as the orchestrator with access to 200+ AI models.

**Use each::sense when the user needs:**
- Marketing assets and ad creatives
- Product images and e-commerce visuals
- Video content (ads, UGC, social media)
- Any creative content generation
- Multi-step workflows combining multiple AI models

## Authentication

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

Get your API key at [eachlabs.ai](https://eachlabs.ai) → API Keys.

Set the `EACHLABS_API_KEY` environment variable.

## Base URL

```
https://sense.eachlabs.run
```

## Quick Start

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Generate a portrait of a woman with golden hour lighting",
    "mode": "max"
  }'
```

The endpoint returns Server-Sent Events (SSE) with real-time progress and the final generated output.

## Request Schema

```json
{
  "message": "string (required) - User's request",
  "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'",
  "model": "string (optional, default: 'auto') - Model slug or 'auto' for AI selection",
  "image_urls": "array[string] (optional) - Image URLs for editing/processing",
  "workflow_id": "string (optional) - Enables workflow building mode",
  "version_id": "string (optional) - Required with workflow_id",
  "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"
}
```

### Parameter Details

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `message` | string | required | Natural language request |
| `session_id` | string | null | Session ID for conversation history. Use to continue previous chats, handle clarifications, and iteratively refine outputs |
| `mode` | string | "max" | `max` = best quality, `eco` = fastest/cheapest |
| `behavior` | string | "agent" | `agent` = auto-execute, `plan` = explain first, `ask` = clarify first |
| `model` | string | "auto" | Specific model slug or "auto" for AI selection |
| `image_urls` | array | null | URLs of images to process/edit |
| `workflow_id` | string | null | Enables workflow building mode |
| `version_id` | string | null | Workflow version, required with workflow_id |
| `web_search` | boolean | true | Allow web search for information |
| `enable_safety_checker` | boolean | true | Set to false to allow NSFW content generation |

## Modes

Agents can ask users to choose between quality and speed/cost before generating content:
- **"Do you want fast & cheap, or high quality?"**
- **"Quick draft or premium output?"**

### MAX Mode (Default)
Uses the highest quality models available. Best for final outputs, client-facing work, and when quality matters most.

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{"message": "Create a product shot", "mode": "max"}'
```

### ECO Mode
Uses fast, cost-effective models. Best for prototyping, drafts, and high-volume generation.

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{"message": "Create a product shot", "mode": "eco"}'
```

## Behaviors

### Agent (Default)
Automatically executes the request, selecting the best model and generating output.

```json
{"message": "Generate a sunset video", "behavior": "agent"}
```

### Plan
Explains what it will do before executing. Good for complex requests where you want to review the approach.

```json
{"message": "Create a marketing video for my bakery", "behavior": "plan"}
```

### Ask
Always asks clarifying questions before proceeding. Good when you want maximum control.

```json
{"message": "Generate a portrait", "behavior": "ask"}
```

## Session Management

Use `session_id` to maintain conversation history and context across multiple requests. This enables:

- **Multi-turn conversations**: Follow-up on previous requests without repeating context
- **Iterative refinement**: Ask for modifications to previously generated content
- **Clarification flows**: Respond to `clarification_needed` events and continue the conversation
- **Context awareness**: The AI remembers previous generations, preferences, and instructions

### How It Works

Provide any unique string as `session_id` in your requests. All requests with the same `session_id` share conversation history.

```bash
# Use any unique string as session_id
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Generate a portrait",
    "session_id": "my-chat-session-123"
  }'
```

### Example: Iterative Generation

```bash
# First request - generate initial image
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Generate a logo for a coffee shop called Brew Lab",
    "session_id": "logo-project-001"
  }'

# Follow-up - modify the result (same session_id)
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Make it more minimalist and change the color to dark green",
    "session_id": "logo-project-001"
  }'

# Another follow-up - request variation (same session_id)
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Create 3 variations of this logo",
    "session_id": "logo-project-001"
  }'
```

### Example: Handling Clarifications

```bash
# Ambiguous request - AI will ask for clarification
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Edit this image",
    "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://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Remove the background and make it transparent",
    "session_id": "edit-task-001",
    "image_urls": ["https://example.com/photo.jpg"]
  }'
```

### Session Persistence

- Sessions are persisted and can be resumed at any time
- Each session maintains full conversation history
- Use sessions to build chat-like experiences with each::sense
- You control the session ID - use any unique string for related requests

## Use Case Examples

### 1. Image Generation

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Generate a professional headshot of a business executive, studio lighting",
    "mode": "max"
  }'
```

### 2. Video Generation

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Create a 5 second video of a sunset over the ocean",
    "mode": "max"
  }'
```

### 3. Image Editing (with uploaded image)

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Remove the background from this image",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'
```

### 4. Image-to-Video Animation

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Animate this image with gentle camera movement",
    "image_urls": ["https://example.com/landscape.jpg"]
  }'
```

### 5. Direct Model Execution (skip AI selection)

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "A cyberpunk city at night with neon lights",
    "model": "flux-2-max"
  }'
```

### 6. Product Photography

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Generate a product shot of a coffee mug on a wooden table with morning light",
    "mode": "max"
  }'
```

### 7. Marketing Assets

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Create a social media ad for a fitness app, show someone working out with energetic vibes",
    "mode": "max"
  }'
```

### 8. Multi-Turn Conversation

```bash
# First request with a session_id
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Edit this image",
    "session_id": "user-123-chat",
    "image_urls": ["https://example.com/photo.jpg"]
  }'

# Response includes clarification_needed asking what edit to make
# Follow-up with same session_id
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Remove the background",
    "session_id": "user-123-chat",
    "image_urls": ["https://example.com/photo.jpg"]
  }'
```

### 9. Complex Workflow (UGC Video)

```bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "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.",
    "mode": "max"
  }'
```

## SSE Response Format

The endpoint returns Server-Sent Events (SSE) with `Content-Type: text/event-stream`.

Each event has the format:
```
data: {"type": "event_type", ...fields}\n\n
```

Stream ends with:
```
data: [DONE]\n\n
```

### Event Types

| Event | Description |
|-------|-------------|
| `thinking_delta` | AI reasoning in real-time |
| `status` | Current operation being executed |
| `text_response` | Text content (explanations, answers) |
| `generation_response` | Generated media URL |
| `clarification_needed` | AI needs more information |
| `web_search_query` | Web search being executed |
| `web_search_citations` | Citations from search results |
| `workflow_created` | New workflow was created |
| `workflow_fetched` | Existing workflow was loaded |
| `workflow_built` | Workflow definition constructed |
| `workflow_updated` | Workflow pushed to API |
| `execution_started` | Workflow execution began |
| `execution_progress` | Progress update during execution |
| `execution_completed` | Workflow execution finished |
| `tool_call` | Details of tool being called |
| `message` | Informational message |
| `complete` | Final event with summary |
| `error` | An error occurred |

### Key Event Examples

#### generation_response
Generated media URL (the primary output):
```json
{
  "type": "generation_response",
  "url": "https://storage.eachlabs.ai/outputs/abc123.png",
  "generations": ["https://storage.eachlabs.ai/outputs/abc123.png"],
  "total": 1,
  "model": "nano-banana-pro"
}
```

#### clarification_needed
AI needs more information:
```json
{
  "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
Final event with summary:
```json
{
  "type": "complete",
  "task_id": "chat_1708345678901",
  "status": "ok",
  "generations": ["https://storage.eachlabs.ai/outputs/abc123.png"],
  "model": "nano-banana-pro"
}
```

#### error
An error occurred:
```json
{
  "type": "error",
  "message": "Failed to generate image: Invalid aspect ratio"
}
```

## Model Aliases

Common shorthand names that are automatically resolved:

| Alias | Resolves To |
|-------|-------------|
| flux max | flux-2-max |
| flux pro | flux-2-pro |
| gpt image | gpt-image-1-5 |
| nano banana pro | nano-banana-pro |
| seedream | seedream-4-5 |
| gemini imagen | gemini-imagen-4 |
| kling 3 | kling-3-0 |
| veo | veo3-1-text-to-video-fast |
| sora | sora-2 |
| hailuo | hailuo-2-3 |

## Error Handling

### HTTP Errors

| Code | Response | Cause |
|------|----------|-------|
| 401 | `{"detail": "API key is required."}` | Missing or invalid API key |
| 500 | `{"detail": "Error message"}` | Internal server error |
| 503 | `{"detail": "ChatAgent not available"}` | Service temporarily unavailable |

### Streaming Errors

```json
{"type": "error", "message": "Failed to execute model: Invalid parameters"}
```

| Error Message | Cause | Solution |
|--------------|-------|----------|
| `Failed to create prediction: HTTP 422` | Insufficient account balance | Top up at eachlabs.ai |
| `Failed to execute model: Invalid parameters` | Missing/invalid inputs | Check model parameters |
| `Model not found` | Invalid model slug | Use "auto" or valid slug |
| `Workflow execution timed out` | Exceeded 1 hour limit | Split into smaller workflows |

## Timeouts

**Client timeout recommendation:** Set your HTTP client timeout to **minimum 10 minutes**. Complex use cases may require running multiple AI models sequentially (e.g., 10+ model executions for UGC videos), which can take several minutes to complete.

```bash
# curl example with 10 minute timeout
curl --max-time 600 -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{"message": "Create a complex UGC video..."}'
```

**Platform limits:**
- Streaming connections timeout after 1 hour of inactivity
- Workflow executions timeout after 1 hour

## Rate Limits

- Depends on your EachLabs API key tier

## Best Practices

1. **Use session_id** for multi-turn conversations to maintain context
2. **Use ECO mode** for prototyping and cost-sensitive applications
3. **Use specific model** when you know exactly what you want (faster execution)
4. **Handle clarification events** - respond with requested information in the same session
5. **Provide clear prompts** - be specific about style, mood, and composition
6. **Monitor SSE events** - use `thinking_delta` for progress, `generation_response` for output


---

## Skill Companion Files

> Additional files collected from the skill directory layout.

### _meta.json

```json
{
  "owner": "eftalyurtseven",
  "slug": "each-sense",
  "displayName": "Each Sense",
  "latest": {
    "version": "1.0.0",
    "publishedAt": 1772339656260,
    "commit": "https://github.com/openclaw/skills/commit/7223641744d8c5577cb0e93abd149a38056b9485"
  },
  "history": []
}

```

### references/SSE-EVENTS.md

```markdown
# SSE Event Reference

Detailed documentation for all Server-Sent Events (SSE) returned by the each::sense `/chat` endpoint.

## Event Format

Each event follows this format:
```
data: {"type": "event_type", ...fields}\n\n
```

Stream ends with:
```
data: [DONE]\n\n
```

---

## Event Types

### thinking_delta

Claude's reasoning as it streams in real-time. Use this to show users what the AI is thinking.

```json
{
  "type": "thinking_delta",
  "content": "Let me find the best model for portrait generation..."
}
```

| Field | Type | Description |
|-------|------|-------------|
| `content` | string | Incremental thinking text |

---

### status

Current operation being executed. Shows tool usage and parameters.

```json
{
  "type": "status",
  "message": "Searching for image generation models...",
  "tool_name": "search_models",
  "parameters": {"use_case": "text to image portrait"}
}
```

| Field | Type | Description |
|-------|------|-------------|
| `message` | string | Human-readable status message |
| `tool_name` | string | Internal tool being used |
| `parameters` | object | Tool parameters (optional) |

---

### text_response

Text content from the AI (explanations, answers, plans).

```json
{
  "type": "text_response",
  "content": "I'll create a stunning portrait for you with cinematic lighting and a warm mood."
}
```

| Field | Type | Description |
|-------|------|-------------|
| `content` | string | Text response content |

---

### generation_response

Generated media URL (image or video). This is the primary output event.

```json
{
  "type": "generation_response",
  "url": "https://storage.eachlabs.ai/outputs/abc123.png",
  "generations": ["https://storage.eachlabs.ai/outputs/abc123.png"],
  "total": 1,
  "tool_name": "execute_model",
  "model": "nano-banana-pro"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `url` | string | Primary output URL |
| `generations` | array | All generated URLs |
| `total` | number | Total number of generations |
| `tool_name` | string | Tool that generated output |
| `model` | string | Model used for generation |

---

### clarification_needed

AI needs more information to proceed. Present options to the user.

```json
{
  "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",
    "Add or modify elements"
  ],
  "context": "I can see you've uploaded an image, but I need to understand what changes you'd like."
}
```

| Field | Type | Description |
|-------|------|-------------|
| `question` | string | The question to ask the user |
| `options` | array | Suggested options (can be displayed as buttons) |
| `context` | string | Additional context about the clarification |

**Handling:** Display the question and options to the user. Send their response in a follow-up request with the same `session_id`.

---

### web_search_query

Web search being executed.

```json
{
  "type": "web_search_query",
  "query": "best AI video generation models 2024",
  "recency": "month"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `query` | string | Search query |
| `recency` | string | Time filter (day, week, month, year) |

---

### web_search_citations

Citations from web search results.

```json
{
  "type": "web_search_citations",
  "citations": [
    "https://example.com/ai-video-comparison",
    "https://techblog.com/veo3-review"
  ],
  "count": 2
}
```

| Field | Type | Description |
|-------|------|-------------|
| `citations` | array | URLs of sources cited |
| `count` | number | Number of citations |

---

### workflow_created

New workflow was created for complex multi-step generation.

```json
{
  "type": "workflow_created",
  "workflow_id": "wf_abc123",
  "version_id": "v1",
  "input_schema": {
    "properties": {
      "character_description": {
        "type": "text",
        "required": true,
        "default_value": ""
      }
    }
  },
  "steps_count": 5
}
```

| Field | Type | Description |
|-------|------|-------------|
| `workflow_id` | string | Unique workflow identifier |
| `version_id` | string | Workflow version |
| `input_schema` | object | Schema for workflow inputs |
| `steps_count` | number | Number of steps in workflow |

---

### workflow_fetched

Existing workflow was loaded (when `workflow_id` is provided in request).

```json
{
  "type": "workflow_fetched",
  "workflow_name": "Product Video Generator",
  "existing_steps": 3,
  "existing_definition": {...}
}
```

| Field | Type | Description |
|-------|------|-------------|
| `workflow_name` | string | Name of the workflow |
| `existing_steps` | number | Number of existing steps |
| `existing_definition` | object | Current workflow definition |

---

### workflow_built

Workflow definition was constructed.

```json
{
  "type": "workflow_built",
  "steps_count": 4,
  "definition": {
    "version": "v1",
    "input_schema": {...},
    "steps": [...]
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `steps_count` | number | Number of steps |
| `definition` | object | Full workflow definition |

---

### workflow_updated

Workflow was pushed to the EachLabs API.

```json
{
  "type": "workflow_updated",
  "success": true,
  "workflow_id": "wf_abc123",
  "version_id": "v1",
  "definition": {...}
}
```

| Field | Type | Description |
|-------|------|-------------|
| `success` | boolean | Whether update succeeded |
| `workflow_id` | string | Workflow identifier |
| `version_id` | string | Version identifier |
| `definition` | object | Updated definition |

---

### execution_started

Workflow execution has begun.

```json
{
  "type": "execution_started",
  "execution_id": "exec_xyz789",
  "workflow_id": "wf_abc123"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `execution_id` | string | Unique execution identifier |
| `workflow_id` | string | Workflow being executed |

---

### execution_progress

Progress update during workflow execution. Sent approximately every 5 seconds.

```json
{
  "type": "execution_progress",
  "step_id": "step2",
  "step_status": "completed",
  "output": "https://storage.eachlabs.ai/outputs/step2.png",
  "model": "nano-banana-pro",
  "completed_steps": 2,
  "total_steps": 5
}
```

| Field | Type | Description |
|-------|------|-------------|
| `step_id` | string | Current step identifier |
| `step_status` | string | Step status (running, completed, failed) |
| `output` | string | Step output URL (if available) |
| `model` | string | Model used for this step |
| `completed_steps` | number | Steps completed so far |
| `total_steps` | number | Total steps in workflow |

---

### execution_completed

Workflow execution finished successfully.

```json
{
  "type": "execution_completed",
  "execution_id": "exec_xyz789",
  "status": "completed",
  "output": "https://storage.eachlabs.ai/outputs/final.mp4",
  "all_outputs": {
    "step1": "https://storage.eachlabs.ai/outputs/step1.png",
    "step2": "https://storage.eachlabs.ai/outputs/step2.png",
    "step3": "https://storage.eachlabs.ai/outputs/final.mp4"
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `execution_id` | string | Execution identifier |
| `status` | string | Final status (completed, failed) |
| `output` | string | Final output URL |
| `all_outputs` | object | All step outputs keyed by step_id |

---

### tool_call

Details of a tool being called. Useful for debugging and transparency.

```json
{
  "type": "tool_call",
  "name": "execute_model",
  "input": {
    "model_name": "nano-banana-pro",
    "inputs": {
      "prompt": "A beautiful woman portrait...",
      "aspect_ratio": "1:1"
    }
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Tool name |
| `input` | object | Tool input parameters |

---

### message

Informational message from the agent.

```json
{
  "type": "message",
  "content": "Your video is being processed. This typically takes 2-3 minutes."
}
```

| Field | Type | Description |
|-------|------|-------------|
| `content` | string | Message content |

---

### complete

Final event with summary. Always sent when stream completes successfully.

```json
{
  "type": "complete",
  "task_id": "chat_1708345678901",
  "status": "ok",
  "tool_calls": [
    {"name": "search_models", "result": "success"},
    {"name": "get_model_details", "result": "success"},
    {"name": "execute_model", "result": "success", "model": "nano-banana-pro"}
  ],
  "generations": ["https://storage.eachlabs.ai/outputs/abc123.png"],
  "model": "nano-banana-pro"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `task_id` | string | Unique task identifier |
| `status` | string | Final status (ok, awaiting_input, error) |
| `tool_calls` | array | Summary of all tool calls |
| `generations` | array | All generated output URLs |
| `model` | string | Primary model used |

**Status values:**
- `ok` - Completed successfully
- `awaiting_input` - Waiting for user clarification
- `error` - An error occurred

---

### error

An error occurred during processing.

```json
{
  "type": "error",
  "message": "Failed to generate image: Invalid aspect ratio"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `message` | string | Error message |

---

## Event Flow Examples

### Simple Image Generation

```
thinking_delta → "I'll create a beautiful portrait..."
status → "Searching for models..."
status → "Getting model details..."
status → "Generating with nano-banana-pro..."
generation_response → {url: "https://..."}
complete → {status: "ok", generations: [...]}
[DONE]
```

### Clarification Flow

```
thinking_delta → "I see an image, but need to know what edit..."
clarification_needed → {question: "What edit?", options: [...]}
complete → {status: "awaiting_input"}
[DONE]
```

### Workflow Execution

```
thinking_delta → "Creating a multi-step workflow..."
status → "Searching for models..."
workflow_created → {workflow_id: "wf_123", steps_count: 5}
execution_started → {execution_id: "exec_456"}
execution_progress → {completed_steps: 1, total_steps: 5}
execution_progress → {completed_steps: 2, total_steps: 5}
execution_progress → {completed_steps: 3, total_steps: 5}
execution_progress → {completed_steps: 4, total_steps: 5}
execution_completed → {output: "https://...", all_outputs: {...}}
complete → {status: "ok"}
[DONE]
```

### Web Search

```
thinking_delta → "Let me search for current information..."
web_search_query → {query: "best AI models 2024"}
status → "Searching the web..."
web_search_citations → {citations: [...], count: 3}
text_response → "Based on current information..."
complete → {status: "ok"}
[DONE]
```

```