Get Upload Result

POSThttps://api.newportai.com/api/file/v1/policy_upload_finish

The Get Upload Result API is the final step in the storage workflow. Once a file has been successfully transferred via the Upload API, use this endpoint to retrieve the public access URL and its expiration details. This URL can then be used as an input parameter for any of our AI processing APIs.

  • Submit a POST request using the reqId obtained from the successful Upload API response.
  • Retrieve the final url to be used in subsequent API calls.

Request Headers

Content-Type string Required

Enum: application/json

Authorization string Required

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

Request Body

reqId string Required

The unique request identifier returned in the data object of the Upload API response.

Response

code integer

Returns 0 for success, or a specific error code.

message string

Returns "success" or a descriptive error message.

data object
url string

The accessible web URL for the uploaded file.

expireAt string

The timestamp indicating when the file link will expire.

reqId string

The request ID associated with this file.

Errors

10192Illegal param
Request
cURL
curl -X POST 'https://api.newportai.com/api/file/v1/policy_upload_finish' \
-H "Authorization: Bearer {{key}}" \
-H 'Content-Type: application/json' \
-d '{
  "reqId": "732c9caa-0a2e-4aa1-87d9-52430a8f0314"
}'
0Successful
{
  "code": 0,
  "message": "success", 
  "data": {
    "url": "https://dreamface-resource-aigc.oss-us-east-1.aliyuncs.com/apiDocsAdmin/2025-4-1744786522306-demo_image.jpg",
    "expireAt": "2024-11-20 16:20:49",
    "reqId": "732c9caa-0a2e-4aa1-87d9-52430a8f0314"
  }
}