Skip to main content
POST
/
image
/
generate
/api/v1/image/generate
curl --request POST \
  --url https://api.venice.ai/api/v1/image/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "z-image-turbo",
  "prompt": "A beautiful sunset over a mountain range",
  "cfg_scale": 7.5,
  "embed_exif_metadata": false,
  "format": "webp",
  "height": 1024,
  "hide_watermark": false,
  "inpaint": "<unknown>",
  "lora_strength": 50,
  "negative_prompt": "Clouds, Rain, Snow",
  "return_binary": false,
  "variants": 3,
  "safe_mode": false,
  "seed": 123456789,
  "steps": 0,
  "style_preset": "3D Model",
  "aspect_ratio": "1:1",
  "resolution": "1024x1024",
  "enable_web_search": false,
  "width": 1024
}
'
{
  "id": "generate-image-1234567890",
  "images": [
    "<string>"
  ],
  "timing": {
    "inferenceDuration": 123,
    "inferencePreprocessingTime": 123,
    "inferenceQueueTime": 123,
    "total": 123
  },
  "request": "<unknown>"
}

Postman Collection

For additional examples, please see this Postman Collection.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Accept-Encoding
string

Supported compression encodings (gzip, br). Only applied when return_binary is false.

Example:

"gzip, br"

Body

application/json
model
string
required

The model to use for image generation.

Example:

"z-image-turbo"

prompt
string
required

The description for the image. Character limit is model specific and is listed in the promptCharacterLimit setting in the model list endpoint.

Required string length: 1 - 7500
Example:

"A beautiful sunset over a mountain range"

cfg_scale
number

CFG scale parameter. Higher values lead to more adherence to the prompt.

Required range: 0 < x <= 20
Example:

7.5

embed_exif_metadata
boolean
default:false

Embed prompt generation information into the image's EXIF metadata.

Example:

false

format
enum<string>
default:webp

The image format to return. WebP are smaller and optimized for web use. PNG are higher quality but larger in file size.

Available options:
jpeg,
png,
webp
Example:

"webp"

height
integer
default:1024

Height of the generated image. Each model has a specific height and width divisor listed in the widthHeightDivisor constraint in the model list endpoint.

Required range: 0 < x <= 1280
Example:

1024

hide_watermark
boolean
default:false

Whether to hide the Venice watermark. Venice may ignore this parameter for certain generated content.

Example:

false

inpaint
any | null
deprecated

This feature is deprecated and was disabled on May 19th, 2025. A revised in-painting API will be launched in the near future.

lora_strength
integer

Lora strength for the model. Only applies if the model uses additional Loras.

Required range: 0 <= x <= 100
Example:

50

negative_prompt
string

A description of what should not be in the image. Character limit is model specific and is listed in the promptCharacterLimit constraint in the model list endpoint.

Maximum string length: 7500
Example:

"Clouds, Rain, Snow"

return_binary
boolean
default:false

Whether to return binary image data instead of base64.

Example:

false

variants
integer

Number of images to generate (1–4). Only supported when return_binary is false.

Required range: 1 <= x <= 4
Example:

3

safe_mode
boolean
default:true

Whether to use safe mode. If enabled, this will blur images that are classified as having adult content.

Example:

false

seed
integer
default:0

Random seed for generation. If not provided, a random seed will be used.

Required range: -999999999 <= x <= 999999999
Example:

123456789

steps
integer
default:0

Number of inference steps. This model does not support steps - this field is ignored.

Example:

0

style_preset
string

An image style to apply to the image. Visit https://docs.venice.ai/api-reference/endpoint/image/styles for more details.

Example:

"3D Model"

aspect_ratio
string

Aspect ratio (utilized by certain image models including Nano Banana). Examples: "1:1", "16:9".

Example:

"1:1"

resolution
string

Resolution (utilized by certain image models including Nano Banana). Examples: "1024x1024", "512x512".

Example:

"1024x1024"

Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. Only supported by certain models. If web search is used, additional credits are getting charged.

Example:

false

width
integer
default:1024

Width of the generated image. Each model has a specific height and width divisor listed in the widthHeightDivisor constraint in the model list endpoint.

Required range: 0 < x <= 1280
Example:

1024

Response

Successfully generated image

id
string
required

The ID of the request.

Example:

"generate-image-1234567890"

images
string[]
required

Base64 encoded image data.

timing
object
required
request
any | null

The original request data sent to the API.