### GET /download/output/{process_id} Source: https://developer.topazlabs.com/api-reference/image-api/enhance Provides a download link for the enhanced output image from a completed processing job. ```APIDOC ## GET /download/output/{process_id} ### Description Retrieves a temporary URL to download the enhanced output image for a specific processing job. ### Method GET ### Endpoint /download/output/{process_id} ### Parameters #### Path Parameters - **process_id** (string) - Required - The unique identifier of the image processing job. ### Response #### Success Response (200) - **body** (object) - Contains the download URL. - **download_url** (string) - A URL to download the enhanced output image. #### Response Example ```json { "download_url": "https://cdn.topazlabs.com/downloads/output/abcdef123456_enhanced.png" } ``` #### Error Responses - **400 Bad Request**: Invalid `process_id` format. - **404 Not Found**: No job or output image found for the provided `process_id`. - **408 Request Timeout**: The download link has expired. ``` -------------------------------- ### GET /download/input/{process_id} Source: https://developer.topazlabs.com/api-reference/image-api/enhance Provides a download link for the original input image associated with a completed processing job. ```APIDOC ## GET /download/input/{process_id} ### Description Retrieves a temporary URL to download the original input image for a specific processing job. ### Method GET ### Endpoint /download/input/{process_id} ### Parameters #### Path Parameters - **process_id** (string) - Required - The unique identifier of the image processing job. ### Response #### Success Response (200) - **body** (object) - Contains the download URL. - **download_url** (string) - A URL to download the original input image. #### Response Example ```json { "download_url": "https://cdn.topazlabs.com/downloads/input/abcdef123456.jpg" } ``` #### Error Responses - **400 Bad Request**: Invalid `process_id` format. - **404 Not Found**: No job or input image found for the provided `process_id`. - **408 Request Timeout**: The download link has expired. ``` -------------------------------- ### Delete All Statuses Source: https://developer.topazlabs.com/api-reference/image-api/status Removes all image processing job statuses. This is useful for cleaning up the list of finished jobs, for example, after using the 'Get All Statuses' endpoint. ```APIDOC ## DELETE /status ### Description Remove all image processing job statuses. This operation can be used to delete the statuses of finished jobs, cleaning up the response of `Get All Statuses`, for example. ### Method DELETE ### Endpoint /status ### Parameters ### Request Body This endpoint does not accept a request body. ### Request Example ```json {} ``` ### Response #### Success Response (200) - **deleted_count** (integer) - The number of statuses that were deleted. #### Response Example ```json { "deleted_count": 15 } ``` #### Error Responses - **401**: Authentication is required and has failed or has not yet been provided. - **403**: The API key doesn't have permissions to perform the request. - **429**: Too many requests hit the API too quickly. A backoff (e.g. exponential) is recommended for your requests. - **500**: Unexpected error on our end. ``` -------------------------------- ### POST /lighting Source: https://developer.topazlabs.com/api-reference/image-api/lighting Adjusts the lighting of an image synchronously. The endpoint returns the processed image as binary data and provides job tracking information via response headers. ```APIDOC ## POST /lighting ### Description This endpoint processes an image to adjust and balance its lighting conditions, aiming to elevate image quality. It returns the adjusted image as binary data, with the MIME type determined by the `output_format` parameter. Response headers `X-Process-ID` and `X-ETA` are provided for job tracking. ### Method POST ### Endpoint `/lighting` ### Parameters #### Query Parameters None #### Request Body - **image** (binary) - Required - The image file to be processed. Supported formats: jpeg, png, tiff. - **source_id** (string) - Optional - Unique identifier of the source image. - **source_url** (string) - Optional - The URL of the source image. - **output_format** (string) - Optional - The desired format of the output image. Enum: `jpeg`, `jpg`, `png`, `tiff`, `tif`. Default: `jpeg`. - **model** (string) - Optional - The model to use for processing. Enum: `Adjust`, `White Balance`. Default: `Adjust`. - **additionalProperties** (string) - Optional - Additional key-value pairs for model-specific settings. ### Request Example ```json { "image": "binary data", "output_format": "png", "model": "Adjust" } ``` ### Response #### Success Response (200) - **X-Process-ID** (string) - Unique identifier of the image processing job. - **X-Source-ID** (string) - Unique identifier of the source image. - **X-ETA** (integer) - Estimated time of arrival (ETA) for the process to complete in Unix time. #### Response Example ```json { "image/png": "binary image data" } ``` #### Error Handling - Responses may include standard HTTP error codes for issues like invalid input or authentication failures. ``` -------------------------------- ### Get System Status (OpenAPI Specification) Source: https://developer.topazlabs.com/api-reference/video-api/status This OpenAPI 3.0.3 specification defines the GET /video/status endpoint. It includes details on request parameters, response codes (200 for success, 500 for internal server error), and the structure of the SystemStatusResponse. ```json {"openapi":"3.0.3","info":{"title":"Video API","version":"1.0.0"},"tags":[{"name":"Status","description":"This section grants you system status\n"}],"servers":[{"url":"https://api.topazlabs.com","description":"Production API base URL"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"SystemStatusResponse":{"type":"object","properties":{"isAvailable":{"type":"boolean"},"availabilityMessage":{"type":"string"},"queueState":{"type":"object","properties":{"utilization":{"type":"number","minimum":0,"maximum":1,"description":"Total jobs (active and pending) divided by scaling group max capacity"},"avgJobAge":{"type":"number","description":"Average age of job in queue, in minutes"},"maxJobAge":{"type":"number","description":"Age of oldest job in queue, in minutes"}}},"supportedModels":{"type":"array","description":"List of supported models","items":{"type":"string"}}}}},"responses":{"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"paths":{"/video/status":{"get":{"tags":["Status"],"summary":"Get System Status","operationId":"GetSystemStatus","description":"Get status of the video rendering system\n\n## Response body\n\n| **Property** | **Type** | **Description** |\n|-----------------------|----------|-----------------------------------------------------|\n| **isAvailable** | Boolean | System availability status |\n| **availabilityMessage** | String | Availability message |\n| **queueState** | Object | Queue utilization and job age details |\n| **queueState.utilization** | Number | Total jobs (active and pending) divided by scaling group max capacity |\n| **queueState.avgJobAge** | Number | Average age of job in queue, in minutes |\n| **queueState.maxJobAge** | Number | Age of oldest job in queue, in minutes |\n| **supportedModels** | Array | List of supported AI models' [short code names](https://docs.topazlabs.com/video-ai/advanced-functions-in-topaz-video-ai/command-line-interface#selecting-models-with-cli-3154) |\n","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemStatusResponse"}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}} ``` -------------------------------- ### Download Output Image API Source: https://developer.topazlabs.com/api-reference/image-api/lighting Access the download link for the enhanced image once the job is completed. ```APIDOC ## GET /websites/developer_topazlabs_api-reference/process/{process_id}/download/output ### Description Access the download link for the enhanced image once the job is completed. ### Method GET ### Endpoint `/websites/developer_topazlabs_api-reference/process/{process_id}/download/output` ### Parameters #### Path Parameters - **process_id** (string) - Required - The ID of the image processing job. ### Response #### Success Response (200) - **download_url** (string) - The URL to download the enhanced image. #### Response Example ```json { "download_url": "https://example.com/path/to/output.jpg" } ``` ``` -------------------------------- ### GET /video/history Source: https://developer.topazlabs.com/api-reference/video-api/get-request-history Retrieves the video request history for the past 7 days. ```APIDOC ## GET /video/history ### Description This endpoint will return your history for the past 7 days. ### Method GET ### Endpoint /video/history ### Parameters ### Query Parameters None ### Request Body None ### Request Example None ### Response #### Success Response (200) - **result** (array) - An array of history objects. - Each history object contains: - **id** (string) - Unique request identifier - **userId** (number) - User ID - **status** (string) - Current status of the request. Enum: `requested`, `accepted`, `initializing`, `preprocessing`, `processing`, `postprocessing`, `complete`, `canceling`, `canceled`, `failed` - **ts** (object) - Timestamp the request reached the state, if applicable, in milliseconds since UTC epoch. - **requested** (number) - Timestamp when the request was created. - **accepted** (number) - Timestamp when the user accepted the costs and began uploading the source video. - **initializing** (number) - Timestamp when the system received the source video and began initializing resources. - **preprocessing** (number) - Timestamp for preprocessing state. - **processing** (number) - Timestamp for processing state. - **postprocessing** (number) - Timestamp for postprocessing state. - **complete** (number) - Timestamp when the request was completed. - **canceling** (number) - Timestamp when the request was canceled. - **canceled** (number) - Timestamp when the request was fully canceled. - **failed** (number) - Timestamp when the request failed. - **lastEventTs** (number) - Timestamp of the last event, in milliseconds since UTC epoch. - **estimates** (object) - Lower and upper bound estimates. - **cost** (array of integers) - Estimated cost in credits. - **time** (array of integers) - Estimated time in seconds, assuming an empty queue, starting from the time the source video has been received. - **transactions** (array of objects) - Details of transactions. - Each transaction object contains: - **operation** (string) - Type of operation. Enum: `reserve`, `commit`, `rollback` - **amount** (number) - Amount involved in the transaction, in credits. - **error** (object, optional) - Error message, if the request was a failure. - **message** (string) - The error message. #### Error Response (401) - **message** (string) - Unauthorized access. #### Error Response (403) - **message** (string) - Forbidden access. #### Error Response (500) - **message** (string) - Internal server error. ### Response Example ```json { "result": [ { "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "userId": 12345, "status": "complete", "ts": { "requested": 1678886400000, "accepted": 1678886500000, "initializing": 1678886600000, "preprocessing": 1678886700000, "processing": 1678887000000, "postprocessing": 1678888000000, "complete": 1678889000000 }, "lastEventTs": 1678889000000, "estimates": { "cost": [10, 20], "time": [300, 600] }, "transactions": [ { "operation": "reserve", "amount": 10 } ] } ] } ``` ``` -------------------------------- ### Error Handling Source: https://developer.topazlabs.com/api-reference/image-api/lighting This section details the possible error responses from the API. ```APIDOC ## Error Responses ### 400 Bad Request - **Description**: The request contains malformed data in the body, path, or query parameters. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 401 Unauthorized - **Description**: Authentication is required and has failed or has not yet been provided. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 402 Payment Required - **Description**: Payment is required to access the resource. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 403 Forbidden - **Description**: The API key doesn't have permissions to perform the request. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 412 Precondition Failed - **Description**: The preconditions to process the request were not met. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 413 Payload Too Large - **Description**: The request is larger than the server is willing or able to process. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 415 Unsupported Media Type - **Description**: The request entity has a media type which the server or resource does not support. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 422 Unprocessable Entity - **Description**: The request was well-formed but was unable to be followed due to semantic errors. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 425 Too Early - **Description**: The request was sent too early to be processed. Please wait before retrying. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 429 Too Many Requests - **Description**: Too many requests hit the API too quickly. A backoff (e.g. exponential) is recommended for your requests. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ### 500 Internal Server Error - **Description**: Unexpected error on our end. - **Content**: `application/json` - **schema**: `object` - **code** (integer) - The HTTP status code. - **message** (string) - A human readable error message. ``` -------------------------------- ### Download Input Image API Source: https://developer.topazlabs.com/api-reference/image-api/lighting Access the download link for the input image once the job is completed. ```APIDOC ## GET /websites/developer_topazlabs_api-reference/process/{process_id}/download/input ### Description Access the download link for the input image once the job is completed. ### Method GET ### Endpoint `/websites/developer_topazlabs_api-reference/process/{process_id}/download/input` ### Parameters #### Path Parameters - **process_id** (string) - Required - The ID of the image processing job. ### Response #### Success Response (200) - **download_url** (string) - The URL to download the input image. #### Response Example ```json { "download_url": "https://example.com/path/to/input.jpg" } ``` ``` -------------------------------- ### Video API Get Request History Source: https://developer.topazlabs.com/api-reference/video-api Retrieve a history of all video processing requests. ```APIDOC ## GET /api-reference/video-api/get-request-history.md ### Description Retrieves a history of all past video processing requests. ### Method GET ### Endpoint /api-reference/video-api/get-request-history ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of requests to return. - **offset** (integer) - Optional - The number of requests to skip before returning results. ### Request Example ``` GET /api-reference/video-api/get-request-history?limit=10&offset=0 ``` ### Response #### Success Response (200) - **requests** (array) - A list of video processing requests. - **request_id** (string) - The ID of the request. - **timestamp** (string) - The timestamp when the request was made. - **status** (string) - The final status of the request. #### Response Example ```json { "requests": [ { "request_id": "req_abc123xyz", "timestamp": "2023-10-27T10:00:00Z", "status": "completed" }, { "request_id": "req_def456uvw", "timestamp": "2023-10-26T15:30:00Z", "status": "failed" } ] } ``` ``` -------------------------------- ### Video API Get Request Status Source: https://developer.topazlabs.com/api-reference/video-api Retrieve the current status of a video processing request. ```APIDOC ## GET /api-reference/video-api/get-request-status.md ### Description Retrieves the current status of a specific video processing request. ### Method GET ### Endpoint /api-reference/video-api/get-request-status ### Parameters #### Query Parameters - **request_id** (string) - Required - The ID of the request to query. ### Request Example ``` GET /api-reference/video-api/get-request-status?request_id=req_abc123xyz ``` ### Response #### Success Response (200) - **request_id** (string) - The ID of the request. - **status** (string) - The current status of the request (e.g., "pending", "processing", "completed", "failed", "cancelled"). #### Response Example ```json { "request_id": "req_abc123xyz", "status": "completed" } ``` ``` -------------------------------- ### Synchronous Lighting Adjustment API Request (OpenAPI) Source: https://developer.topazlabs.com/api-reference/image-api/lighting This OpenAPI 3.0.3 definition describes the synchronous lighting endpoint. It specifies the request body for image uploads, including supported formats and optional parameters like output format and model selection. It also details the possible response headers for job tracking. ```json { "openapi": "3.0.3", "info": { "title": "Image API", "version": "1.1.0" }, "tags": [ { "name": "Lighting", "description": "The following are our lighting models used to adjust and balance your images to elevate it's quality despite the sub-optimal lighting conditions of the original photo.\n\nJust pass in an image and our **Autopilot** will automatically determine the best settings for the highest quality.\n\nAdditional configuration can be optionally provided, specifically:\n - `model`\n - `output_format`\n\nPlease see the reference for further details. Check out the [available models](https://developer.topazlabs.com/docs/image-models) to see which model options you have.\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" } } }, "paths": { "/lighting": { "post": { "tags": [ "Lighting" ], "summary": "Lighting (synchronous)", "operationId": "postLightingSync", "description": "The following are our lighting models used to adjust and balance your images to elevate it's quality despite the sub-optimal lighting conditions of the original photo.\n\nA synchronous endpoint for adjusting the lighting of your image.\n\nReturns the lighting adjusted image as a binary with one of the following MIME types depending on the chosen `output_format` (defaulting to JPEG):\n - `image/jpeg` for JPEG output.\n - `image/png` for PNG output.\n - `image/tiff` for TIFF output.\n\nAdditionally, returns `process_id` and `eta` as response headers `X-Process-ID` and `X-ETA` respectively to use as an efficient way to track the progress of the image lighting adjustment job:\n - Use the `Status` endpoints to check the status of this job using the returned `process_id`.\n - Use the `Download` endpoints to download the input or processed image (once it is ready).\n - Use the `Cancel` endpoint to cancel the job while it is in progress.\n\n> The `eta` represents when the job is expected to finish in Unix time.\n\nThis endpoint can return a maximum of 96 megapixels; please see the `Lighting (asynchronous)` endpoint if you wish to work with larger dimensions.\n", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "image": { "type": "string", "format": "binary", "description": "The image file to be processed. Supported formats:\n - jpeg (or jpg)\n - png\n - tiff (or tif)\n" }, "source_id": { "type": "string", "description": "Unique identifier of the source image." }, "source_url": { "type": "string", "description": "The URL of the source image." }, "output_format": { "type": "string", "description": "The desired format of the output image.", "enum": [ "jpeg", "jpg", "png", "tiff", "tif" ], "default": "jpeg" }, "model": { "type": "string", "description": "The model to use for processing the image.", "enum": [ "Adjust", "White Balance" ], "default": "Adjust" } }, "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/docs/image-models) for more details." } } } } }, "responses": { "200": { "description": "Image lighting adjusted successfully.", "headers": { "X-Process-ID": { "description": "Unique identifier of the image processing job.", "schema": { "type": "string" } }, "X-Source-ID": { "description": "Unique identifier of the source image.", "schema": { "type": "string" } }, "X-ETA": { "description": "Estimated time of arrival (ETA) for the process to complete in Unix time.", "schema": { "type": "integer" } } } } } } } } } ``` -------------------------------- ### Video API Get Request Metrics Source: https://developer.topazlabs.com/api-reference/video-api Retrieve performance metrics for a video processing request. ```APIDOC ## GET /api-reference/video-api/get-request-metrics.md ### Description Retrieves performance metrics associated with a completed video processing request. ### Method GET ### Endpoint /api-reference/video-api/get-request-metrics ### Parameters #### Query Parameters - **request_id** (string) - Required - The ID of the request for which to retrieve metrics. ### Request Example ``` GET /api-reference/video-api/get-request-metrics?request_id=req_abc123xyz ``` ### Response #### Success Response (200) - **request_id** (string) - The ID of the request. - **processing_time_seconds** (number) - The total time taken for processing in seconds. - **cpu_usage_percentage** (number) - Average CPU usage during processing. - **memory_usage_mb** (number) - Average memory usage during processing. #### Response Example ```json { "request_id": "req_abc123xyz", "processing_time_seconds": 125.5, "cpu_usage_percentage": 75.2, "memory_usage_mb": 1024 } ``` ``` -------------------------------- ### Synchronous Image Enhancement (OpenAPI Spec) Source: https://developer.topazlabs.com/api-reference/image-api/enhance This OpenAPI 3.0.3 specification details the synchronous `/enhance` endpoint. It outlines request parameters such as `output_format`, `subject_detection`, `face_enhancement`, and the input `image` file. It also describes the response, including the enhanced image binary and `X-Process-ID`, `X-ETA` headers for progress tracking. ```json { "openapi": "3.0.3", "info": { "title": "Image API", "version": "1.1.0" }, "tags": [ { "name": "Enhance", "description": "Enhance images by removing noise, sharpening, and upscaling while preserving the details of your image, including the faces of important subjects.\n\nJust pass in an image and our **Autopilot** will automatically determine the best settings for the highest quality.\n\nAdditional configuration can be optionally provided, specifically:\n - `model`\n - `output_height`\n - `output_width`\n - `output_format`\n - `crop_to_fill`\n - `subject_detection`\n - `face_enhancement`\n - `face_enhancement_creativity`\n - `face_enhancement_strength`\n\nPlease see the reference for further details. Check out the [available models](https://developer.topazlabs.com/docs/image-models) to see which model options you have.\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" } } }, "paths": { "/enhance": { "post": { "tags": [ "Enhance" ], "summary": "Enhance (synchronous)", "operationId": "postEnhanceSync", "description": "A synchronous endpoint for enhancing your image.\n\nReturns the enhanced image as a binary with one of the following MIME types depending on the chosen `output_format` (defaulting to JPEG):\n - `image/jpeg` for JPEG output.\n - `image/png` for PNG output.\n - `image/tiff` for TIFF output.\n\nAdditionally, returns `process_id` and `eta` as response headers `X-Process-ID` and `X-ETA` respectively to use as an efficient way to track the progress of the image enhancement job:\n - Use the `Status` endpoints to check the status of this job using the returned `process_id`.\n - Use the `Download` endpoints to download the input or processed image (once it is ready).\n - Use the `Cancel` endpoint to cancel the job while it is in progress.\n\n> The `eta` represents when the job is expected to finish in Unix time.\n\nThis endpoint can return a maximum of 96 megapixels; please see the `Enhance (asynchronous)` endpoint if you wish to work with larger dimensions.\n", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "output_format": { "type": "string", "description": "The desired format of the output image.", "enum": [ "jpeg", "jpg", "png", "tiff", "tif" ], "default": "jpeg" }, "subject_detection": { "type": "string", "description": "Specifies whether you want to detect all subjects in the image, only the foreground subject, or only the background for the AI model to run on.", "enum": [ "All", "Foreground", "Background" ], "default": "All" }, "face_enhancement": { "type": "boolean", "description": "By default, faces (if any) are enhanced during image processing as well. Set `face_enhancement` to `false` if you don't want this.", "default": true }, "face_enhancement_creativity": { "type": "number", "description": "Choose the level of creativity for face enhancement from 0 to 1. Defaults to `0`, and is ignored if `face_enhancement` is `false`.", "minimum": 0, "maximum": 1, "default": 0 }, "face_enhancement_strength": { "type": "number", "description": "Control how sharp the enhanced faces are relative to the background from 0 to 1. Defaults to `0.8`, and is ignored if `face_enhancement` is `false`.", "minimum": 0, "maximum": 1, "default": 0.8 }, "image": { "type": "string", "format": "binary", "description": "The image file to be processed. Supported formats:\n - jpeg (or jpg)\n - png\n - tiff (or tif)\n" }, "source_id": { "type": "string", "description": "Unique identifier of the source image." }, "source_url": { "type": "string", "description": "The URL of the source image." }, "model": { "type": "string", "description": "The model to use for processing the image.", "enum": [ "Standard V2", "Low Resolution V2", "CGI", "High Fidelity V2", "Text Re" ] } } } } } } } } } } ``` -------------------------------- ### Error Responses Source: https://developer.topazlabs.com/api-reference/image-api/lighting Details common error responses from the API. ```APIDOC ## Error Handling ### Bad Request (400) - **description**: The request contains malformed data in the body, path, or query parameters. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Unauthorized (401) - **description**: Authentication is required and has failed or has not yet been provided. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Payment Required (402) - **description**: Payment is required to access the resource. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Forbidden (403) - **description**: The API key doesn't have permissions to perform the request. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Precondition Failed (412) - **description**: The preconditions to process the request were not met. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Payload Too Large (413) - **description**: The request is larger than the server is willing or able to process. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Unsupported Media Type (415) - **description**: The request entity has a media type which the server or resource does not support. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Unprocessable Entity (422) - **description**: The request was well-formed but was unable to be followed due to semantic errors. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Too Early (425) - **description**: The request was sent too early to be processed. Please wait before retrying. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Too Many Requests (429) - **description**: Too many requests hit the API too quickly. A backoff (e.g. exponential) is recommended for your requests. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ### Internal Server Error (500) - **description**: Unexpected error on our end. - **content**: `application/json` - **schema**: `object` - **required**: `["message"]` - **properties**: - **code** (`integer`) - The HTTP status code. - **message** (`string`) - A human readable error message. ``` -------------------------------- ### Get Video Request Metrics Source: https://developer.topazlabs.com/api-reference/video-api/get-request-metrics Retrieves detailed processing metrics for a specific video enhancement request. ```APIDOC ## GET /video/{requestId}/metrics ### Description Get metrics for the request. ### Method GET ### Endpoint `/video/{requestId}/metrics` ### Parameters #### Path Parameters - **requestId** (string) - Required - The unique identifier for the video enhancement request. ### Response #### Success Response (200) - **minutesInState** (object) - Minutes spent in various processing states. - **pendingSourceUpload** (number) - Minutes spent in pending source upload state. - **initializing** (number) - Minutes spent in initializing state. - **preprocessing** (number) - Minutes spent in preprocessing state. - **processing** (number) - Minutes spent in processing state. - **postprocessing** (number) - Minutes spent in postprocessing state. - **minutesToEnhance** (number) - Time taken for the final enhanced video to become available for download after user finished uploading the source video. - **inputFrames** (integer) - Number of input frames. - **outputFrames** (integer) - Number of output frames. - **inputSize** (string) - Size of input video. - **outputSize** (string) - Size of output video. - **chunks** (array) - Metrics for each chunk. - **chunkIndex** (integer) - Index of the chunk starting from 0. - **tasks** (array) - Multiple enhancement tasks may have been run on a chunk. - **minutesProcessing** (number) - Duration of processing in minutes. - **inputFrames** (integer) - Number of input frames. - **outputFrames** (integer) - Number of output frames. - **inputSize** (string) - Size of the input file. - **outputSize** (string) - Size of the output file. #### Response Example ```json { "minutesInState": { "pendingSourceUpload": 10, "initializing": 2, "preprocessing": 5, "processing": 15, "postprocessing": 3 }, "minutesToEnhance": 25, "inputFrames": 1000, "outputFrames": 1000, "inputSize": "100MB", "outputSize": "200MB", "chunks": [ { "chunkIndex": 0, "tasks": [ { "minutesProcessing": 5, "inputFrames": 500, "outputFrames": 500, "inputSize": "50MB", "outputSize": "100MB" } ] } ] } ``` ``` -------------------------------- ### Synchronous Image Sharpening API Request (OpenAPI) Source: https://developer.topazlabs.com/api-reference/image-api/sharpen This OpenAPI 3.0.3 specification defines the synchronous 'Sharpen' endpoint. It details the request body parameters, including image file upload, output format, and various enhancement options. It also specifies the response headers like X-Process-ID and X-ETA for tracking. ```json { "openapi": "3.0.3", "info": { "title": "Image API", "version": "1.1.0" }, "tags": [ { "name": "Sharpen", "description": "Use our advanced Sharpen models to bring clarity and crisp definition back to your images that appear soft or slightly out of focus. By analyzing the edges, textures, and details, our AI-based Sharpen endpoint intelligently enhances the clarity without introducing unwanted artifacts. Whether your image is suffering from camera shake, slight motion blur, or lens softness, Topaz Labs' Sharpen models help you restore the finer details with minimal effort.\n\nJust pass in an image and our **Autopilot** will automatically determine the best settings for the highest quality.\n\nAdditional configuration can be optionally provided, specifically:\n - `model`\n - `output_height`\n - `output_width`\n - `output_format`\n - `crop_to_fill`\n - `subject_detection`\n - `face_enhancement`\n - `face_enhancement_creativity`\n - `face_enhancement_strength`\n\nPlease see the reference for further details. Check out the [available models](https://developer.topazlabs.com/docs/image-models) to see which model options you have.\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" } } }, "paths": { "/sharpen": { "post": { "tags": [ "Sharpen" ], "summary": "Sharpen (synchronous)", "operationId": "postSharpenSync", "description": "A synchronous endpoint for sharpening your image.\n\nReturns the sharpened image as a binary with one of the following MIME types depending on the chosen `output_format` (defaulting to JPEG):\n - `image/jpeg` for JPEG output.\n - `image/png` for PNG output.\n - `image/tiff` for TIFF output.\n\nAdditionally, returns `process_id` and `eta` as response headers `X-Process-ID` and `X-ETA` respectively to use as an efficient way to track the progress of the image sharpening job:\n - Use the `Status` endpoints to check the status of this job using the returned `process_id`.\n - Use the `Download` endpoints to download the input or processed image (once it is ready).\n - Use the `Cancel` endpoint to cancel the job while it is in progress.\n\n> The `eta` represents when the job is expected to finish in Unix time.\n\nThis endpoint can return a maximum of 96 megapixels; please see the `Sharpen (asynchronous)` endpoint if you wish to work with larger dimensions.\n", "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "output_format": { "type": "string", "description": "The desired format of the output image.", "enum": [ "jpeg", "jpg", "png", "tiff", "tif" ], "default": "jpeg" }, "subject_detection": { "type": "string", "description": "Specifies whether you want to detect all subjects in the image, only the foreground subject, or only the background for the AI model to run on.", "enum": [ "All", "Foreground", "Background" ], "default": "All" }, "face_enhancement": { "type": "boolean", "description": "By default, faces (if any) are enhanced during image processing as well. Set `face_enhancement` to `false` if you don't want this.", "default": true }, "face_enhancement_creativity": { "type": "number", "description": "Choose the level of creativity for face enhancement from 0 to 1. Defaults to `0`, and is ignored if `face_enhancement` is `false`.", "minimum": 0, "maximum": 1, "default": 0 }, "face_enhancement_strength": { "type": "number", "description": "Control how sharp the enhanced faces are relative to the background from 0 to 1. Defaults to `0.8`, and is ignored if `face_enhancement` is `false`.", "minimum": 0, "maximum": 1, "default": 0.8 }, "image": { "type": "string", "format": "binary", "description": "The image file to be processed. Supported formats:\n - jpeg (or jpg)\n - png\n - tiff (or tif)\n" }, "source_" } } } } } } } } } ```