Image
/api/v1/image/generations
Generate an image based on input parameters using an OpenAI compatible endpoint. This endpoint does not support the full feature set of the Venice Image Generation endpoint, but is compatible with the existing OpenAI endpoint.
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/images/generations
Request
- Base URL: https://api.venice.ai
- URL: https://api.venice.ai/api/v1/images/generations
- Auth: one of:
- HTTP bearer
- API key in header SIGN-IN-WITH-X
Headers
Accept-Encodingstring
Example:gzip, br
Supported compression encodings (gzip, br).
Request body
Example request
{
"background": "auto",
"model": "grok-imagine-image",
"moderation": "auto",
"n": 1,
"output_format": "png",
"prompt": "A beautiful sunset over mountain ranges",
"quality": "auto",
"response_format": "b64_json",
"size": "1024x1024",
"style": "natural",
"user": "user123",
"anon_user_id": "end-user-123"
}Response
Successfully generated image
Example response
{
"created": 1713833628,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA..."
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.