Estimate

Our estimates will allow you to predict the amount of time required and the number of credits that would be consumed in order to run a set of enhancements on a given image with certain input parameters.

Estimate

post

Validates the request against our standard models and returns the estimated time taken to complete a given processing job and the credits that would be consumed for that job.

Authorizations
X-API-KeystringRequired

Authentication via the Topaz generated key in the X-API-Key header.

Body
categorystring · enumOptional

Indicates which category of model is being used.

Default: EnhancePossible values:
modelstring · enumOptional

The model to use for processing the image.

Default: Standard V2Possible values:
input_heightinteger · min: 1 · max: 32000Required

The height of the input image in pixels.

Example: 1080
input_widthinteger · min: 1 · max: 32000Required

The width of the input image in pixels.

Example: 1920
output_heightinteger · min: 1 · max: 32000Optional

The desired height of the output image in pixels. Your image will automatically be upscaled to this specified value. If only one of output_height and output_width is set, then the other dimension is scaled proportionally. Only applicable for Enhance models.

Example: 1080
output_widthinteger · min: 1 · max: 32000Optional

The desired width of the output image in pixels. Your image will automatically be upscaled to this specified value. If only one of output_height and output_width is set, then the other dimension is scaled proportionally. Only applicable for Enhance models.

Example: 1920
crop_to_fillbooleanOptional

Default behavior is to letterbox the image if a differing aspect ratio is chosen. Enable crop_to_fill by setting this to true if you instead want to crop the image to fill the dimensions.

Default: false
output_formatstring · enumOptional

The desired format of the output image.

Default: jpegPossible values:
Other propertiesstringOptional

Additional key-value pairs to be used as model settings. Only pairs relevant for your chosen model are used. Please see the available models for more details.

Responses
post
/estimate
POST /image/v1/estimate HTTP/1.1
Host: api.topazlabs.com
X-API-Key: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 201

{
  "category": "Enhance",
  "model": "Standard V2",
  "input_height": 1080,
  "input_width": 1920,
  "output_height": 1080,
  "output_width": 1920,
  "crop_to_fill": false,
  "output_format": "jpeg",
  "ANY_ADDITIONAL_PROPERTY": "text"
}
{
  "duration": 30,
  "credits": 2
}

Estimate Generative

post

Validates the request against our generative models and returns the estimated time taken to complete a given processing job and the credits that would be consumed for that job.

Authorizations
X-API-KeystringRequired

Authentication via the Topaz generated key in the X-API-Key header.

Body
categorystring · enumOptional

Indicates which category of model is being used.

Default: EnhancePossible values:
modelstring · enumOptional

The model to use for processing the image.

Default: RedefinePossible values:
input_heightinteger · min: 1 · max: 32000Required

The height of the input image in pixels.

Example: 1080
input_widthinteger · min: 1 · max: 32000Required

The width of the input image in pixels.

Example: 1920
output_heightinteger · min: 1 · max: 32000Optional

The desired height of the output image in pixels. Your image will automatically be upscaled to this specified value. If only one of output_height and output_width is set, then the other dimension is scaled proportionally. Only applicable for Enhance models.

Example: 1080
output_widthinteger · min: 1 · max: 32000Optional

The desired width of the output image in pixels. Your image will automatically be upscaled to this specified value. If only one of output_height and output_width is set, then the other dimension is scaled proportionally. Only applicable for Enhance models.

Example: 1920
crop_to_fillbooleanOptional

Default behavior is to letterbox the image if a differing aspect ratio is chosen. Enable crop_to_fill by setting this to true if you instead want to crop the image to fill the dimensions.

Default: false
output_formatstring · enumOptional

The desired format of the output image.

Default: jpegPossible values:
Other propertiesstringOptional

Additional key-value pairs to be used as model settings. Only pairs relevant for your chosen model are used. Please see the available models for more details.

Responses
post
/estimate-gen
POST /image/v1/estimate-gen HTTP/1.1
Host: api.topazlabs.com
X-API-Key: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 198

{
  "category": "Enhance",
  "model": "Redefine",
  "input_height": 1080,
  "input_width": 1920,
  "output_height": 1080,
  "output_width": 1920,
  "crop_to_fill": false,
  "output_format": "jpeg",
  "ANY_ADDITIONAL_PROPERTY": "text"
}
{
  "duration": 30,
  "credits": 2
}

Estimate Bulk

post

Validates a list of requests and returns the estimated time taken to complete a given processing job and the credits that would be consumed for each job.

Authorizations
X-API-KeystringRequired

Authentication via the Topaz generated key in the X-API-Key header.

Bodyobject[]
categorystring · enumOptional

Indicates which category of model is being used.

Default: EnhancePossible values:
modelstring · enumOptional

The model to use for processing the image.

Default: Standard V2Possible values:
input_heightinteger · min: 1 · max: 32000Required

The height of the input image in pixels.

Example: 1080
input_widthinteger · min: 1 · max: 32000Required

The width of the input image in pixels.

Example: 1920
output_heightinteger · min: 1 · max: 32000Optional

The desired height of the output image in pixels. Your image will automatically be upscaled to this specified value. If only one of output_height and output_width is set, then the other dimension is scaled proportionally. Only applicable for Enhance models.

Example: 1080
output_widthinteger · min: 1 · max: 32000Optional

The desired width of the output image in pixels. Your image will automatically be upscaled to this specified value. If only one of output_height and output_width is set, then the other dimension is scaled proportionally. Only applicable for Enhance models.

Example: 1920
crop_to_fillbooleanOptional

Default behavior is to letterbox the image if a differing aspect ratio is chosen. Enable crop_to_fill by setting this to true if you instead want to crop the image to fill the dimensions.

Default: false
output_formatstring · enumOptional

The desired format of the output image.

Default: jpegPossible values:
Other propertiesstringOptional

Additional key-value pairs to be used as model settings. Only pairs relevant for your chosen model are used. Please see the available models for more details.

Responses
post
/estimate-bulk
POST /image/v1/estimate-bulk HTTP/1.1
Host: api.topazlabs.com
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 203

[
  {
    "category": "Enhance",
    "model": "Standard V2",
    "input_height": 1080,
    "input_width": 1920,
    "output_height": 1080,
    "output_width": 1920,
    "crop_to_fill": false,
    "output_format": "jpeg",
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
]
[
  {
    "duration": 30,
    "credits": 2,
    "status": "success"
  }
]

Last updated