venice-image-generate
Original:🇺🇸 English
Translated
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, aspect_ratio, resolution, safe_mode, watermark), and response formats.
8installs
Sourceveniceai/skills
Added on
NPX Install
npx skill4agent add veniceai/skills venice-image-generateTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Venice Image Generation
Two text-to-image endpoints:
- — Venice-native, full control (negative prompts, CFG, seed, up to 4 variants).
POST /api/v1/image/generate - — OpenAI-compatible, fewer knobs but drop-in for the OpenAI SDK.
POST /api/v1/images/generations
Plus:
- — list of style preset names for
GET /api/v1/image/styles.style_preset
For editing / upscaling / multi-image / background removal, see .
venice-image-editUse when
- You need to generate images from text prompts.
- You need multiple variants in one call.
- You're porting from OpenAI's and want a zero-change SDK swap.
images.generate - You want to browse style presets before committing to one.
/image/generate
— Venice-native
/image/generateRequest
bash
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
| Field | Type | Default | Notes |
|---|---|---|---|
| string | — | Required. Image model ID. |
| string | — | Required. Max |
| string | — | Describe what not to show. Same character cap as prompt. |
| int | 1024, 1024 | ≤ 1280 each. Must be divisible by |
| string | — | |
| string | — | |
| number | model default | 0 < x ≤ 20. Higher = more prompt adherence. |
| int | 8 | Inference steps. Some models ignore it (e.g. Turbo). |
| int | 0 | |
| int | 1 | 1–4. Only if |
| int | — | 0–100 when model uses Loras. |
| string | — | Value from |
| | | Response image format. |
| bool | | |
| bool | | Embed prompt info in EXIF. |
| bool | | Venice may still watermark certain content. |
| bool | | Blurs adult content. |
| bool | | Only some models. Charges extra. |
| — | — | Deprecated since May 19 2025. A new inpaint API is forthcoming. |
Response (JSON, return_binary: false
)
return_binary: falsejson
{
"id": "...",
"images": ["<base64>", "<base64>"],
"timing": {...},
"request": {...}
}With , response is raw (or /) with matching .
return_binary: trueimage/webppngjpegContent-Type/images/generations
— OpenAI-compatible
/images/generationsUse this if you're already on the OpenAI SDK. Field names match .
openai.images.generate()ts
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_jsonMapped fields
| Field | Values | Notes |
|---|---|---|
| string, default | Unknown model IDs fall back to Venice's default. |
| string, ≤ 1500 chars | Required. |
| | — |
| | Defaults to |
| | |
| | — |
| | Venice only supports a single image per call here. |
| — | Accepted for OpenAI compat, not used by Venice. |
If you need , , , , or , switch to .
variantsseednegative_promptcfg_scalestyle_preset/image/generate/image/styles
— list presets
/image/stylesbash
curl https://api.venice.ai/api/v1/image/styles \
-H "Authorization: Bearer $VENICE_API_KEY"Returns a list of , each with a you can pass to . Cache this — it's small and stable.
styles[]namestyle_presetChoosing a model
bash
curl "https://api.venice.ai/api/v1/models?type=image" \
-H "Authorization: Bearer $VENICE_API_KEY"Inspect per-model :
model_spec- —
constraints.widthHeightDivisorandwidthmust both be divisible by this.height - +
constraints.aspectRatios[]— if present, the model supports aspect-ratio-driven sizing.defaultAspectRatio - +
constraints.resolutions[]— if present, the model supportsdefaultResolution(resolution/1K/2K).4K - — step bounds (some models ignore
constraints.steps.{default,max}entirely).steps - — max prompt length (also applies to
constraints.promptCharacterLimit).negative_prompt - — flat USD per image, or
pricing.generation.usdfor resolution-tiered models.pricing.resolutions[].usd
Pick a model that matches the feature + size combo you plan to use.
Common patterns
Fixed-seed A/B test
json
{"model": "z-image-turbo", "prompt": "...", "seed": 42, "variants": 4}Aspect-ratio-driven model (Nano Banana family)
json
{"model": "nano-banana-2", "prompt": "...", "aspect_ratio": "16:9", "resolution": "2K"}(Other nano-banana variants: . Always verify the current ID via .)
nano-banana-proGET /models?type=imageStyle preset + negative
json
{
"model": "z-image-turbo",
"prompt": "a red sports car in a parking lot",
"negative_prompt": "blurry, people, clouds",
"style_preset": "3D Model"
}Stream binary to disk (Node)
ts
const res = await fetch('https://api.venice.ai/api/v1/image/generate', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.VENICE_API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ model: 'z-image-turbo', prompt: '...', return_binary: true }),
})
if (!res.ok) throw new Error(await res.text())
const buf = Buffer.from(await res.arrayBuffer())
await fs.writeFile('out.webp', buf)Errors
| Code | Meaning |
|---|---|
| Bad params (e.g. dimensions not divisible by |
| Auth or Pro-only model. |
| Insufficient balance. Bearer: plain |
| Wrong |
| Rate limited. |
| Inference or capacity issue — retry with jitter. |
(Content-policy violations on come back as with an error string, not — the shape is specific to audio generation paths.)
/image/generate400422422Gotchas
- Each model picks one sizing idiom: either /
width,height+aspect_ratio, or (OpenAI-compat)resolution. Match the model'ssize.constraints - requires
variants > 1(JSON with base64 array).return_binary: false - is ignored by fast/turbo models; they hardcode step count internally.
steps - is advisory — Venice may still watermark content flagged by safety classifiers.
hide_watermark: true - Old field is deprecated; don't use it.
inpaint - For OpenAI-compat, returns a data URL, not a hosted URL — plan for that if you're saving to storage.
response_format: "url"