Short answer. Use
POST /v1/images/generationswithdall-e-2orplugsky-fluxfor fast FLUX schnell images, ordall-e-3for higher-quality FLUX dev. Sizes go from 256×256 to 1792×1024,nup to 10, andresponse_formatis URL or base64. Image generation is paid-only: Hobby 200, Starter 500, Builder 1,500 and Scale 5,000 images per month.
Generation and editing endpoints
| Endpoint | What it does | Model / alias |
|---|---|---|
POST /v1/images/generations | Text-to-image | dall-e-2 or plugsky-flux → flux-schnell; dall-e-3 → flux-dev |
POST /v1/images/edits | Instruction-based editing | FLUX Kontext; multipart image or image_url + prompt |
Request options
| Field | Values | Notes |
|---|---|---|
model | dall-e-2, dall-e-3, plugsky-flux | Aliases map to FLUX schnell or dev |
prompt | Text | Describe subject, style, lighting and composition |
size | 256×256 to 1792×1024 | Use a ratio that matches the placement |
n | 1–10 | Each image consumes credits |
response_format | url or b64_json | URL is easier; base64 avoids a second fetch |
Generate an image
from openai import OpenAI
client = OpenAI(
api_key="YOUR_PLUGSKY_KEY",
base_url="https://api.plugsky.com/v1",
)
result = client.images.generate(
model="plugsky-flux", # fast FLUX schnell
prompt="A clean product photo of a matte black espresso cup on a stone counter, soft window light, 50mm lens",
size="1024x1024",
n=1,
response_format="url",
)
print(result.data[0].url)
curl https://api.plugsky.com/v1/images/generations \
-H "Authorization: Bearer $PLUGSKY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "plugsky-flux",
"prompt": "Minimal editorial hero image, warm neutral palette, lots of negative space",
"size": "1792x1024",
"n": 1,
"response_format": "url"
}'
Edit an image
Editing takes an existing image and an instruction. Send the image as multipart form data (PNG, JPEG or WebP) or as an image_url, plus a prompt that describes the change.
curl https://api.plugsky.com/v1/images/edits \
-H "Authorization: Bearer $PLUGSKY_API_KEY" \
-F "model=dall-e-3" \
-F "image=@product.png" \
-F "prompt=Replace the background with a warm sand studio backdrop; keep the product and shadow unchanged"
Be specific about what must stay the same. “Change the background” is ambiguous; “replace the background, keep the product, label and shadow unchanged” is testable.
Credits and cost
| Plan | Images / month | Credit cost |
|---|---|---|
| Hobby $8 | 200 | flux-schnell 1; flux-dev and edits 3 |
| Starter $20 | 500 | Same |
| Builder $60 | 1,500 | Same |
| Scale $120 | 5,000 | Same |
| Lifetime VIP | 5,000 / year | Top-ups available from Billing |
The effective cost per image is the plan price divided by the credits you actually use, plus top-ups. At Hobby, 200 flux-schnell images cost $8, or $0.04 per image before top-ups; a flux-dev image consumes 3 credits, so the effective cost is three times higher. See pricing for the current terms.
Prompt patterns that work
- Product: subject, material, background, lighting, lens, aspect ratio.
- Ad variant: keep the product and copy area fixed; vary background and mood.
- Editorial: describe negative space explicitly when text will be overlaid.
- Editing: state what changes and what must remain unchanged.
Limitations
- Image generation is paid-only; the free plan does not include it.
- Text rendering inside images is not guaranteed; add typography in the design tool.
- Credits are monthly; unused credits do not roll over unless the plan says so.
- Generated images should be reviewed for brand, copyright and likeness before publication.
FAQ
Which models power image generation?
FLUX. dall-e-2 and plugsky-flux map to flux-schnell; dall-e-3 maps to flux-dev. Editing uses FLUX Kontext.
How many images can I generate?
n up to 10 per request. Plan credits are 200 / 500 / 1,500 / 5,000 per month for Hobby / Starter / Builder / Scale.
Is image generation included in the free plan?
No. It is available on paid plans from Hobby at $8/month, with top-ups from Billing.
Can I edit an existing image?
Yes. POST /v1/images/edits accepts a multipart image or image_url plus a prompt.
Is the API OpenAI-compatible?
The image endpoints follow the OpenAI images shape, so the OpenAI SDK works with the Plugsky base URL.
Reviewed 20 November 2026. Endpoint behaviour and credits were checked against the Plugsky API documentation on that date. Review generated images for brand and copyright before publication.