gpt-image-v2
Generate and edit images using OpenAI's GPT Image v2 via EachLabs. Supports text-to-image (gpt-image-v2-text-to-image) and instruction-based editing (gpt-image-v2-edit). Use when the user specifically asks for GPT Image 2 / OpenAI image generation, or needs high-fidelity photorealism, precise text rendering, or reference-faithful edits.
What this skill does
# GPT Image v2
OpenAI's GPT Image v2 on the EachLabs Predictions API. GPT Image v2 delivers higher-fidelity images than v1.5 with stronger prompt understanding, improved compositional consistency, physically accurate lighting, and enhanced fine-detail rendering — including reliable in-image text.
Two model slugs:
| Slug | Category | Use |
|------|----------|-----|
| `gpt-image-v2-text-to-image` | Text to Image | Generate new images from a prompt |
| `gpt-image-v2-edit` | Image to Image | Edit an existing image with natural-language instructions |
## When to use
- User asks for "GPT Image", "OpenAI image", "gpt-image-2", or the image model behind ChatGPT.
- High-fidelity photorealism with accurate in-image text (posters, infographics, packaging, signage).
- Brand-consistent product photography with legible labels and logos.
- Instruction-following edits that must preserve the subject and layout of a reference image.
For a wider model comparison (Flux, Seedream, Imagen, etc.) see `eachlabs-image-generation`. For other edit models see `eachlabs-image-edit`.
## Authentication
```
Header: X-API-Key: <your-api-key>
```
Set the `EACHLABS_API_KEY` environment variable. Get your key at [eachlabs.ai/dashboard/api-keys](https://www.eachlabs.ai/dashboard/api-keys).
## Prediction Flow
1. **(Recommended) Check schema** — `GET https://api.eachlabs.ai/v1/model?slug=gpt-image-v2-text-to-image` to see the current `request_schema`. Do the same for `gpt-image-v2-edit`.
2. **POST** `https://api.eachlabs.ai/v1/prediction` with `model`, `version: "0.0.1"`, and `input`.
3. **Poll** `GET https://api.eachlabs.ai/v1/prediction/{id}` until `status` is `"success"` or `"error"`, or use a webhook.
4. **Extract** the output URLs from `output` (array).
## Quick Start — Text to Image
```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-v2-text-to-image",
"version": "0.0.1",
"input": {
"prompt": "A minimalist poster reading \"BREW LAB\" in bold serif, steam rising from a ceramic mug, warm paper texture, editorial photography"
}
}'
```
Typical processing time: **~40 seconds**.
## Quick Start — Edit
```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-v2-edit",
"version": "0.0.1",
"input": {
"prompt": "Replace the background with a sunlit loft interior while keeping the product label and angle identical",
"image_url": "https://your-cdn.example.com/product.jpg"
}
}'
```
Typical processing time: **~100 seconds**. Reference images are always processed at high fidelity, so input image tokens (and cost) are higher than other GPT Image models.
## Polling
```bash
curl https://api.eachlabs.ai/v1/prediction/{PREDICTION_ID} \
-H "X-API-Key: $EACHLABS_API_KEY"
```
| Status | Meaning |
|--------|---------|
| `processing` | Still running — poll again |
| `success` | Done — read `output` (array of URLs) |
| `error` | Failed — read `message` / `details` |
## Webhook (alternative to polling)
Pass `"webhook_url": "https://your.host/path"` in the create body. EachLabs POSTs:
```json
{
"exec_id": "prediction-uuid",
"status": "succeeded",
"output": "https://...",
"error": ""
}
```
`status` is `"succeeded"` or `"failed"`. Return 2xx within 30 seconds.
## Pricing
Both models use **dynamic token-based pricing**:
| Token type | Rate |
|------------|------|
| Text input | $5 / 1M tokens |
| Image input | $10 / 1M tokens |
| Text output | $40 / 1M tokens |
| Image output | $30 / 1M tokens |
If the token breakdown is unavailable, EachLabs falls back to a "medium 1024×1024 equivalent" rate.
> `gpt-image-v2-edit` always processes reference images at high fidelity, so image-input tokens (and cost) run noticeably higher than with `gpt-image-v1-5-edit` or Nano Banana. Prefer downscaling references to 1024px on the long edge before upload unless you need high detail.
## Prompt Tips
- **In-image text**: wrap the exact copy in double quotes (`"BREW LAB"`) and specify typography ("bold serif", "sans-serif headline"). v2 renders dense paragraphs and multilingual layouts reliably.
- **Composition**: describe subject, framing, lens, and lighting separately. v2 respects compositional directives better than v1.5.
- **Edits**: be specific about what must stay unchanged ("keep the label, angle, and lighting identical; only replace the background").
- **Photorealism**: add concrete physical cues ("raking 45° sunlight, soft falloff, subtle skin SSS") rather than generic adjectives.
## Rate Limits & Limits
| Limit | Value |
|-------|-------|
| Create requests | 100 / minute per key |
| Concurrent predictions | 10 per key |
| File inputs | Publicly reachable HTTPS URLs only — no data-URIs, no localhost |
## Errors
Error body: `{ "status": "error", "message": "...", "details": "..." }`
| Code | Meaning |
|------|---------|
| 400 | Invalid input |
| 401 | Missing / invalid `X-API-Key` |
| 404 | Unknown model or prediction id |
| 429 | Rate limited — back off |
| 5xx | Retry with exponential backoff |
## Security Constraints
- **No arbitrary URL loading**: `image_url` must point to your own HTTPS-reachable storage (S3, GCS, CDN). Do not forward user-pasted URLs without validation.
- **No third-party API tokens**: never forward OpenAI / Anthropic / HF tokens through `input` — authentication is exclusively via the EachLabs API key.
- **Validate before calling**: always resolve the live `request_schema` via `GET /v1/model?slug=<slug>` before constructing `input`. The schema is the source of truth.
## Parameter Reference
See [references/MODELS.md](references/MODELS.md) for the full per-slug parameter table.
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.