Polling

POSThttps://api.newportai.com/api/getAsyncResult

The Polling API is a centralized endpoint used to retrieve the results of all asynchronous tasks (Image Generation, Video Processing, Voice Cloning, etc.). Since most processing tasks take time to complete, the server returns a taskId which you must then use here to check the status and download the final output.

Data Retention Policy: AI-generated results are retained on our servers for 24 hours. After this window, the task data and associated files are automatically deleted and will no longer be accessible.

Request Headers

Content-Type string Required

Enum: application/json

Authorization string Required

Bearer authentication token. Example: Bearer {{APIKey}}.

Request Body

taskId string Required

The unique task identifier returned by the initial asynchronous API request.

Response

code int

int Operation code, 0 indicates success, non-0 indicates failure

message string

Operation prompt message

data object

Request content

task object

Task-related information

taskId string

task id

status int

Task status code, integer value, enumeration. 1 task submission; 2 The task is in progress; 3 The task is successful. 4 Task Failure

reason string

Provides the reason for a task's failure.

taskType string

task type

executionTime int

completion execution time

expire int

taskid expiration time

images list

images result

imageUrl string

image url

imageType string

image type (jpg,png..)

videos list

videos result

videoUrl string

video url

videoType string

video type (mp4..)

audios list

audios result

audioUrl string

audio url

audioType string

audio type(wav..)

sttProResult object

Speech-to-text pro result

text string

Transcribed text content.

sttResult object

Detailed speech-to-text result with timestamps and additional metadata.

data array

List of word-level transcription data.

sex string

Gender of the speaker (if identified).

beginTimestampMilliseconds int

Start timestamp of the speech segment (in milliseconds).

text string

Transcribed text for this segment.

endTimestampMilliseconds int

End timestamp of the speech segment (in milliseconds).

tl int

Total length of the speech (in milliseconds).

type string

The type of speech transcription.

cloneId string

clone id, only from voice_clone. Once generated, you can always use it in Do TTS Clone.

sceneId string

scene id, only from scene training. Once generated, you can always use it in AI Model and AI Try On

mattingResult object

Matting result, only from matting-related tasks.

mattingFileUrl string

URL of the matting result video with the background removed.

mattingAlphaFileUrl string

URL of the alpha matte video.

compositeFileUrl string

URL of the composite result video. Null when no composite output is produced.

Errors

13005key is blank exception
13006key is invalid
13007key prefix is wrong
Request
cURL
curl -X POST 'https://api.newportai.com/api/getAsyncResult' \
  -H "Authorization: Bearer {{key}}" \
  -H 'Content-Type: application/json' \
  -d '{"taskId":"b08337dc08d7428daa64b3d5e61b8350"}'
0Successful
{
  "code": 0,
  "message": "success", 
  "data": {
    "task": {
      "taskId": "b08337dc08d7428daa64b3d5e61b8350",
      "status": 3,
      "reason": "",
      "taskType": "inpainting"
    },
    "images": [{
      "imageUrl": "https://dreamface-resource-aigc.oss-us-east-1.aliyuncs.com/apiDocsAdmin/2025-4-1744786522306-demo_image.jpg",
      "imageType": "jpg"
    }],
    "videos": [{
      "videoUrl": "https://dreamface-resource-aigc.oss-us-east-1.aliyuncs.com/apiDocsAdmin/2025-4-1744791726169-videoUrl.mp4",
      "videoType": "mp4"
    }],
    "audios": [{
      "audioUrl": "https://dreamface-resource-aigc.oss-us-east-1.aliyuncs.com/apiDocsAdmin/2025-4-1744804212969-dottsClone_result.wav",
      "audioType": ".wav"
    }],
    "sttProResult": {
        "text": "Today is a beautiful day. The sun is shining, the birds are singing, and there is a gentle breeze in the air. "
    },
    "sttResult":{
        "data":[
            {
                "beginTimestampMilliseconds":260,
                "sex":"",
                "text":"Today is a beautiful day. ",
                "endTimestampMilliseconds":1520
            },
            {
                "beginTimestampMilliseconds":1860,
                "sex":"",
                "text":"The sun is shining, the birds are singing and there is a gentle breeze in the air. ",
                "endTimestampMilliseconds":6520
            }
        ],
        "tl":22575,
        "type":"0"
    },
    "cloneId": "40dc8e22ab179680ec5480f9fb32d1ec",
    "sceneId": "69672179",
    "mattingResult": {
      "mattingFileUrl": "https://dreamapi-rs-aigc.newportai.com/dreamapi/o/2026-08-07/fc0e79e3feb64f438798a58240bb0c8f.mp4",
      "mattingAlphaFileUrl": "https://dreamapi-rs-aigc.newportai.com/dreamapi/o/2026-08-07/2c620b0134c54d5da3631bdeba82e53d.mp4",
      "compositeFileUrl": "https://dreamapi-rs-aigc.newportai.com/dreamapi/o/2026-08-07/95174a18a2034e5ab51e45a9d93ed9fb.mp4"
    }
  }
}