Loading...
Loading...
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.
npx skill4agent add veniceai/skills venice-image-generatePOST /api/v1/image/generatePOST /api/v1/images/generationsGET /api/v1/image/stylesstyle_presetvenice-image-editimages.generate/image/generatecurl 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
}'| 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. |
return_binary: false{
"id": "...",
"images": ["<base64>", "<base64>"],
"timing": {...},
"request": {...}
}return_binary: trueimage/webppngjpegContent-Type/images/generationsopenai.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| 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. |
variantsseednegative_promptcfg_scalestyle_preset/image/generate/image/stylescurl https://api.venice.ai/api/v1/image/styles \
-H "Authorization: Bearer $VENICE_API_KEY"styles[]namestyle_presetcurl "https://api.venice.ai/api/v1/models?type=image" \
-H "Authorization: Bearer $VENICE_API_KEY"model_specconstraints.widthHeightDivisorwidthheightconstraints.aspectRatios[]defaultAspectRatioconstraints.resolutions[]defaultResolutionresolution1K2K4Kconstraints.steps.{default,max}stepsconstraints.promptCharacterLimitnegative_promptpricing.generation.usdpricing.resolutions[].usd{"model": "z-image-turbo", "prompt": "...", "seed": 42, "variants": 4}{"model": "nano-banana-2", "prompt": "...", "aspect_ratio": "16:9", "resolution": "2K"}nano-banana-proGET /models?type=image{
"model": "z-image-turbo",
"prompt": "a red sports car in a parking lot",
"negative_prompt": "blurry, people, clouds",
"style_preset": "3D Model"
}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)| 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. |
/image/generate400422422widthheightaspect_ratioresolutionsizeconstraintsvariants > 1return_binary: falsestepshide_watermark: trueinpaintresponse_format: "url"