/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 explicitwidth and height; some expose aspect_ratio; and resolution-tier models expose aspect_ratio plus resolution values such as 1K, 2K, or 4K.
Pixel-based sizing example:
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, setreturn_binary: true. This is useful when you want to stream or save the image directly without base64 decoding.
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 usestyle_preset, first fetch the available styles from /image/styles:
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:
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 supportaspect_ratio without a selectable resolution tier. For example, qwen-image-2 accepts aspect ratio and maps it to model-specific output dimensions:
aspect_ratio plus a resolution tier. For example, gpt-image-2, nano-banana-2, and nano-banana-pro support 1K, 2K, and 4K:
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:
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:
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.supportsStyleReferencesistrueonly on models that accept the field.model_spec.constraints.maxStyleReferencesis the number of entries the model accepts.model_spec.constraints.supportsStyleReferenceStrengthtells you whetherstrengthhas any effect.
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
Withvariants 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-countresponse header carries the same count. x-venice-is-content-violationandx-venice-is-blurreddescribe the images that were returned.
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 supportsPOST /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
- Start with the subject, then add medium, lighting, composition, and mood.
- Put must-avoid details in
negative_promptinstead of overloading the main prompt. - Reuse
seedwhen iterating so you can compare prompt changes without fully changing the composition. - Keep sizing model-aware. Some models use
width/height, some useaspect_ratio, and resolution-tier models useaspect_ratioplusresolution. - Use
variantsduring 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.