สารบัญเอกสาร

API งานการแปล

เริ่มงานแปลใหม่อีกครั้ง

POST/v1/translation/start

ใช้สำหรับการเริ่มต้นใหม่ของงานที่ Terminated หรือชำระคะแนนเพื่อแปลเอกสารเต็ม

ที่อยู่แบบเต็ม
https://otranslator.com/api/v1/translation/start
การรับรอง
ต้องส่งผ่าน API Key ในส่วนหัวคำขอ Authorization
Content-Type
application/json
รูปแบบผิดพลาด
{ "error": "Invalid API key." }

ข้อควรระวัง

อินเทอร์เฟซนี้สามารถใช้เพื่อรีสตาร์ตงานที่มีสถานะ Terminated และยังสามารถชำระเงินผ่าน payWithCredits หลังจากงานแสดงตัวอย่างเสร็จสิ้นเพื่อเริ่มการแปลเอกสารฉบับเต็ม

งานที่ชำระเงินแล้วจะไม่มีการหักค่าใช้จ่ายซ้ำเมื่อส่ง model เข้ามา จะใช้สำหรับคำนวณค่าใช้จ่ายใหม่เฉพาะในกรณีที่ payWithCredits เป็น true และงานยังไม่ได้ชำระเงิน

ตัวอย่าง

curl
1curl -X POST 'https://otranslator.com/api/v1/translation/start' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5  "taskId": "[string]"
6}'

พารามิเตอร์ของคำขอ

พารามิเตอร์ประเภทค่าเริ่มต้นคำอธิบายตัวอย่าง
*taskIdString-

รหัสงานแปล

-
payWithCreditsBoolean-

ชำระเงินสำหรับงานแปลหรือไม่ มีผลเฉพาะเมื่อเอกสารยังไม่ได้ชำระเงิน เอกสารที่ชำระเงินแล้วจะไม่ถูกหักค่าใช้จ่ายซ้ำ

-
modelString-
  • เมื่อ payWithCredits เป็น true ให้ระบุ model ที่ใช้สำหรับการแปลเอกสารทั้งหมด
  • รองรับโมเดล: สอบถาม
-

การตอบสนอง

พารามิเตอร์ประเภทค่าเริ่มต้นคำอธิบายตัวอย่าง
successBoolean-

การเริ่มต้นสำเร็จหรือไม่

-

ข้อผิดพลาดทั่วไป

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.

402 Insufficient credits balance.

The account does not have enough credits to start the full translation.

404 Task not found.

The task does not exist or does not belong to the current API account.

API งานการแปล
แก้ไขคำแปล
API งานการแปล
แปลข้อความ