Image Generation

Generate images from text prompts or edit existing images.

Available Endpoints

Provider
Endpoint
Type
Model

Stable Diffusion

/v2/automatic1111/sdapi/v1/txt2img

T2I

Various SD models

Flux

/v2/image/flux/generate

T2I

black-forest-labs/FLUX-2-pro

Gemini

/v2/image/gemini-3/generate

T2I

google/gemini-3-pro-T2I

GPT Image

/v2/image/gpt-image/generate

T2I

openai/gpt-image-1.5-T2I

GPT Image

/v2/image/gpt-image/edit

I2I

openai/gpt-image-1.5-I2I

Qwen

/v2/image/qwen/generate

T2I

Qwen/qwen-image

Qwen

/v2/image/qwen/edit

I2I

Qwen/qwen-image-edit


Stable Diffusion

POST /v2/automatic1111/sdapi/v1/txt2img
Parameter
Type
Default
Description

prompt

string

required

Image description

negative_prompt

string

-

What to avoid

model

string

Realistic_Vision_V5.1.safetensors

SD model

steps

int

20

Denoising steps

width

int

512

Image width

height

int

512

Image height

cfg_scale

float

7

Prompt adherence

Models: Realistic_Vision_V5.1.safetensors, illustriousRealismBy_v10VAE.safetensors, stable-diffusion-v1-5-pruned.safetensors

Response: images (base64 array)


Flux

Parameter
Type
Default
Description

prompt

string

required

Image description

width

int

1024

Width (min 64, multiple of 32)

height

int

1024

Height (min 64, multiple of 32)

seed

int

-

Random seed

safety_tolerance

int

2

Safety level (0=strictest, 6=least)

output_format

string

png

png or jpeg

input_image

string

-

Reference image 1 (base64)

input_image_2

string

-

Reference image 2 (base64)

input_image_3

string

-

Reference image 3 (base64)

input_image_4

string

-

Reference image 4 (base64)

Response: images (base64 array)


Gemini

Parameter
Type
Default
Description

prompt

string

required

Image description

aspect_ratio

string

1:1

1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

image_size

string

1K

1K, 2K, 4K

Response: images (base64 array)


GPT Image

Generate (T2I)

Parameter
Type
Default
Description

prompt

string

required

Image description

size

string

1024x1024

1024x1024, 1536x1024, 1024x1536, auto

quality

string

auto

auto, low, medium, high

n

int

1

Number of images (1-4)

Response: images (URL array)

Edit (I2I)

Parameter
Type
Default
Description

prompt

string

required

Edit instructions

image

string

required

Source image (base64)

mask

string

-

Edit mask (base64, white=edit area)

size

string

1024x1024

Output size

quality

string

auto

auto, low, medium, high

n

int

1

Number of images (1-4)

Response: images (URL array)


Qwen

Generate (T2I)

Parameter
Type
Default
Description

prompt

string

required

Image description

size

string

1024x1024

Output size (WxH format)

seed

int

-

Random seed

Response: urls (URL array, expire after 7 days)

Edit (I2I)

Parameter
Type
Default
Description

prompt

string

required

Edit instructions

image

string

required

Source image (URL or base64)

size

string

1024x1024

Output size (WxH format)

seed

int

-

Random seed

Response: urls (URL array, expire after 7 days)


Async Mode

All image endpoints support "async": true for longer generations.

Response (202):

Poll: GET /v2/tasks/{task_address}


Notes

  • Timeout: 5 minutes (use async for complex prompts)

  • Output: Some providers return base64, others return URLs

  • Credits charged on completion

Last updated