Imagen 4 AI Image Generator

v1.0.4

Generate high-quality AI images using Google Imagen 4 via Media.io OpenAPI. Produces photorealistic, detailed images from text prompts with advanced text ren...

0· 159·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for wondershare-boop/mediaio-imagen4-image-generator.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Imagen 4 AI Image Generator" (wondershare-boop/mediaio-imagen4-image-generator) from ClawHub.
Skill page: https://clawhub.ai/wondershare-boop/mediaio-imagen4-image-generator
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install mediaio-imagen4-image-generator

ClawHub CLI

Package manager switcher

npx clawhub@latest install mediaio-imagen4-image-generator
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill's name and description (Imagen 4 via Media.io) match the included API definitions and the code implements calls to openapi.media.io. However, the registry metadata at the top-level reported 'Required env vars: none' while SKILL.md and the code require an API_KEY — this metadata mismatch should be corrected.
Instruction Scope
SKILL.md only instructs setting an API_KEY and using the provided Skill class to call listed Media.io endpoints. The instructions do not request or read unrelated files, secrets, or external endpoints beyond openapi.media.io. Usage examples and error handling are limited to the service.
Install Mechanism
No install spec is present (instruction-only + small local Python script). The only dependency indicated is 'requests' (pip) in examples — no downloads from arbitrary URLs or archives.
Credentials
The skill requires a single API_KEY (used as X-API-KEY) which is proportional to the stated purpose of calling Media.io APIs. Note the top-level registry metadata omitted this requirement — the SKILL.md and code do in fact require API_KEY.
Persistence & Privilege
always is false, the skill does not request elevated or persistent platform privileges, and it does not modify other skills or system-wide settings. It only reads its own local API definition file.
Assessment
This skill appears coherent: it requires one Media.io API key and only makes HTTPS requests to openapi.media.io (the code enforces the host). Before installing, confirm you trust the Media.io service and the skill author (source/homepage are not provided). Correct the metadata mismatch: SKILL.md and the code expect API_KEY while registry metadata listed none. Use a least-privilege API key (limited scope/credits) and review rate/credit implications. If you plan to run in a sensitive environment, inspect c_api_doc_detail.json to ensure endpoints are as expected and consider running the code in an isolated environment first.

Like a lobster shell, security has layers — review code before you run it.

latestvk977wgsy2zhgeag1f2kb66n1px835p3n
159downloads
0stars
5versions
Updated 1mo ago
v1.0.4
MIT-0

MediaIO Imagen 4 Image Generator Skill

Overview

This skill provides access to Google Imagen 4 through the Media.io OpenAPI. Imagen 4 sets a new standard for photorealism and text rendering accuracy, handling the most complex prompts with ease.

Trigger Keywords

Use this skill when you hear:

  • "Imagen 4", "Google Imagen 4", "Imagen 4 API"
  • "Generate image with Imagen 4"
  • "Imagen 4 image generation"

Requirements

Environment Variables

VariableRequiredDescription
API_KEYYesMedia.io OpenAPI key, sent as X-API-KEY header. Apply at https://developer.media.io/.

API Details

Imagen 4 Text-to-Image

  • API Name: Imagen 4
  • Model Code: t2i-imagen-4
  • Endpoint: POST https://openapi.media.io/generation/imagen/t2i-imagen-4
  • Description: Sets a new standard for photorealism and text rendering accuracy, handling the most complex prompts with ease.

Request Parameters

ParameterTypeRequiredDescription
promptstringYesText description for image generation
ratiostringNoImage aspect ratio (e.g., "1:1", "16:9", "9:16")
countsstringNoNumber of images to generate (default: "1")

Common Response Structure

{
  "code": 0,
  "msg": "",
  "data": {
    "task_id": "..."
  },
  "trace_id": "..."
}

Quick Start

1) Install Dependency

pip install requests

2) Initialize Skill

import os
from scripts.skill_router import Skill

skill = Skill('scripts/c_api_doc_detail.json')
api_key = os.getenv('API_KEY', '')
if not api_key:
    raise RuntimeError('API_KEY is not set')

3) Configure Environment Variable API_KEY

Windows PowerShell:

$env:API_KEY="your-api-key"

macOS / Linux (bash/zsh):

export API_KEY="your-api-key"

Usage Examples (Python)

Basic Image Generation

import os
from scripts.skill_router import Skill

skill = Skill('scripts/c_api_doc_detail.json')
api_key = os.getenv('API_KEY', '')
if not api_key:
    raise RuntimeError('API_KEY is not set')

result = skill.invoke(
    'Imagen 4',
    {
        'prompt': 'a cute puppy, photorealistic, soft natural light, high detail',
        'ratio': '1:1',
        'counts': '1'
    },
    api_key=api_key
)
print(result)  # Returns task_id when code=0

Query Task Result

import os
import time
from scripts.skill_router import Skill

skill = Skill('scripts/c_api_doc_detail.json')
api_key = os.getenv('API_KEY', '')
if not api_key:
    raise RuntimeError('API_KEY is not set')

task_id = 'your-task-id'

for _ in range(24):
    r = skill.invoke('Task Result', {'task_id': task_id}, api_key=api_key)
    print(r)
    status = (r.get('data') or {}).get('status')
    if status in ('completed', 'failed', 'succeeded'):
        break
    time.sleep(5)

Task Status Reference

  • waiting: queued
  • processing: running
  • completed: completed successfully
  • failed: failed
  • timeout: timed out

Error Handling

Error CodeDescription
374004Not authenticated. Apply for an APP KEY at https://developer.media.io/
490505Insufficient credits. Recharge before invoking generation APIs

External Resources

Related Files

  • scripts/skill_router.py: core routing logic
  • scripts/c_api_doc_detail.json: API definitions

Comments

Loading comments...