# Venice AI Image Generation

> Venice AI Image Generation is a paid API for AI agents from api.venice.ai, paid per call via x402, $10/call, status unknown (last checked 2026-10-12).

Generates one or more images from a text prompt using configurable AI models, returning base64-encoded image data

## Facts

- Endpoint: POST https://api.venice.ai/api/v1/image/generate?utm_source=zero.xyz
- Price: $10/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 2
- Tags: x402
- Canonical page: https://www.zero.xyz/c/venice-ai-image-generation-32bbbaa1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jU_UMgWtpiWOycCgXazli

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability venice-ai-image-generation-32bbbaa1 -d '<json body>'
```

Example prompt: Generate an image of a futuristic city skyline at night with neon lights reflecting off rain-soaked streets — use the flux-dev model, make it 1280x1024, PNG format, high quality, and give me 2 variants.

## When to prefer this

Use this endpoint when you need to generate images from text prompts via Venice AI's private, uncensored generative models with flexible output format, size, and quality controls. Prefer this over OpenAI image endpoints when privacy is a priority or when using x402 wallet-based micropayments. Best when you need multiple variants or reproducible outputs via seed control.

## Known failure modes

- 402 Payment Required — insufficient USDC balance; response includes top-up instructions for x402 wallet
- 400 Bad Request — missing required fields (model or prompt), prompt exceeds character limit, or invalid dimension values
- 401 Unauthorized — missing or invalid Bearer token or X-Sign-In-With-X header
- 422 Unprocessable Entity — invalid enum values for format or quality, or out-of-range numeric parameters
- 503/timeout — model inference queue overloaded or model unavailable

## How this service works

Image generation (Venice native).

## Output

Returns a JSON object containing a request ID, an array of base64-encoded image strings (one per variant), and a timing breakdown including total duration, inference duration, queue time, and preprocessing time. Images are in the requested format (jpeg, png, or webp).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "model",
  "prompt"
 ],
 "properties": {
  "seed": {
   "type": "integer",
   "default": 0,
   "example": 123456789,
   "maximum": 999999999,
   "minimum": -999999999,
   "description": "Random seed for generation. If not provided, a random seed will be used."
  },
  "model": {
   "type": "string",
   "example": "grok-imagine-image",
   "description": "The model to use for image generation."
  },
  "steps": {
   "type": "integer",
   "default": 8,
   "example": 8,
   "description": "Number of inference steps. This model does not support steps - this field is ignored."
  },
  "width": {
   "type": "integer",
   "default": 1024,
   "example": 1024,
   "maximum": 1280,
   "minimum": 0,
   "description": "Width of the generated image.",
   "exclusiveMinimum": true
  },
  "format": {
   "enum": [
    "jpeg",
    "png",
    "webp"
   ],
   "type": "string",
   "default": "webp",
   "example": "webp",
   "description": "The image format to return. WebP are smaller and optimized for web use. PNG are higher quality but larger in file size. "
  },
  "height": {
   "type": "integer",
   "default": 1024,
   "example": 1024,
   "maximum": 1280,
   "minimum": 0,
   "description": "Height of the generated image.",
   "exclusiveMinimum": true
  },
  "prompt": {
   "type": "string",
   "example": "A beautiful sunset over a mountain range",
   "maxLength": 7500,
   "minLength": 1,
   "description": "The description for the image. Character limit is model specific and is listed in the promptCharacterLimit setting in the model list endpoint."
  },
  "inpaint": {
   "nullable": true,
   "deprecated": true,
   "description": "This feature is deprecated and was disabled on May 19th, 2025. A revised in-painting API will be launched in the near future."
  },
  "quality": {
   "enum": [
    "low",
    "medium",
    "high"
   ],
   "type": "string",
   "example": "high",
   "description": "Output quality for supported models (e.g. GPT Image 2 / GPT Image 2 Edit). Higher values can increase the final request charge. See the model list for supported options."
  },
  "variants": {
   "type": "integer",
   "example": 3,
   "maximum": 4,
   "minimum": 1,
   "description": "Number of images to generate (1–4). Only supported when return_binary is false."
  },
  "cfg_scale": {
   "type": "number",
   "example": 7.5,
   "maximum": 20,
   "minimum": 0,
   "description": "CFG scale parameter. Higher values lead to more adherence to the prompt.",
   "exclus
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "id",
  "images",
  "timing"
 ],
 "properties": {
  "id": {
   "type": "string",
   "example": "generate-image-1234567890",
   "description": "The ID of the request."
  },
  "images": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Base64 encoded image data."
  },
  "timing": {
   "type": "object",
   "required": [
    "inferenceDuration",
    "inferencePreprocessingTime",
    "inferenceQueueTime",
    "total"
   ],
   "properties": {
    "total": {
     "type": "number",
     "description": "Total duration of the request in milliseconds"
    },
    "inferenceDuration": {
     "type": "number",
     "description": "Duration of inference in milliseconds"
    },
    "inferenceQueueTime": {
     "type": "number",
     "description": "Duration of queueing in milliseconds"
    },
    "inferencePreprocessingTime": {
     "type": "number",
     "description": "Duration of preprocessing in milliseconds"
    }
   }
  },
  "request": {
   "nullable": true,
   "description": "The original request data sent to the API."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/venice-ai-image-generation-32bbbaa1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.venice.ai](https://www.zero.xyz/host/api.venice.ai/llms.txt)
