Skip to main content
POST
/
v1
/
images
/
generations
Create image
curl --request POST \
  --url https://api.vivgrid.com/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-image-1",
  "prompt": "A cozy reading nook with plants and warm light",
  "size": "1024x1024",
  "response_format": "url"
}
'
{
  "created": 1710000000,
  "data": [
    {
      "url": "https://example.com/image.png"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
model
string
required

The model to use for image generation. gpt-image-1.5 supported.

prompt
string
required

A text description of the desired image(s). The maximum length is 32000 characters.

n
integer
default:1

The number of images to generate. Must be between 1 and 10.

Required range: 1 <= x <= 10
size
enum<string>
default:auto

The size of the generated images. Must be one of 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default value).

Available options:
1024x1024,
1536x1024,
1024x1536,
auto
quality
enum<string>
default:auto

The quality of the generated images.

Available options:
auto,
high,
medium,
low
output_format
enum<string>
default:png

The format in which the generated images are returned.

Available options:
png,
jpeg,
webp
output_compression
integer
default:100

The compression level of the output images, between 0 (no compression) and 100 (maximum compression).

Required range: 0 <= x <= 100
user
string

Response

Image generation response

data
object[]
required
created
integer<int64>