Images
A text description of the desired image(s).
GPT Image 2The number of images to generate. Must be between 1 and 10.
1The quality of the generated images. Supported values depend on the model: GPT Image models accept low, medium, high, and auto; standard and hd are DALL-E values and are rejected by GPT Image models.
The format of the generated images. The currently available models (GPT Image, Imagen) ignore this parameter and always return base64-encoded images (b64_json); url only applies to models that support hosted image URLs.
The size of the generated images. Supported values depend on the model: GPT Image models accept 1024x1024, 1536x1024, 1024x1536, and auto; the remaining values are DALL-E sizes.
The style of the generated images. DALL-E parameter; accepted but ignored by GPT Image models.
Represents an image response returned by model, based on the provided input.
The Unix timestamp (in seconds) of when the images were created.
The background setting of the generated images. Returned by GPT Image models.
The output format of the generated images. Returned by GPT Image models.
The quality of the generated images. Returned by GPT Image models.
The size of the generated images. Returned by GPT Image models.
The upstream provider that served the request (e.g. vertex-ai). Returned for some providers.
Invalid request data.
The company has run out of AI credits. Returned when the company's budget limit has been reached.
Server error.
POST /v1/images/generations HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"model": "GPT Image 2",
"prompt": "three letters 'r' with strawberry texture"
}{
"created": 1,
"data": [
{
"b64_json": "text",
"revised_prompt": "text",
"url": "text"
}
],
"background": "text",
"output_format": "text",
"quality": "text",
"size": "text",
"provider": "text",
"usage": {
"input_tokens": 1,
"input_tokens_details": {
"image_tokens": 1,
"text_tokens": 1
},
"output_tokens": 1,
"output_tokens_details": {
"image_tokens": 1,
"text_tokens": 1
},
"total_tokens": 1,
"nexos_credits_cost": 1
}
}Last updated

