Loading...
Loading...
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.
npx skill4agent add eachlabs/skills gpt-image-v2| Slug | Category | Use |
|---|---|---|
| Text to Image | Generate new images from a prompt |
| Image to Image | Edit an existing image with natural-language instructions |
eachlabs-image-generationeachlabs-image-editHeader: X-API-Key: <your-api-key>EACHLABS_API_KEYGET https://api.eachlabs.ai/v1/model?slug=gpt-image-v2-text-to-imagerequest_schemagpt-image-v2-edithttps://api.eachlabs.ai/v1/predictionmodelversion: "0.0.1"inputGET https://api.eachlabs.ai/v1/prediction/{id}status"success""error"outputcurl -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"
}
}'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"
}
}'curl https://api.eachlabs.ai/v1/prediction/{PREDICTION_ID} \
-H "X-API-Key: $EACHLABS_API_KEY"| Status | Meaning |
|---|---|
| Still running — poll again |
| Done — read |
| Failed — read |
"webhook_url": "https://your.host/path"{
"exec_id": "prediction-uuid",
"status": "succeeded",
"output": "https://...",
"error": ""
}status"succeeded""failed"| Token type | Rate |
|---|---|
| Text input | $5 / 1M tokens |
| Image input | $10 / 1M tokens |
| Text output | $40 / 1M tokens |
| Image output | $30 / 1M tokens |
always processes reference images at high fidelity, so image-input tokens (and cost) run noticeably higher than withgpt-image-v2-editor Nano Banana. Prefer downscaling references to 1024px on the long edge before upload unless you need high detail.gpt-image-v1-5-edit
"BREW LAB"| 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 |
{ "status": "error", "message": "...", "details": "..." }| Code | Meaning |
|---|---|
| 400 | Invalid input |
| 401 | Missing / invalid |
| 404 | Unknown model or prediction id |
| 429 | Rate limited — back off |
| 5xx | Retry with exponential backoff |
image_urlinputrequest_schemaGET /v1/model?slug=<slug>input