# Venice AI Image Generation (OpenAI-Compatible)

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

Generates images from a text prompt using Venice's AI models via an OpenAI-compatible endpoint, returning base64 or data URL images.

## Facts

- Endpoint: POST https://api.venice.ai/api/v1/images/generations
- Price: $10/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/venice-ai-image-generation-openai-compatible-a41d32c1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_l_oH4hgxaKgXVlB06JXDU

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-openai-compatible-a41d32c1 -d '<json body>'
```

Example prompt: Generate an image of a beautiful sunset over mountain ranges at 1024x1024 resolution using Venice AI's default image model, with natural style and auto moderation.

## When to prefer this

Choose this endpoint when you need a drop-in OpenAI images/generations replacement that runs on Venice AI infrastructure, especially when privacy or unrestricted generation matters, or when you are already using the OpenAI SDK and want minimal code changes. Prefer the native Venice image endpoint for access to Venice's full feature set.

## Known failure modes

- 402 Payment Required — insufficient USDC balance; response includes top-up instructions
- 400 Bad Request — prompt missing or exceeds 1500 character limit
- 400 Bad Request — invalid size enum value provided
- Model not found — falls back to Venice default image model silently
- Moderation rejection — prompt flagged and image blurred or refused under auto moderation

## How this service works

OpenAI-compatible image generation.

## Output

Returns a JSON object with a 'created' Unix timestamp and a 'data' array containing either a base64-encoded image string (b64_json) or a data URL string (url) of the generated image.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "prompt"
 ],
 "properties": {
  "n": {
   "type": "integer",
   "default": 1,
   "example": 1,
   "maximum": 1,
   "minimum": 1,
   "nullable": true,
   "description": "Number of images to generate. Venice presently only supports 1 image per request."
  },
  "size": {
   "enum": [
    "auto",
    "256x256",
    "512x512",
    "1024x1024",
    "1536x1024",
    "1024x1536",
    "1792x1024",
    "1024x1792"
   ],
   "type": "string",
   "default": "auto",
   "example": "1024x1024",
   "nullable": true,
   "description": "Size of generated images. Default is 1024x1024"
  },
  "user": {
   "type": "string",
   "example": "user123",
   "description": "This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API"
  },
  "model": {
   "type": "string",
   "default": "default",
   "example": "grok-imagine-image",
   "description": "The model to use for image generation. Defaults to Venice's default image model. If a non-existent model is specified (ie an OpenAI model name), it will default to Venice's default image model."
  },
  "style": {
   "enum": [
    "vivid",
    "natural"
   ],
   "type": "string",
   "default": "natural",
   "example": "natural",
   "nullable": true,
   "description": "This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API"
  },
  "prompt": {
   "type": "string",
   "example": "A beautiful sunset over mountain ranges",
   "maxLength": 1500,
   "minLength": 1,
   "description": "A text description of the desired image."
  },
  "quality": {
   "enum": [
    "auto",
    "high",
    "medium",
    "low",
    "hd",
    "standard"
   ],
   "type": "string",
   "default": "auto",
   "example": "auto",
   "nullable": true,
   "description": "This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API"
  },
  "background": {
   "enum": [
    "transparent",
    "opaque",
    "auto"
   ],
   "type": "string",
   "default": "auto",
   "example": "auto",
   "nullable": true,
   "description": "This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API"
  },
  "moderation": {
   "enum": [
    "low",
    "auto"
   ],
   "type": "string",
   "default": "auto",
   "example": "auto",
   "nullable": true,
   "description": "auto enables safe venice mode which will blur out adult content. low disables safe venice mode."
  },
  "output_format
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "created",
  "data"
 ],
 "properties": {
  "data": {
   "type": "array",
   "items": {
    "anyOf": [
     {
      "type": "object",
      "required": [
       "b64_json"
      ],
      "properties": {
       "b64_json": {
        "type": "string",
        "example": "iVBORw0KGgoAAAANSUhEUgAA...",
        "description": "Base64-encoded JSON string of the generated image"
       }
      }
     },
     {
      "type": "object",
      "required": [
       "url"
      ],
      "properties": {
       "url": {
        "type": "string",
        "example": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
        "description": "Data URL of the generated image"
       }
      }
     }
    ]
   }
  },
  "created": {
   "type": "integer",
   "example": 1713833628,
   "description": "Unix timestamp for when the request was created"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/venice-ai-image-generation-openai-compatible-a41d32c1/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)
