Skip to main content
POST
/api/v1/image/generations

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求头

Accept-Encoding
string

Supported compression encodings (gzip, br).

示例:

"gzip, br"

请求体

application/json
prompt
string
必填

A text description of the desired image.

Required string length: 1 - 1500
示例:

"A beautiful sunset over mountain ranges"

background
enum<string> | null
默认值:auto

This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API

可用选项:
transparent,
opaque,
auto
示例:

"auto"

model
string
默认值:default

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.

示例:

"grok-imagine-image"

moderation
enum<string> | null
默认值:auto

auto enables safe venice mode which will blur out adult content. low disables safe venice mode.

可用选项:
low,
auto
示例:

"auto"

n
integer | null
默认值:1

Number of images to generate. Venice presently only supports 1 image per request.

必填范围: 1 <= x <= 1
示例:

1

output_compression
integer | null
默认值:100

This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API

必填范围: 0 <= x <= 100
output_format
enum<string>
默认值:png

Output format for generated images

可用选项:
jpeg,
png,
webp
示例:

"png"

quality
enum<string> | null
默认值:auto

This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API

可用选项:
auto,
high,
medium,
low,
hd,
standard
示例:

"auto"

response_format
enum<string> | null
默认值:b64_json

Response format. URL will be a data URL.

可用选项:
b64_json,
url
示例:

"b64_json"

size
enum<string> | null
默认值:auto

Size of generated images. Default is 1024x1024

可用选项:
auto,
256x256,
512x512,
1024x1024,
1536x1024,
1024x1536,
1792x1024,
1024x1792
示例:

"1024x1024"

style
enum<string> | null
默认值:natural

This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API

可用选项:
vivid,
natural
示例:

"natural"

user
string

This parameter is discarded and is supported for compatibility with OpenAI API. It is not an alias of anon_user_id.

示例:

"user123"

anon_user_id
string

Optional identifier for the API customer's end user. Combined with the Venice user id when attributing the request to upstream providers. Distinct from the discarded OpenAI user field. Must be printable ASCII and must not contain ||.

Required string length: 1 - 128
Pattern: ^[\x20-\x7E]+$
示例:

"end-user-123"

响应

Successfully generated image

created
integer
必填

Unix timestamp for when the request was created

示例:

1713833628

data
object[]
必填