GlomaxGPT Vision 2

GlomaxGPT Vision 2 is GlomaxGPT's most capable image generation model. It produces photorealistic images with exceptional detail, accurately follows complex prompts, and supports sophisticated editing operations including inpainting, outpainting, and style transfer.

New

GlomaxGPT Vision 2

Most capable image model. Supports generation, editing, and variations. Excels at photorealism and complex scenes.

  • 1024×1024, 1536×1024, 1024×1536
  • Standard and HD quality
  • Inpainting with masks
  • Style consistency
Previous

GlomaxGPT Vision 2

Strong creative model with excellent prompt adherence. Ideal for artistic and illustrative content.

  • 1024×1024, 1792×1024, 1024×1792
  • Standard and HD quality
  • Revised prompt support
  • Natural image style
Legacy

GlomaxGPT Vision 1

Original model, still available for variations and legacy integrations. Lower cost for simple use cases.

  • 256×256, 512×512, 1024×1024
  • Standard quality only
  • Image variations supported
  • Inpainting supported

Generating Images

Create images from text descriptions using the images.generate() endpoint. Specify the model, prompt, size, and quality to control the output.

python
from GlomaxGPT import GlomaxGPT
import base64

client = GlomaxGPT()

# Generate a single image
response = client.images.generate(
    model="glomaxgpt-vision-2",
    prompt="A serene Japanese zen garden at golden hour, with raked sand patterns, ancient stone lanterns, and cherry blossom petals drifting in the wind. Photorealistic, cinematic lighting, 8K detail.",
    size="1536x1024",
    quality="hd",
    n=1,
    response_format="b64_json"
)

# Save the image
image_data = base64.b64decode(response.data[0].b64_json)
with open("zen_garden.png", "wb") as f:
    f.write(image_data)

# Or get URL directly
response_url = client.images.generate(
    model="glomaxgpt-vision-2",
    prompt="A futuristic city skyline at night with neon lights reflecting in rain puddles.",
    size="1024x1024",
    quality="standard",
    response_format="url"
)

print(response_url.data[0].url)  # Temporary URL, valid for 1 hour
javascript
import GlomaxGPT from "GlomaxGPT";
import fs from "fs";

const client = new GlomaxGPT();

const response = await client.images.generate({
  model: "glomaxgpt-vision-2",
  prompt: "A serene Japanese zen garden at golden hour, photorealistic, cinematic lighting.",
  size: "1536x1024",
  quality: "hd",
  n: 1,
  response_format: "b64_json",
});

// Save the image
const imageBuffer = Buffer.from(response.data[0].b64_json, "base64");
fs.writeFileSync("zen_garden.png", imageBuffer);
console.log("Image saved to zen_garden.png");
bash
curl https://api.glomaxgpt.com/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $GlomaxGPT_API_KEY" \
  -d '{
    "model": "glomaxgpt-vision-2",
    "prompt": "A serene Japanese zen garden at golden hour, photorealistic",
    "size": "1536x1024",
    "quality": "hd",
    "n": 1,
    "response_format": "url"
  }'

Editing Images

Use the edit endpoint to modify existing images. You can provide a mask to define which area to edit (inpainting), or edit without a mask to apply global changes.

Mask Format: The mask must be a PNG with the same dimensions as the original image. Transparent areas (alpha = 0) indicate where the edit should be applied. Opaque areas are preserved.
python
from GlomaxGPT import GlomaxGPT
from PIL import Image
import io

client = GlomaxGPT()

# Inpainting: replace a masked area
with open("room.png", "rb") as image_file, \
     open("room_mask.png", "rb") as mask_file:

    response = client.images.edit(
        model="glomaxgpt-vision-2",
        image=image_file,
        mask=mask_file,
        prompt="Replace the empty wall with a large framed painting of a mountain landscape at sunset. Photorealistic, matching the room's lighting.",
        size="1024x1024",
        quality="hd",
        n=1
    )

print(response.data[0].url)

# Editing without a mask (global style change)
with open("portrait.png", "rb") as image_file:
    response = client.images.edit(
        model="glomaxgpt-vision-2",
        image=image_file,
        prompt="Transform this portrait into an oil painting style reminiscent of the Dutch Golden Age, with dramatic chiaroscuro lighting.",
        size="1024x1024",
        quality="standard"
    )
javascript
import GlomaxGPT from "GlomaxGPT";
import fs from "fs";

const client = new GlomaxGPT();

const response = await client.images.edit({
  model: "glomaxgpt-vision-2",
  image: fs.createReadStream("room.png"),
  mask: fs.createReadStream("room_mask.png"),
  prompt: "Replace the empty wall with a large framed painting of a mountain landscape at sunset.",
  size: "1024x1024",
  quality: "hd",
  n: 1,
});

console.log(response.data[0].url);

Image Variations

Create variations of an existing image that maintain the same subject and composition but introduce creative differences. Useful for generating multiple options to choose from.

python
from GlomaxGPT import GlomaxGPT

client = GlomaxGPT()

# Generate 3 variations of an image
with open("product_photo.png", "rb") as image_file:
    response = client.images.create_variation(
        model="glomaxgpt-vision-1",  # Variations currently supported on GlomaxGPT Vision 1
        image=image_file,
        n=3,
        size="1024x1024",
        response_format="url"
    )

for i, img in enumerate(response.data):
    print(f"Variation {i+1}: {img.url}")

Sizes & Quality

Choose the right dimensions and quality level for your use case. Larger sizes and higher quality produce better results but take longer and cost more.

Model Available Sizes Quality Options Best For
GlomaxGPT Vision 2 1024×1024, 1536×1024, 1024×1536 standard, hd Photorealism, complex scenes, editing
GlomaxGPT Vision 2 1024×1024, 1792×1024, 1024×1792 standard, hd Creative illustrations, artistic content
GlomaxGPT Vision 1 256×256, 512×512, 1024×1024 standard Variations, simple edits, prototyping

Standard Quality

Faster generation, lower cost. Suitable for most applications, prototyping, and use cases where generation speed matters more than maximum detail.

  • ~5-10 seconds generation time
  • Good detail and clarity
  • Best for bulk generation

HD Quality

Higher fidelity with more detail, sharper textures, and better consistency across the image. Recommended for print, marketing, and final production assets.

  • ~15-30 seconds generation time
  • Maximum detail and clarity
  • Best for final production use

Yanıt Formatı

Images can be returned as temporary URLs or as base64-encoded PNG data. Choose based on your use case.

python
# URL response — easiest to display in browsers
# WARNING: URLs expire after 1 hour. Download images you need to keep.
response = client.images.generate(
    model="glomaxgpt-vision-2",
    prompt="A red panda eating bamboo in a misty forest",
    size="1024x1024",
    response_format="url"  # default
)

url = response.data[0].url
print(f"Image URL: {url}")

# Download immediately if you need to persist
import requests
img_response = requests.get(url)
with open("red_panda.png", "wb") as f:
    f.write(img_response.content)
python
import base64
from GlomaxGPT import GlomaxGPT

client = GlomaxGPT()

# Base64 response — no expiry, ideal for server-side processing
response = client.images.generate(
    model="glomaxgpt-vision-2",
    prompt="A red panda eating bamboo in a misty forest",
    size="1024x1024",
    response_format="b64_json"
)

b64_data = response.data[0].b64_json
image_bytes = base64.b64decode(b64_data)

# Save to disk
with open("red_panda.png", "wb") as f:
    f.write(image_bytes)

# Or use in HTML as a data URI
data_uri = f"data:image/png;base64,{b64_data}"
html = f'<img src="{data_uri}" alt="Generated image" />'

# Or process with Pillow
from PIL import Image
import io
img = Image.open(io.BytesIO(image_bytes))
print(f"Image size: {img.size}, Mode: {img.mode}")

Prompting Guide

The quality of your prompt is the biggest factor in image output quality. Use these techniques to get consistently excellent results.

1

Describe the subject clearly

Start with the main subject. Be specific about what it is, what it looks like, what it's doing, and where it is. Avoid pronouns and ambiguous references.

Good: "A Bengal tiger resting on a moss-covered rock beside a forest stream, its wet fur glistening, looking directly at the camera"
2

Specify art style and medium

Include terms like "photorealistic", "oil painting", "watercolor", "digital art", "pencil sketch", "8K photograph", "cinematic still", "concept art". These dramatically shape the output.

3

Define lighting and atmosphere

Lighting is one of the most powerful visual elements. Use terms like "golden hour", "dramatic chiaroscuro", "soft diffused light", "neon glow", "moonlit", "overcast", "studio lighting with rim light".

4

Add camera and composition details

For photorealistic images, add camera terminology: "shot with a 50mm lens", "wide-angle perspective", "macro photography", "rule of thirds composition", "bokeh background", "aerial drone shot".

5

Use quality modifiers

End prompts with quality enhancers: "highly detailed", "award-winning photography", "masterpiece", "4K", "8K", "ultra-realistic", "professional color grading", "sharp focus".

text
A Victorian-era alchemist's laboratory at midnight, cluttered with glowing 
glass vials, dusty leather-bound books, and bubbling copper apparatus. 
A elderly wizard with a long white beard peers through a magnifying glass 
at a golden locket. Dramatic candlelight illuminates the scene with warm 
orange tones casting deep shadows. Oil painting style, highly detailed, 
masterpiece quality, 8K resolution.
Content Policy: Images must comply with GlomaxGPT's usage policies. The API will reject prompts requesting real people's likenesses, explicit content, violence, or other prohibited content. GlomaxGPT Vision 2 automatically revises prompts to add safety guardrails.