Feature · image generation

Image generation API with FLUX

Generate up to 10 images per request, or edit an existing image with an instruction. The endpoints follow the OpenAI images shape, so the same SDK and the same request pattern work.

Short answer. Use POST /v1/images/generations with dall-e-2 or plugsky-flux for fast FLUX schnell images, or dall-e-3 for higher-quality FLUX dev. Sizes go from 256×256 to 1792×1024, n up to 10, and response_format is 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

EndpointWhat it doesModel / alias
POST /v1/images/generationsText-to-imagedall-e-2 or plugsky-flux → flux-schnell; dall-e-3 → flux-dev
POST /v1/images/editsInstruction-based editingFLUX Kontext; multipart image or image_url + prompt

Request options

FieldValuesNotes
modeldall-e-2, dall-e-3, plugsky-fluxAliases map to FLUX schnell or dev
promptTextDescribe subject, style, lighting and composition
size256×256 to 1792×1024Use a ratio that matches the placement
n1–10Each image consumes credits
response_formaturl or b64_jsonURL 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

PlanImages / monthCredit cost
Hobby $8200flux-schnell 1; flux-dev and edits 3
Starter $20500Same
Builder $601,500Same
Scale $1205,000Same
Lifetime VIP5,000 / yearTop-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.