Business Process
- Description
- Using the API Image Translate, images can be translated from one language to another.
Usage Example
- First, obtain
Topview-Uid
andAuthorization
as request header parameters. For details, see the documentation How To Get Topview Uid And Key. AssumeTopview-Uid=NsDAaOPF4jLuAie4ewyg
andAuthorization=Bearer sk-vEsneECh1J5eKHUw4vxHI61e7FvXPnPE1625PmSt3HB
【Note: Current account is unavailable ❌】.
Usage Example for Single Image
Step1: Execute Submit Translate Task
curl --location --request POST 'https://api.topview.ai/v1/image_translate/single/task/submit' \
--header 'Topview-Uid: NsDAaOPF4jLuAie4ewyg' \
--header 'Authorization: Bearer sk-vEsneECh1J5eKHUw4vxHI61e7FvXPnPE1625PmSt3HB' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: api.topview.ai' \
--header 'Connection: keep-alive' \
--data-raw '{
"fileId": "4b129e710f9442f99605d483bac4ebcb",
"languages": [
"English",
"Italian"
],
"noticeUrl":""
}'
- response
Pay attention to taskId as a parameter for the Step2
{
"code": "200",
"message": "Success",
"result": {
"taskId": "41b24a504d774c2582c44b76cff27234",
"status": "success",
"errorMsg": null,
"noticeUuid": "2441963cd8a64e3fb113765bd3fbf2d9"
}
}
Step2: Execute Submit Single Generate Task
curl --location --request POST 'https://api.topview.ai/v1/image_generate/single/task/submit' \
--header 'Topview-Uid: NsDAaOPF4jLuAie4ewyg' \
--header 'Authorization: Bearer sk-vEsneECh1J5eKHUw4vxHI61e7FvXPnPE1625PmSt3HB' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: api.topview.ai' \
--header 'Connection: keep-alive' \
--data-raw '{
"taskId":"41b24a504d774c2582c44b76cff27234",
"noticeUrl":""
}'
- response
{
"code": "200",
"message": "Success",
"result": {
"taskId": "41b24a504d774c2582c44b76cff27234",
"status": "success",
"errorMsg": null,
"noticeUuid": "6c8886e627e64468a2a8a0bc019249b1"
}
}
Usage Example for Batch Image
Step1: Execute Submit Batch Generate Task
curl --location --request POST 'https://api.topview.ai/v1/image_translate/batch/task/submit' \
--header 'Topview-Uid: NsDAaOPF4jLuAie4ewyg' \
--header 'Authorization: Bearer sk-vEsneECh1J5eKHUw4vxHI61e7FvXPnPE1625PmSt3HB' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: api.topview.ai' \
--header 'Connection: keep-alive' \
--data-raw '{
"fileIds": [
"8bfb4c3ec1d44e97a9407e6d1d1c0355",
"4b129e710f9442f99605d483bac4ebcb"
],
"languages": [
"English",
"Italian"
],
"noticeUrl":""
}'
- response
{
"code": "200",
"message": "Success",
"result": {
"taskId": "017bf27f7bfa4f8c90f4b1d37ff9f8d5",
"status": "success",
"errorMsg": null,
"noticeUuid": "6259b709031a4f3a905aa32020bd10f5"
}
}