# Enhance Image The endpoint improves the visual quality of an input image by generating richer details, sharper textures, and enhanced clarity. It also supports upscaling to higher resolutions and returns a refined version of the original visual. This endpoint includes granular content moderation controls to ensure safe usage across all stages of processing: - – Scans the uploaded image and stops processing if inappropriate or restricted content is detected. - – Evaluates the generated image and blocks the response if it violates safety guidelines. Unlike the Increase Resolution route, this endpoint regenerates the image to enhance visual richness while preserving essential details. Endpoint: POST /enhance ## Header parameters: - `api_token` (string, required) ## Request fields (application/json): - `image` (string, required) The source image to be handled by the API. Supported input types: - - pointing to an image file that is publicly accessible and available at the time of processing. Accepted formats: , , , . - `sync` (boolean) Specifies the response mode. - When (default), the request is processed asynchronously: the API immediately returns a status URL to track progress. - When , the request is processed synchronously: the API hold the connection open until the proccess is complete and then returns the final image URL in the response. - `visual_input_content_moderation` (boolean) When enabled, applies content moderation to input visual. Expected behavior: - Processing stops if the image fails moderation. - Returns a 422 error with details about which parameter failed. - `visual_output_content_moderation` (boolean) When enabled, applies content moderation to result visual. Expected behavior: - If the modified image fails moderation, returns a 422 error. - `seed` (integer) Optional seed for controlling generation randomness. You can recreate the same result in the future by using the same seed with the same input parameters. - `steps_num` (integer) Number of enhancement steps. Higher values improve quality but increase processing time. Most quality gains occur within the first 20 steps. - `resolution` (string) Target output resolution of the enhanced image. Enum: "1MP", "2MP", "4MP" - `preserve_alpha` (boolean) Controls whether the alpha channel values from the input image are retained in the output, if the input includes an alpha channel. - When true: The output image maintains the original transparency of fully and partially transparent pixels. - When false: The output image is fully opaque. - Has no effect if the input image does not include an alpha channel. ## Response 200 fields (application/json): - `result` (object, required) - `result.image_url` (string, required) - `result.seed` (string) - `request_id` (string, required) ## Response 202 fields (application/json): - `request_id` (string, required) - `status_url` (string, required) ## Response 400 fields (application/json): - `error` (object, required) - `error.code` (integer, required) Example: 123 - `error.message` (string, required) - `error.details` (string, required) - `request_id` (string, required) ## Response 401 fields (application/json): - `error` (object, required) - `error.code` (integer, required) Example: 123 - `error.message` (string, required) - `error.details` (string, required) - `request_id` (string, required) ## Response 403 fields (application/json): - `error` (object, required) - `error.code` (integer, required) Example: 123 - `error.message` (string, required) - `error.details` (string, required) - `request_id` (string, required) ## Response 404 fields (application/json): - `error` (object, required) - `error.code` (integer, required) Example: 123 - `error.message` (string, required) - `error.details` (string, required) - `request_id` (string, required) ## Response 415 fields (application/json): - `error` (object, required) - `error.code` (integer, required) Example: 123 - `error.message` (string, required) - `error.details` (string, required) - `request_id` (string, required) ## Response 422 fields (application/json): - `error` (object, required) - `error.code` (integer, required) Example: 123 - `error.message` (string, required) - `error.details` (string, required) - `request_id` (string, required) ## Response 429 fields (application/json): - `error` (object, required) - `error.code` (integer, required) Example: 123 - `error.message` (string, required) - `error.details` (string, required) - `request_id` (string, required) ## Response 460 fields (application/json): - `error` (object, required) - `error.code` (integer, required) Example: 123 - `error.message` (string, required) - `error.details` (string, required) - `request_id` (string, required) ## Response 5XX fields (application/json): - `error` (object, required) - `error.code` (integer, required) Example: 123 - `error.message` (string, required) - `error.details` (string, required) - `request_id` (string, required)