Skip to main content

Overview

WisGate exposes the full OpenAI image API, giving you access to the latest gpt-image-2, gpt-image-1, and dall-e-3 models through an OpenAI-compatible interface. Simply replace the Base URL and API key:
  • Base URL: https://api.wisgate.ai
  • API Key: Replace $OPENAI_API_KEY with your $WISDOM_GATE_KEY

Model Comparison

ModelText→ImageImage→ImageMax imagesTransparent BGMax prompt
gpt-image-21632,000 chars
gpt-image-11632,000 chars
dall-e-314,000 chars
dall-e-211,000 chars
gpt-image-2 is OpenAI’s newest image model with improved quality, better instruction following, and enhanced multi-image composition capabilities. We recommend it for new projects.

Text-to-Image (/v1/images/generations)

Generate images from a text prompt. Supports JSON request body.

Quick Start

curl -X POST https://api.wisgate.ai/v1/images/generations \
  -H "Authorization: Bearer $WISDOM_GATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A futuristic city skyline at dusk with neon reflections on rain-slicked streets",
    "n": 1,
    "size": "1024x1024",
    "quality": "high"
  }'

Transparent Background (gpt-image-2 / gpt-image-1 only)

gpt-image-2 and gpt-image-1 can generate images with transparent backgrounds — ideal for logos, stickers, and product images.
curl -X POST https://api.wisgate.ai/v1/images/generations \
  -H "Authorization: Bearer $WISDOM_GATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A cute cartoon cat mascot, isolated character",
    "size": "1024x1024",
    "quality": "high",
    "background": "transparent",
    "output_format": "png"
  }'

Image-to-Image (/v1/images/edits)

Edit or transform existing images using a text prompt. Uses multipart/form-data encoding.

Basic Edit — Add elements to an image

curl -X POST https://api.wisgate.ai/v1/images/edits \
  -H "Authorization: Bearer $WISDOM_GATE_KEY" \
  -F "model=gpt-image-1" \
  -F "image=@photo.png" \
  -F "prompt=Add a rainbow in the sky" \
  -F "size=1024x1024"

Inpainting — Replace a masked region

Upload an image and a mask (transparent PNG) to replace specific areas:
curl -X POST https://api.wisgate.ai/v1/images/edits \
  -H "Authorization: Bearer $WISDOM_GATE_KEY" \
  -F "model=gpt-image-1" \
  -F "image=@room.png" \
  -F "mask=@mask.png" \
  -F "prompt=A sunlit cozy armchair with warm wooden textures" \
  -F "size=1024x1024"
The mask must be a PNG file with the same dimensions as the source image. Fully transparent pixels (alpha = 0) mark areas to be replaced; fully opaque pixels (alpha = 255) are preserved.

Multi-Image Composition

Compose up to 16 reference images into a single new image:
curl -X POST https://api.wisgate.ai/v1/images/edits \
  -H "Authorization: Bearer $WISDOM_GATE_KEY" \
  -F "model=gpt-image-1" \
  -F "image[]=@product1.png" \
  -F "image[]=@product2.png" \
  -F "image[]=@product3.png" \
  -F "prompt=Create a premium lifestyle product photo combining these items on a marble countertop with soft natural lighting" \
  -F "size=1536x1024" \
  -F "quality=high"

Parameter Reference

Text-to-Image Parameters

ParameterTypeRequiredDescription
modelstringNogpt-image-2 (default), gpt-image-1, dall-e-3, dall-e-2
promptstringYesText description. Max 32,000 chars (gpt-image-2/gpt-image-1), 4,000 (dall-e-3)
nintegerNoNumber of images (1–10). dall-e-3 only supports n=1. Default: 1
sizestringNoImage dimensions. See model-specific options below
qualitystringNogpt-image-2/gpt-image-1: auto/low/medium/high. dall-e-3: standard/hd
stylestringNodall-e-3 only: vivid or natural
response_formatstringNourl (default) or b64_json
backgroundstringNogpt-image-2/gpt-image-1 only: auto/transparent/opaque
output_formatstringNogpt-image-2/gpt-image-1 only: png/jpeg/webp
Size options by model:
ModelSupported Sizes
gpt-image-21024x1024, 1536x1024, 1024x1536, auto
gpt-image-11024x1024, 1536x1024, 1024x1536, auto
dall-e-31024x1024, 1792x1024, 1024x1792
dall-e-2256x256, 512x512, 1024x1024

Image-to-Image Parameters

ParameterTypeRequiredDescription
modelstringNogpt-image-2 (default), gpt-image-1
imagefileYesPNG/JPEG/WebP source image. Use image[] for multiple
promptstringYesEdit description. Max 32,000 chars
maskfileNoTransparent PNG mask (same size as image). Transparent areas are replaced
sizestringNo1024x1024 (default), 1536x1024, 1024x1536, auto
qualitystringNoauto (default), low, medium, high
nintegerNoNumber of images (1–10). Default: 1

FAQ

What’s the difference between gpt-image-2, gpt-image-1, and dall-e-3?

gpt-image-2 is OpenAI’s newest and most capable image model, featuring improved image quality, better prompt understanding, and enhanced multi-image composition. gpt-image-1 also supports image editing, transparent backgrounds, and multi-image composition. Both have a 32,000-character prompt limit. dall-e-3 is specialized for photorealistic styles and provides revised_prompt feedback, but only supports text-to-image with n=1.

Which response_format should I use?

  • url: Fast, returns a CDN link valid for 60 minutes. Use when you need to display images quickly.
  • b64_json: Returns raw image data. Use when you need to store images immediately or process them in memory.
Image URLs from response_format: "url" expire after 60 minutes. Save the image data to your own storage if you need long-term access.

How do I generate multiple images at once?

Set n to a value between 2 and 10. Each image is billed separately:
{
  "model": "gpt-image-1",
  "prompt": "A product photo of a blue ceramic coffee mug",
  "n": 4,
  "size": "1024x1024"
}

How do I check my image generation costs?

Visit the WisGate Pricing page for per-image costs by model and quality tier. Costs are deducted per generated image.

Can I use gpt-image-1 with the official OpenAI SDK?

Yes — just change base_url and api_key:
from openai import OpenAI
client = OpenAI(api_key="YOUR_WISDOM_GATE_KEY", base_url="https://api.wisgate.ai/v1")
All other SDK methods and parameters work identically.
Auto-Generated API ReferenceThe interactive request/response schema below is automatically generated from the OpenAPI specification. Scroll down to explore all parameters with live examples.