Image
/api/v1/image/generate
Generate an image based on input parameters
Authentication: This endpoint accepts either a Bearer API key or a SIGN-IN-WITH-X header for x402 wallet-based authentication. The legacy X-Sign-In-With-X header is also accepted during migration. When using x402, a 402 Payment Required response indicates insufficient balance and includes top-up instructions.
post/api/v1/image/generate
Request
- Base URL: https://api.venice.ai
- URL: https://api.venice.ai/api/v1/image/generate
- Auth: one of:
- HTTP bearer
- API key in header SIGN-IN-WITH-X
Headers
Accept-Encodingstring
Example:gzip, br
Supported compression encodings (gzip, br). Only applied when return_binary is false.
Request body
Example request
{
"anon_user_id": "end-user-123",
"cfg_scale": 7.5,
"format": "webp",
"height": 1024,
"lora_strength": 50,
"model": "grok-imagine-image",
"negative_prompt": "Clouds, Rain, Snow",
"prompt": "A beautiful sunset over a mountain range",
"variants": 3,
"seed": 123456789,
"steps": 8,
"style_preset": "3D Model",
"aspect_ratio": "1:1",
"resolution": "1K",
"quality": "high",
"width": 1024,
"style_references": [
{
"image": "https://example.com/style-reference.png",
"strength": 0.5
}
]
}Response
Successfully generated image
Example response
{
"id": "generate-image-1234567890"
}Changes
No recorded changes to this operation across all 1 revision of this API.