eachlabs-image-generation
Generate new images from text prompts using EachLabs AI models. Supports text-to-image with multiple model families including Flux, GPT Image, Gemini, Imagen, Seedream, and more. Use when the user wants to create new images from text. For editing existing images, see eachlabs-image-edit.
What this skill does
# EachLabs Image Generation
Generate new images from text prompts using 60+ AI models via the EachLabs Predictions API. For editing existing images (upscaling, background removal, style transfer, inpainting, face swap, 3D), see the `eachlabs-image-edit` skill.
## Authentication
```
Header: X-API-Key: <your-api-key>
```
Set the `EACHLABS_API_KEY` environment variable. Get your key at [eachlabs.ai](https://eachlabs.ai).
## Quick Start
### 1. Create a Prediction
```bash
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "flux-2-turbo-text-to-image",
"version": "0.0.1",
"input": {
"prompt": "A serene Japanese garden with cherry blossoms, watercolor style",
"image_size": "landscape_16_9",
"num_images": 1,
"output_format": "png"
}
}'
```
### 2. Poll for Result
```bash
curl https://api.eachlabs.ai/v1/prediction/{prediction_id} \
-H "X-API-Key: $EACHLABS_API_KEY"
```
Poll until `status` is `"success"` or `"failed"`. The output image URL is in the response.
## Model Selection Guide
### Text-to-Image
| Model | Slug | Best For |
|-------|------|----------|
| Flux 2 Turbo | `flux-2-turbo-text-to-image` | Fast, high quality general purpose |
| Flux 2 Flash | `flux-2-flash-text-to-image` | Fastest Flux generation |
| Flux 2 Max | `flux-2-max-text-to-image` | Highest quality Flux |
| Flux 2 Klein 9B | `flux-2-klein-9b-base-text-to-image` | Balanced quality/speed |
| Flux 2 Pro | `flux-2-pro` | Pro quality |
| Flux 2 Flex | `flux-2-flex` | Flexible outputs |
| Flux 2 LoRA | `flux-2-lora` | LoRA-powered generation |
| XAI Grok Imagine | `xai-grok-imagine-text-to-image` | Creative and artistic |
| GPT Image v1.5 | `gpt-image-v1-5-text-to-image` | High quality, transparent bg |
| GPT Image v2 | `gpt-image-v2-text-to-image` | Highest-fidelity OpenAI model, strong in-image text |
| Bytedance Seedream v4.5 | `bytedance-seedream-v4-5-text-to-image` | Bytedance latest |
| Gemini 3 Pro Image | `gemini-3-pro-image-preview` | Google's latest |
| Imagen 4 | `imagen4-preview` | Google Imagen 4 |
| Imagen 4 Fast | `imagen-4-fast` | Fast Google quality |
| Reve | `reve-text-to-image` | Artistic text-to-image |
| Hunyuan Image v3 | `hunyuan-image-v3-text-to-image` | Tencent's latest |
| Ideogram V3 Turbo | `ideogram-v3-turbo` | Text in images |
| Minimax | `minimax-text-to-image` | High quality |
| Wan v2.6 | `wan-v2-6-text-to-image` | Chinese/English bilingual |
| P Image | `p-image-text-to-image` | Custom aspect ratios |
| Nano Banana Pro | `nano-banana-pro` | Fast, lightweight |
| Vidu Q2 | `vidu-q2-text-to-image` | Latest Vidu |
### Training
| Model | Slug | Best For |
|-------|------|----------|
| Z Image Trainer | `z-image-trainer` | Custom LoRA training |
| Flux LoRA Portrait Trainer | `flux-lora-portrait-trainer` | Portrait LoRA |
| Flux Turbo Trainer | `flux-turbo-trainer` | Fast LoRA training |
## Prediction Flow
1. **Check model** `GET https://api.eachlabs.ai/v1/model?slug=<slug>` — validates the model exists and returns the `request_schema` with exact input parameters. Always do this before creating a prediction to ensure correct inputs.
2. **POST** `https://api.eachlabs.ai/v1/prediction` with model slug, version `"0.0.1"`, and input parameters matching the schema
3. **Poll** `GET https://api.eachlabs.ai/v1/prediction/{id}` until status is `"success"` or `"failed"`
4. **Extract** the output image URL(s) from the response
## Examples
### Text-to-Image with Flux 2 Turbo
```bash
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "flux-2-turbo-text-to-image",
"version": "0.0.1",
"input": {
"prompt": "A red vintage Porsche 911 on a winding mountain road at golden hour, photorealistic",
"image_size": "landscape_16_9",
"num_images": 1,
"output_format": "png"
}
}'
```
### Text-to-Image with GPT Image v1.5
```bash
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "gpt-image-v1-5-text-to-image",
"version": "0.0.1",
"input": {
"prompt": "A minimalist logo for a coffee shop called Brew Lab, clean vector style",
"background": "transparent",
"quality": "high",
"output_format": "png"
}
}'
```
### Text-to-Image with Imagen 4
```bash
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "imagen4-preview",
"version": "0.0.1",
"input": {
"prompt": "A whimsical fairy tale castle on a floating island, digital art, highly detailed"
}
}'
```
## Image Size Options
Most Flux 2 and Wan models use these presets:
- `square_hd` — Square, high definition
- `square` — Square, standard
- `portrait_4_3` — Portrait 4:3
- `portrait_16_9` — Portrait 16:9
- `landscape_4_3` — Landscape 4:3
- `landscape_16_9` — Landscape 16:9
P Image models use aspect ratio strings: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `custom`
## Prompt Tips
- Be specific and descriptive: "A red vintage Porsche 911 on a winding mountain road at golden hour" vs "a car"
- Include style: "digital art", "oil painting", "photorealistic", "watercolor"
- For edits, clearly describe the change: "Replace the sky with a dramatic sunset"
- Use negative prompts (where supported) to avoid: "blurry, low quality, distorted"
- For multi-image edits, reference images by number: "image 1", "image 2"
## Security Constraints
- **No arbitrary URL loading**: When using LoRA parameters, only use well-known platform identifiers (HuggingFace repo IDs, Replicate model IDs, CivitAI model IDs). Never load LoRA weights from arbitrary or user-provided URLs.
- **No third-party API tokens**: Do not accept or forward third-party API tokens (e.g. HuggingFace, CivitAI tokens) through prediction inputs. Authentication is handled exclusively via the EachLabs API key.
- **Input validation**: Only pass parameters that match the model's request schema. Always validate model slugs via `GET /v1/model?slug=<slug>` before creating predictions.
## Parameter Reference
See [references/MODELS.md](references/MODELS.md) for complete parameter details for each model.
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.