Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Search & research

venice-image-generate

Generate images with Venice. Covers POST /image/generate (Venice-native), POST /images/generations (OpenAI-compatible), GET /image/styles (style presets), request fields (prompt, dimensions, cfg_scale, seed, variants, style_preset, style_references, aspect_ratio, resolution, safe_mode, watermark), and response formats.

veniceai · AI review on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add veniceai/skills --skill venice-image-generate

About this skill


name: venice-image-generate description: Generate images with Venice. Covers POST /image/generate (Venice-native), POST /images/generations (OpenAI-compatible), GET /image/styles (style presets), request fields (prompt, dimensions, cfg_scale, seed, variants, style_preset, style_references, aspect_ratio, resolution, safe_mode, watermark), and response formats.

Venice Image Generation

Two text-to-image endpoints:

  1. POST /api/v1/image/generate — Venice-native, full control (negative prompts, CFG, seed, up to 4 variants).
  2. POST /api/v1/images/generations — OpenAI-compatible, fewer knobs but drop-in for the OpenAI SDK.

Plus:

  • GET /api/v1/image/styles — list of style preset names for style_preset.

For editing / upscaling / multi-image / background removal, see venice-image-edit.

Use when

  • You need to generate images from text prompts.
  • You need multiple variants in one call.
  • You're porting from OpenAI's images.generate and want a zero-change SDK swap.
  • You want to browse style presets before committing to one.
  • You want generated images to match the look of existing images (style_references).

/image/generate — Venice-native

Request

curl https://api.venice.ai/api/v1/image/generate \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-image-turbo",
    "prompt": "A beautiful sunset over a mountain range",
    "width": 1024,
    "height": 1024,
    "cfg_scale": 7.5,
    "steps": 8,
    "seed": 123456789,
    "variants": 1,
    "format": "webp",
    "style_preset": "3D Model",
    "safe_mode": true
  }'

Fields

FieldTypeDefaultNotes
modelstring—Required. Image model ID. GET /models?type=image.
promptstring—Required. Max promptCharacterLimit from the model's model_spec.constraints (typically 1500–7500).
negative_promptstring—Describe what not to show. Same character cap as prompt.
width, heightint1024, 1024≤ 1280 each. Must be divisible by constraints.widthHeightDivisor on the model's model_spec.
aspect_ratiostring—"1:1", "16:9", "9:16", … — used by models like Nano Banana instead of width/height.
resolutionstring—"1K", "2K", "4K" — used by resolution-driven models.
cfg_scalenumbermodel default0 < x ≤ 20. Higher = more prompt adherence.
stepsint8Inference steps. Some models ignore it (e.g. Turbo).
seedint0-999999999..999999999. Use 0/omit for random.
variantsint11–4. Only if return_binary: false.
lora_strengthint—0–100 when model uses Loras.
style_presetstring—Value from GET /image/styles.
style_referencesarray—Reference images that guide the aesthetic of the output. Each item: { "image": <base64 or http(s) URL, <8MB>, "strength": 0.1–1 (default 0.5) }. Only on models with supportsStyleReferences: true; per-model cap in constraints.maxStyleReferences. strength is ignored when constraints.supportsStyleReferenceStrength is false.
quality"low"/"medium"/"high"—Output quality on models that support it (e.g. GPT Image 2). Higher values can raise the request charge.
enhance_promptboolfalseRewrite the prompt to add clarifying visual detail before generating. Costs extra credits when a rewrite happens and adds up to ~30 s. The final prompt returns URL-encoded in the x-venice-enhanced-prompt response header.
disable_prompt_optimization_thinkingboolmodel defaultSkip the model's prompt-optimization thinking step for speed. Only honored by models with supportsOptimizePromptThinking.
format"webp"/"png"/"jpeg"webpResponse image format.
return_binaryboolfalsetrue → binary image/* response; false → JSON with base64.
embed_exif_metadataboolfalseEmbed prompt info in EXIF.
hide_watermarkboolfalseVenice may still watermark certain content.
safe_modebooltrueBlurs adult content.
enable_web_searchboolfalseOnly some models. Charges extra.
inpaint——Deprecated since May 19 2025. A new inpaint API is forthcoming.

Response (JSON, return_binary: false)

{
  "id": "...",
  "images": ["<base64>", "<base64>"],
  "timing": {...},
  "request": {...}
}

With return_binary: true, response is raw image/webp (or png/jpeg) with matching Content-Type.

/images/generations — OpenAI-compatible

Use this if you're already on the OpenAI SDK. Field names match openai.images.generate().

import OpenAI from 'openai'

const client = new OpenAI({
  apiKey: process.env.VENICE_API_KEY,
  baseURL: 'https://api.venice.ai/api/v1',
})

const res = await client.images.generate({
  model: 'z-image-turbo',
  prompt: 'A beautiful sunset over mountain ranges',
  size: '1024x1024',
  response_format: 'b64_json',
})

const b64 = res.data[0].b64_json

Mapped fields

FieldValuesNotes
modelstring, default "default"Unknown model IDs fall back to Venice's default.
promptstring, ≤ 1500 charsRequired.
sizeauto, 256x256, 512x512, 1024x1024, 1536x1024, 1024x1536, 1792x1024, 1024x1792—
output_formatjpeg / png / webpDefaults to png.
response_formatb64_json / urlurl returns a data: URL (not a hosted URL).
moderationauto (safe mode on) / low (safe mode off)—
n1Venice only supports a single image per call here.
quality, style (vivid/natural), background, output_compression, user—Accepted for OpenAI compat, not used by Venice.

If you need variants, seed, negative_prompt, cfg_scale, style_preset, or `style_refer

Read the complete source ↗