# 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

> 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.<br>

```json
{"openapi":"3.1.2","info":{"title":"Image API","version":"1.2.0"},"tags":[{"name":"Estimate","description":"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.\n"}],"servers":[{"url":"https://api.topazlabs.com/image/v1","description":"Production Base URL"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Authentication via the Topaz generated key in the `X-API-Key` header.\n"}},"schemas":{"EstimateGANRequest":{"type":"object","required":["input_height","input_width"],"properties":{"category":{"type":"string","description":"Indicates which category of model is being used.","enum":["Enhance","Sharpen","Denoise","Restore","Lighting","Matting","Tool"],"default":"Enhance"},"model":{"type":"string","description":"The model to use for processing the image.","enum":["Standard V2","Low Resolution V2","CGI","High Fidelity V2","Text Refine","Standard","Strong","Lens Blur","Lens Blur V2","Motion Blur","Natural","Refocus","Wildlife","Portrait","Normal","Extreme","Adjust","Adjust V2","White Balance","Colorize","Object","Transparency Upscale"],"default":"Standard V2"},"input_height":{"type":"integer","description":"The height of the input image in pixels.","minimum":1,"maximum":32000},"input_width":{"type":"integer","description":"The width of the input image in pixels.","minimum":1,"maximum":32000},"output_height":{"type":"integer","description":"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.","minimum":1,"maximum":32000},"output_width":{"type":"integer","description":"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.","minimum":1,"maximum":32000},"crop_to_fill":{"type":"boolean","description":"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_format":{"type":"string","description":"The desired format of the output image.","enum":["jpeg","jpg","png","tiff","tif"],"default":"jpeg"}},"additionalProperties":{"type":"string","description":"Additional key-value pairs to be used as model settings. Only pairs relevant for your chosen model are used. Please see the [available models](https://developer.topazlabs.com/image-api/available-models) for more details."}},"EstimationResponse":{"type":"object","required":["duration","credits"],"properties":{"duration":{"type":"integer","description":"The estimated time taken in seconds for the image to be enhanced with the given parameters.","minimum":0},"credits":{"type":"integer","description":"The number of credits that would be consumed if the given requests was executed.","minimum":1}}}},"responses":{"BadRequestEstimate":{"description":"The request contains malformed data in the body, path, or query parameters.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"Unauthorized":{"description":"Authentication is required and has failed or has not yet been provided.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"Forbidden":{"description":"The API key doesn't have permissions to perform the request.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"TooManyRequests":{"description":"Too many requests hit the API too quickly. A backoff (e.g. exponential) is recommended for your requests.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"InternalServerError":{"description":"Unexpected error on our end.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}}}},"paths":{"/estimate":{"post":{"tags":["Estimate"],"summary":"Estimate","operationId":"postEstimate","description":"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.\n","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/EstimateGANRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/EstimateGANRequest"}}}},"responses":{"200":{"description":"The estimated time taken in seconds and the credits that would be consumed on process.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimationResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestEstimate"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Estimate Generative

> 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.<br>

```json
{"openapi":"3.1.2","info":{"title":"Image API","version":"1.2.0"},"tags":[{"name":"Estimate","description":"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.\n"}],"servers":[{"url":"https://api.topazlabs.com/image/v1","description":"Production Base URL"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Authentication via the Topaz generated key in the `X-API-Key` header.\n"}},"schemas":{"EstimateGenRequest":{"type":"object","required":["input_height","input_width"],"properties":{"category":{"type":"string","description":"Indicates which category of model is being used.","enum":["Enhance","Sharpen","Denoise","Restore","Lighting","Matting","Tool"],"default":"Enhance"},"model":{"type":"string","description":"The model to use for processing the image.","enum":["Standard MAX","Recovery V2","Wonder","Redefine","Super Focus V2","Dust-Scratch","Dust-Scratch V2"],"default":"Redefine"},"input_height":{"type":"integer","description":"The height of the input image in pixels.","minimum":1,"maximum":32000},"input_width":{"type":"integer","description":"The width of the input image in pixels.","minimum":1,"maximum":32000},"output_height":{"type":"integer","description":"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.","minimum":1,"maximum":32000},"output_width":{"type":"integer","description":"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.","minimum":1,"maximum":32000},"crop_to_fill":{"type":"boolean","description":"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_format":{"type":"string","description":"The desired format of the output image.","enum":["jpeg","jpg","png","tiff","tif"],"default":"jpeg"}},"additionalProperties":{"type":"string","description":"Additional key-value pairs to be used as model settings. Only pairs relevant for your chosen model are used. Please see the [available models](https://developer.topazlabs.com/image-api/available-models) for more details."}},"EstimationResponse":{"type":"object","required":["duration","credits"],"properties":{"duration":{"type":"integer","description":"The estimated time taken in seconds for the image to be enhanced with the given parameters.","minimum":0},"credits":{"type":"integer","description":"The number of credits that would be consumed if the given requests was executed.","minimum":1}}}},"responses":{"BadRequestEstimate":{"description":"The request contains malformed data in the body, path, or query parameters.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"Unauthorized":{"description":"Authentication is required and has failed or has not yet been provided.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"Forbidden":{"description":"The API key doesn't have permissions to perform the request.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"TooManyRequests":{"description":"Too many requests hit the API too quickly. A backoff (e.g. exponential) is recommended for your requests.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"InternalServerError":{"description":"Unexpected error on our end.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}}}},"paths":{"/estimate-gen":{"post":{"tags":["Estimate"],"summary":"Estimate Generative","operationId":"postEstimateGen","description":"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.\n","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/EstimateGenRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/EstimateGenRequest"}}}},"responses":{"200":{"description":"The estimated time taken in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimationResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestEstimate"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Estimate Bulk

> 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.<br>

```json
{"openapi":"3.1.2","info":{"title":"Image API","version":"1.2.0"},"tags":[{"name":"Estimate","description":"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.\n"}],"servers":[{"url":"https://api.topazlabs.com/image/v1","description":"Production Base URL"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Authentication via the Topaz generated key in the `X-API-Key` header.\n"}},"schemas":{"EstimateBulkRequest":{"type":"array","items":{"type":"object","required":["input_height","input_width"],"properties":{"category":{"type":"string","description":"Indicates which category of model is being used.","enum":["Enhance","Sharpen","Denoise","Restore","Lighting"],"default":"Enhance"},"model":{"type":"string","description":"The model to use for processing the image.","enum":["Standard V2","Low Resolution V2","CGI","High Fidelity V2","Text Refine","Standard MAX","Recovery V2","Wonder","Redefine","Standard","Strong","Lens Blur","Lens Blur V2","Motion Blur","Natural","Refocus","Wildlife","Portrait","Super Focus V2","Normal","Extreme","Dust-Scratch","Dust-Scratch V2","Adjust","Adjust V2","White Balance","Colorize","Object","Transparency Upscale"],"default":"Standard V2"},"input_height":{"type":"integer","description":"The height of the input image in pixels.","minimum":1,"maximum":32000},"input_width":{"type":"integer","description":"The width of the input image in pixels.","minimum":1,"maximum":32000},"output_height":{"type":"integer","description":"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.","minimum":1,"maximum":32000},"output_width":{"type":"integer","description":"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.","minimum":1,"maximum":32000},"crop_to_fill":{"type":"boolean","description":"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_format":{"type":"string","description":"The desired format of the output image.","enum":["jpeg","jpg","png","tiff","tif"],"default":"jpeg"}},"additionalProperties":{"type":"string","description":"Additional key-value pairs to be used as model settings. Only pairs relevant for your chosen model are used. Please see the [available models](https://developer.topazlabs.com/image-api/available-models) for more details."}}},"EstimationBulkResponse":{"type":"array","items":{"oneOf":[{"type":"object","required":["duration","credits","status"],"properties":{"duration":{"type":"integer","description":"The estimated time taken in seconds for the image to be enhanced with the given parameters.","minimum":0},"credits":{"type":"integer","description":"The number of credits that would be consumed if the given requests was executed.","minimum":1},"status":{"type":"string","enum":["success"],"description":"Indicates that the estimation for this item in the bulk request was successful."}}},{"type":"object","required":["status","code","message"],"properties":{"status":{"type":"string","enum":["error"],"description":"Indicates that an error occurred while processing this item in the bulk request."},"code":{"type":"integer","description":"HTTP-like error code"},"message":{"type":"string","description":"Error message"}}}]}}},"responses":{"BadRequestEstimate":{"description":"The request contains malformed data in the body, path, or query parameters.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"Unauthorized":{"description":"Authentication is required and has failed or has not yet been provided.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"Forbidden":{"description":"The API key doesn't have permissions to perform the request.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"TooManyRequests":{"description":"Too many requests hit the API too quickly. A backoff (e.g. exponential) is recommended for your requests.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}},"InternalServerError":{"description":"Unexpected error on our end.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"code":{"type":"integer","description":"The HTTP status code."},"message":{"type":"string","description":"A human readable error message."}}}}}}}},"paths":{"/estimate-bulk":{"post":{"tags":["Estimate"],"summary":"Estimate Bulk","operationId":"postEstimateBulk","description":"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.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateBulkRequest"}}}},"responses":{"200":{"description":"The estimated time taken in seconds and the credits that would be consumed on process.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimationBulkResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestEstimate"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
