Skip to content

Enhance

POST https://api.newportai.com/api/async/enhance

Enhance is an optimization feature automatically analyzes the blurry areas of a photo and sharpens the details. After uploading the blurry image, a high-definition, enlarged version photo will be generated.

  • Use Enhance API to get taskId with POST method.
  • Use Polling API to get Enhance result with POST method.

Request Header Parameters

  • Content-TypestringRequired
    Enum
    application/json
  • AuthorizationstringRequired
    Bearer authentication format, for example: Bearer

Request Body Parameters

  • imageUrlstringRequired
    original image url.
  • extParamsObjectRequired

Response

  • codeinteger
    0 success, or error code.
  • messagestring
    "success", or error msg.
  • dataobject
    taskIdstring
    Use the taskId to request the Polling API to retrieve the generated outputs.

Example

Request:

zsh
curl -X POST 'https://api.newportai.com/api/async/enhance' \
-H "Authorization: Bearer {{key}}" \
-H 'Content-Type: application/json' \
--data '{
  "imageUrl": "https://newportai-api-market.s3.amazonaws.com/demo_image/demo_image.jpg",
  "extParams": ""
}'

Response:

json
{
  "code": 0,
  "message": "success", 
  "data": {
    "taskId": "b08337dc08d7428daa64b3d5e61b8350"
  }
}

Next Step:

Use Polling API to get the result.

Demo
before
after