अनुवाद कार्य API
संशोधित अनुवाद
कार्य में अनुवादित पाठों के लिए संशोधन प्रस्तुत करें, अनुवादों को पुनः उत्पन्न करने के विकल्प के साथ।
- पूर्ण पता
- https://shangyiai.com/api/v1/translation/updateTexts
- प्रमाणीकरण
- Authorization अनुरोध हेडर में API Key पास करना आवश्यक है
- Content-Type
- application/json
- गलत प्रारूप
- { "error": "Invalid API key." }
सावधानियां
revisedTexts कार्य अनुवाद कैश में लिखा जाएगा, जिसका उपयोग मानव द्वारा संशोधित अनुवाद को सहेजने के लिए किया जाता है।
startTranslation के true होने पर, संशोधन सहेजने के बाद कार्य प्रसंस्करण पुनः ट्रिगर होगा।
उदाहरण
1curl -X POST 'https://shangyiai.com/api/v1/translation/updateTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5 "taskId": "[string]",
6 "revisedTexts": {
7 "key": "value"
8 }
9}'अनुरोध पैरामीटर
| पैरामीटर | प्रकार | डिफ़ॉल्ट | विवरण | उदाहरण |
|---|---|---|---|---|
| *taskId | String | - | अनुवाद कार्य आईडी | - |
| *revisedTexts | JSON | - | संशोधित अनुवाद | - |
| startTranslation | Boolean | false | क्या अनुवाद को पुनः उत्पन्न करना है | - |
प्रतिक्रिया
| पैरामीटर | प्रकार | डिफ़ॉल्ट | विवरण | उदाहरण |
|---|---|---|---|---|
| success | Boolean | - | क्या सफलतापूर्वक अपडेट हुआ | - |
सामान्य त्रुटियाँ
401 Missing API key.
The Authorization request header is required.
401 Invalid API key.
The API key does not exist, has been deleted, or is no longer valid.
400 Missing required parameter: taskId.
Provide the taskId returned by the create translation task API.
404 Task not found.
The task does not exist, has been deleted, does not belong to the current API account, or was not created through the API.
409 Task is processing. Try again after it finishes.
revisedTexts cannot be updated while the task is processing.