Skip to main content
Image generation on Venice is synchronous. Send a prompt to /image/generate and receive your image in the same response, either as base64 inside JSON or as raw binary when return_binary is true.

Endpoints

Step 1: Send a generation request

Sizing is model-specific. Some models accept explicit width and height; some expose aspect_ratio; and resolution-tier models expose aspect_ratio plus resolution values such as 1K, 2K, or 4K.
qwen-image, qwen-image-3, qwen-image-3-pro, qwen-image-2-1-turbo, and qwen-image-2-1-pro no longer accept width or height. Sending either returns 400 with “width and height are no longer supported for this model. Use aspect_ratio instead.” Check model_spec.constraints from GET /models?type=image before choosing sizing fields.
Pixel-based sizing example:
Aspect-ratio sizing example:
Resolution-tier sizing example:
The same pattern applies to other resolution-tier models:
Use Image Models or the Models API to confirm which sizing fields each model accepts. Response (200):
The images array contains base64-encoded image data. Decode the first item to save or display it. timing.total is the full request duration in milliseconds.

Step 2: Decode and save the image

Step 3: Return binary instead of JSON (optional)

If you want the response body to be the image file itself, set return_binary: true. This is useful when you want to stream or save the image directly without base64 decoding.
When return_binary is true, the response body is raw image/jpeg, image/png, or image/webp data based on the format you requested.
variants is only supported when return_binary is false.

Step 4: List available image styles (optional)

If you want to use style_preset, first fetch the available styles from /image/styles:
This endpoint is public and does not require an API key. Response (200):
The style names are inside data, not at the top level — read response.data rather than iterating the response object directly. Then pass one of those values into your generation request:
Use the styles endpoint when you want exact preset names instead of guessing them.

Request Parameters

Validation is model-specific. Check Image Models and the Models API before relying on a parameter across multiple models.

Model-specific options

High-resolution generation

Some image models support aspect_ratio without a selectable resolution tier. For example, qwen-image-2 accepts aspect ratio and maps it to model-specific output dimensions:
Other image models support aspect_ratio plus a resolution tier. For example, gpt-image-2, nano-banana-2, and nano-banana-pro support 1K, 2K, and 4K:
Use Image Models to see which models support higher resolutions and how they are priced.

LoRA strength

Some image models apply additional LoRAs. lora_strength (integer, 0 to 100) sets how strongly they are applied, and it only affects models that use them. The API does not accept custom LoRA files, and no endpoint lists the LoRAs a model uses. lora_strength is the only LoRA control.

Adult content and safe mode

safe_mode controls whether adult content in generation output is blurred. It defaults to true, so images classified as adult come back blurred unless you send safe_mode: false:
Unblurred adult (NSFW) images are available to every API user. You don’t need a Pro subscription, and the mature filter setting in the Venice app does not affect image requests made through the API. Some image models are specifically designed for adult / uncensored generation and pair well with safe_mode: false. Examples on the pricing page include lustify-sdxl, lustify-v7, and lustify-v8. See Image Models and Pricing for the current list and per-model costs. For editing existing images, the default edit model is firered-image-edit. Content policies vary by edit model; if you need uncensored editing, use qwen-edit-uncensored via Image Editing. When safe_mode is enabled and the model returns blurred or moderated output, inspect the x-venice-is-blurred and x-venice-is-content-violation response headers if you need to detect that programmatically.
Using a third-party app? Adult images stay blurred unless the app sends safe_mode: false, or moderation: "low" on the OpenAI-compatible endpoint (see below).

Style presets

If the selected model supports it, style_preset lets you steer the output without rewriting your whole prompt. You can fetch valid preset names from Image Styles:
See Image Styles for the current style list.

Style references

style_references goes a step further than style_preset: instead of a named preset, it conditions generation on one or more reference images. Each entry has an image and an optional strength:
Support is per model. Check GET /models?type=image:
  • model_spec.supportsStyleReferences is true only on models that accept the field.
  • model_spec.constraints.maxStyleReferences is the number of entries the model accepts.
  • model_spec.constraints.supportsStyleReferenceStrength tells you whether strength has any effect.
Sending style_references to a model without support returns 400, as does exceeding that model’s cap or sending a corrupt, unreachable, or oversized reference. Some models charge a style-reference fee for each returned image on top of the base image price — for example, Krea v2 Large and Krea v2 Medium. The fee is only charged for images that are actually returned. See Image Models for the base per-image prices.

Partial variant results

With variants greater than 1, individual variants can be rejected by the provider’s content policy while the rest succeed. In that case the endpoint still returns 200 with fewer images than you requested:
  • When one or more variants are omitted, the JSON body includes content_policy_violation_count, the number of omitted variants.
  • The x-venice-content-violation-count response header carries the same count.
  • x-venice-is-content-violation and x-venice-is-blurred describe the images that were returned.
If every requested variant is rejected, no images are returned and the request fails with 422 instead. Do not assume len(images) == variants; compare the array length to variants and, when present, check content_policy_violation_count.

OpenAI-compatible endpoint

If you’re already using OpenAI image SDKs or existing DALL-E integrations, Venice also supports POST /images/generations. It offers a simpler request format, but fewer features than the native Venice endpoint. Request:
size only applies to pixel-sized models, which have a widthHeightDivisor above 1 in model_spec.constraints from GET /models?type=image. Most models, including qwen-image-2, size output by aspect ratio and resolution instead and ignore size. Some OpenAI parameters are accepted for SDK compatibility but are ignored (n is restricted to 1): Tier control does not exist on this route: there is no resolution or aspect_ratio field, and quality cannot raise or lower the charge. For tiered GPT Image models, use the native /image/generate endpoint when you need to choose quality, resolution, or aspect_ratio. Use the OpenAI-compatible route for faster migrations. Use /image/generate when you need Venice-specific options such as cfg_scale, style_preset, style_references, variants, or binary responses.

Controlling adult-content blur on /images/generations

The OpenAI-compatible endpoint does not accept safe_mode. Sending it returns a 400 with Unrecognized key(s) in object: 'safe_mode'. Use the OpenAI-style moderation parameter instead:
safe_mode only works on the native POST /image/generate endpoint. moderation only works on the OpenAI-compatible POST /images/generations endpoint. The same split applies to transparency: /image/generate uses transparent_background: true, while /images/generations uses the OpenAI-style background: "transparent". Both require a png or webp output format and a model with supportsTransparentBackground: true. See Transparent Background Images.

Prompting tips

  1. Start with the subject, then add medium, lighting, composition, and mood.
  2. Put must-avoid details in negative_prompt instead of overloading the main prompt.
  3. Reuse seed when iterating so you can compare prompt changes without fully changing the composition.
  4. Keep sizing model-aware. Some models use width/height, some use aspect_ratio, and resolution-tier models use aspect_ratio plus resolution.
  5. Use variants during exploration, then switch back to a single output once you’ve locked in the direction.

Errors

When safe_mode is enabled (or moderation is auto), inspect response headers such as x-venice-is-blurred and x-venice-is-content-violation if you need to detect moderation outcomes programmatically.

Available Models

See Image Models for the current model list, pricing, and feature support.