บทนำ

ยินดีต้อนรับสู่ API การแปลภาษาของ i18n-agent! บริการแปลภาษาด้วยปัญญาประดิษฐ์พร้อมการปรับให้เข้ากับวัฒนธรรม

เอกสารประกอบ API นี้ให้ข้อมูลโดยละเอียดเกี่ยวกับจุดสิ้นสุดที่มีให้ใช้งาน วิธีการตรวจสอบสิทธิ์ รูปแบบคำขอและการตอบกลับ และรหัสข้อผิดพลาด

URL พื้นฐาน

สภาพแวดล้อม URL
การพัฒนา http://localhost:8000
การผลิต https://api.i18nagent.ai

คุณลักษณะหลัก

  • 🌐 การสนับสนุนหลายภาษา - แปลเนื้อหาเป็น 10+ ภาษาพร้อมปรับให้เข้ากับวัฒนธรรม
  • 🚀 การสตรีมแบบเรียลไทม์ - เหตุการณ์ที่ส่งจากเซิร์ฟเวอร์สำหรับการอัปเดตความคืบหน้า
  • 📁 การแปลไฟล์ - รองรับ JSON, YAML, XML, CSV และอื่นๆ
  • 🔐 การตรวจสอบสิทธิ์อย่างปลอดภัย - การตรวจสอบสิทธิ์โดยใช้คีย์ API
  • 💳 ระบบเครดิต - รูปแบบการกำหนดราคาแบบจ่ายตามการใช้งาน
  • 🤖 ขับเคลื่อนด้วยปัญญาประดิษฐ์ - ใช้ LLM ขั้นสูงสำหรับการแปลที่แม่นยำ

การตรวจสอบสิทธิ์

เพื่อตรวจสอบสิทธิ์ ให้ใช้โค้ดนี้:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  -H "Authorization: Bearer i18n_your_api_key_here"
const headers = {
  'Authorization': 'Bearer i18n_your_api_key_here',
  'Content-Type': 'application/json'
};

fetch('api_endpoint_here', { headers })
  .then(response => response.json())
  .then(data => console.log(data));
import requests

headers = {
    'Authorization': 'Bearer i18n_your_api_key_here',
    'Content-Type': 'application/json'
}

response = requests.get('api_endpoint_here', headers=headers)
print(response.json())
package main

import (
    "net/http"
)

func main() {
    client := &http.Client{}
    req, _ := http.NewRequest("GET", "api_endpoint_here", nil)
    req.Header.Add("Authorization", "Bearer i18n_your_api_key_here")
    
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}

ตรวจสอบให้แน่ใจว่าได้แทนที่ i18n_your_api_key_here ด้วยคีย์ API ของคุณ

API i18n-agent ใช้คีย์ API เพื่ออนุญาตให้เข้าถึง API คุณสามารถรับคีย์ API ของคุณจากแดชบอร์ดบัญชีของคุณ

คีย์ API ต้องถูกรวมอยู่ในคำขอ API ทั้งหมดไปยังเซิร์ฟเวอร์ในส่วนหัวที่ดูเหมือนดังต่อไปนี้:

Authorization: Bearer i18n_your_api_key_here

จุดสิ้นสุด

ข้อมูลบริการ

รับข้อมูลบริการ

GET /

ส่งคืนข้อมูลเมตาดาตาของบริการและจุดสิ้นสุดที่มีให้ใช้งาน

curl -X GET "https://api.i18nagent.ai/" \
  -H "Authorization: Bearer i18n_your_api_key_here" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.i18nagent.ai/', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer i18n_your_api_key_here',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
console.log(data);
import requests
import json

response = requests.get(
    'https://api.i18nagent.ai/',
    headers={
        'Authorization': 'Bearer i18n_your_api_key_here',
        'Content-Type': 'application/json'
    }
)

print(response.json())
package main

import (
    "bytes"
    "encoding/json"
    "net/http"
)

func main() {
    client := &http.Client{}
    
    req, _ := http.NewRequest("GET", "https://api.i18nagent.ai/", )
    req.Header.Add("Authorization", "Bearer i18n_your_api_key_here")
    req.Header.Add("Content-Type", "application/json")
    
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}

คำสั่งข้างต้นส่งคืน JSON ที่มีโครงสร้างดังนี้:

{
  "translations": [
    {
      "original": "Hello, world!",
      "translated": "¡Hola, mundo!",
      "confidence": 0.98
    }
  ],
  "metadata": {
    "sourceLanguage": "en",
    "targetLanguage": "es",
    "wordCount": 2,
    "creditsUsed": 0.002,
    "timestamp": "2025-09-19T08:57:08.356Z"
  }
}

การตรวจสอบสถานะ

การตรวจสอบสุขภาพ

GET /health

ตรวจสอบสถานะสุขภาพของบริการ

curl -X GET "https://api.i18nagent.ai/health" \
  -H "Authorization: Bearer i18n_your_api_key_here" \
  -H "Content-Type: application/json"

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

คำสั่งข้างต้นจะส่งผลลัพธ์เป็น JSON ในรูปแบบดังนี้:

ปรับแต่งรหัสบล็อก

เครดิต

รับเครดิตของทีม

รหัสแบบอินไลน์

รับยอดคงเหลือเครดิตปัจจุบันสำหรับทีมที่ได้รับการรับรอง

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

คำสั่งข้างต้นจะส่งผลลัพธ์เป็น JSON ในรูปแบบดังนี้:

ปรับแต่งรหัสบล็อก

ภาษา

แสดงรายการภาษาที่รองรับ

รหัสแบบอินไลน์

รับรายการภาษาทั้งหมดที่รองรับพร้อมอันดับคุณภาพ

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

คำสั่งข้างต้นจะส่งผลลัพธ์เป็น JSON ในรูปแบบดังนี้:

ปรับแต่งรหัสบล็อก

การแปลภาษา

สร้างการแปลภาษา (รวม)

รหัสแบบอินไลน์

จุดสิ้นสุดรวมสำหรับการแปลทั้งข้อความและเนื้อหาไฟล์

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

คำสั่งข้างต้นจะส่งผลลัพธ์เป็น JSON ในรูปแบบดังนี้:

ปรับแต่งรหัสบล็อก

พารามิเตอร์ของเนื้อหาการร้องขอ

พารามิเตอร์ ประเภท จำเป็น คำอธิบาย

สร้างการแปลภาษาพร้อมความคืบหน้าแบบสตรีม

รหัสแบบอินไลน์

สร้างการแปลภาษาพร้อมเหตุการณ์ที่ส่งจากเซิร์ฟเวอร์ (SSE) สำหรับการอัปเดตความคืบหน้าแบบเรียลไทม์

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

ปรับแต่งรหัสบล็อก

คำสั่งด้านบนนี้จะส่งผลลัพธ์เป็น JSON ในรูปแบบดังนี้:

{
  "translations": [
    {
      "original": "Hello, world!",
      "translated": "¡Hola, mundo!",
      "confidence": 0.98
    }
  ],
  "metadata": {
    "sourceLanguage": "en",
    "targetLanguage": "es",
    "wordCount": 2,
    "creditsUsed": 0.002,
    "timestamp": "2025-09-19T08:57:08.357Z"
  }
}

พารามิเตอร์ของ Request Body

พารามิเตอร์ ชนิดข้อมูล ต้องระบุหรือไม่ คำอธิบาย
texts array ใช่ อาร์เรย์ของข้อความที่ต้องการแปลภาษา
targetLanguage string ใช่ รหัสภาษาเป้าหมาย (เช่น 'es', 'fr', 'ja')
targetAudience string ไม่ใช่ กลุ่มเป้าหมาย (เช่น 'general', 'technical', 'casual', 'formal') (ค่าเริ่มต้น: general)
industry string ไม่ใช่ บริบทอุตสาหกรรม (เช่น 'technology', 'healthcare', 'finance') (ค่าเริ่มต้น: technology)
sourceLanguage string ไม่ใช่ รหัสภาษาต้นทาง (ตรวจจับอัตโนมัติหากไม่ระบุ)
region string ไม่ใช่ พื้นที่เฉพาะสำหรับการปรับให้เหมาะสมกับท้องถิ่น (เช่น 'Spain', 'Mexico', 'Brazil')
context string ไม่ใช่ บริบทหรือคำแนะนำเพิ่มเติมสำหรับการแปลภาษา (เช่น 'Keep technical terms in English', 'Use formal tone', 'Preserve brand names')
--------- ---- -------- -----------
texts array Yes Array of texts to translate
targetLanguage string Yes Target language code (e.g., 'es', 'fr', 'ja')
targetAudience string No Target audience (e.g., 'general', 'technical', 'casual', 'formal') (default: general)
industry string No Industry context (e.g., 'technology', 'healthcare', 'finance') (default: technology)
sourceLanguage string No Source language code (auto-detected if not provided)
region string No Specific region for localization (e.g., 'Spain', 'Mexico', 'Brazil')
context string No Optional additional context or instructions for the translation (e.g., 'Keep technical terms in English', 'Use formal tone', 'Preserve brand names')

คำนวณประมาณการค่าใช้จ่ายในการแปลภาษา

POST /translations/estimate

คำนวณจำนวนคำและเครดิตที่ต้องใช้สำหรับการแปลภาษา

curl -X POST "https://api.i18nagent.ai/translations/estimate" \
  -H "Authorization: Bearer i18n_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "texts": [
    "Hello, world!",
    "Welcome to our service"
  ],
  "targetLanguage": "es",
  "targetAudience": "general",
  "industry": "technology",
  "sourceLanguage": "en",
  "region": "Mexico",
  "notes": "Keep technical terms in English, use formal tone"
}'
const response = await fetch('https://api.i18nagent.ai/translations/estimate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer i18n_your_api_key_here',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
        "texts": [
            "Hello, world!",
            "Welcome to our service"
        ],
        "targetLanguage": "es",
        "targetAudience": "general",
        "industry": "technology",
        "sourceLanguage": "en",
        "region": "Mexico",
        "notes": "Keep technical terms in English, use formal tone"
    })
});

const data = await response.json();
console.log(data);
import requests
import json

response = requests.post(
    'https://api.i18nagent.ai/translations/estimate',
    headers={
        'Authorization': 'Bearer i18n_your_api_key_here',
        'Content-Type': 'application/json'
    },
    json={
        "texts": [
            "Hello, world!",
            "Welcome to our service"
        ],
        "targetLanguage": "es",
        "targetAudience": "general",
        "industry": "technology",
        "sourceLanguage": "en",
        "region": "Mexico",
        "notes": "Keep technical terms in English, use formal tone"
    }
)

print(response.json())
package main

import (
    "bytes"
    "encoding/json"
    "net/http"
)

func main() {
    client := &http.Client{}
    data := map[string]interface{}{
        "texts": []string{"Hello, world!", "Welcome to our service"},
        "targetLanguage": "es",
        "targetAudience": "general",
        "industry": "technology",
    }
    jsonData, _ := json.Marshal(data)
    
    req, _ := http.NewRequest("POST", "https://api.i18nagent.ai/translations/estimate", bytes.NewBuffer(jsonData))
    req.Header.Add("Authorization", "Bearer i18n_your_api_key_here")
    req.Header.Add("Content-Type", "application/json")
    
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}

คำสั่งด้านบนนี้จะส่งผลลัพธ์เป็น JSON ในรูปแบบดังนี้:

{
  "translations": [
    {
      "original": "Hello, world!",
      "translated": "¡Hola, mundo!",
      "confidence": 0.98
    }
  ],
  "metadata": {
    "sourceLanguage": "en",
    "targetLanguage": "es",
    "wordCount": 2,
    "creditsUsed": 0.002,
    "timestamp": "2025-09-19T08:57:08.357Z"
  }
}

พารามิเตอร์ของ Request Body

พารามิเตอร์ ชนิดข้อมูล ต้องระบุหรือไม่ คำอธิบาย
content string ใช่ เนื้อหาที่ต้องการวิเคราะห์
fileType string ไม่ใช่ ประเภทไฟล์สำหรับการวิเคราะห์เนื้อหา (ค่าเริ่มต้น: txt)
--------- ---- -------- -----------
content string Yes Content to analyze
fileType string No File type for content analysis (default: txt)

การวิเคราะห์

วิเคราะห์เนื้อหาเพื่อตรวจสอบความพร้อมสำหรับการแปลภาษา

POST /analyze

วิเคราะห์เนื้อหาเพื่อระบุปัญหาที่อาจเกิดขึ้นและรับข้อเสนอแนะเพื่อปรับปรุงก่อนการแปลภาษา จุดสิ้นสุดนี้จะใช้เครดิตในอัตราเดียวกับการแปลภาษา (0.001 เครดิตต่อคำ)

curl -X POST "https://api.i18nagent.ai/analyze" \
  -H "Authorization: Bearer i18n_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "texts": [
    "Hello, world!",
    "Welcome to our service"
  ],
  "targetLanguage": "es",
  "targetAudience": "general",
  "industry": "technology",
  "sourceLanguage": "en",
  "region": "Mexico",
  "notes": "Keep technical terms in English, use formal tone"
}'
const response = await fetch('https://api.i18nagent.ai/analyze', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer i18n_your_api_key_here',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
        "texts": [
            "Hello, world!",
            "Welcome to our service"
        ],
        "targetLanguage": "es",
        "targetAudience": "general",
        "industry": "technology",
        "sourceLanguage": "en",
        "region": "Mexico",
        "notes": "Keep technical terms in English, use formal tone"
    })
});

const data = await response.json();
console.log(data);
import requests
import json

response = requests.post(
    'https://api.i18nagent.ai/analyze',
    headers={
        'Authorization': 'Bearer i18n_your_api_key_here',
        'Content-Type': 'application/json'
    },
    json={
        "texts": [
            "Hello, world!",
            "Welcome to our service"
        ],
        "targetLanguage": "es",
        "targetAudience": "general",
        "industry": "technology",
        "sourceLanguage": "en",
        "region": "Mexico",
        "notes": "Keep technical terms in English, use formal tone"
    }
)

print(response.json())
package main

import (
    "bytes"
    "encoding/json"
    "net/http"
)

func main() {
    client := &http.Client{}
    data := map[string]interface{}{
        "texts": []string{"Hello, world!", "Welcome to our service"},
        "targetLanguage": "es",
        "targetAudience": "general",
        "industry": "technology",
    }
    jsonData, _ := json.Marshal(data)
    
    req, _ := http.NewRequest("POST", "https://api.i18nagent.ai/analyze", bytes.NewBuffer(jsonData))
    req.Header.Add("Authorization", "Bearer i18n_your_api_key_here")
    req.Header.Add("Content-Type", "application/json")
    
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}

คำสั่งด้านบนนี้จะส่งผลลัพธ์เป็น JSON ในรูปแบบดังนี้:

{
  "translations": [
    {
      "original": "Hello, world!",
      "translated": "¡Hola, mundo!",
      "confidence": 0.98
    }
  ],
  "metadata": {
    "sourceLanguage": "en",
    "targetLanguage": "es",
    "wordCount": 2,
    "creditsUsed": 0.002,
    "timestamp": "2025-09-19T08:57:08.357Z"
  }
}

พารามิเตอร์ของ Request Body

พารามิเตอร์ ประเภท จำเป็น คำอธิบาย
targetLanguage string Yes Target language code for translation
targetAudience string No Target audience (default: general)
industry string No Industry context (default: general)
sourceLanguage string No Source language code (auto-detected if not provided)
region string No Specific region for localization
content object Yes Content to analyze (text, array of texts, or structured object)
fileType string No Optional file type if content is from a file

งานแปลภาษา

รับรายละเอียดการแปล

GET /translations/{id}

รับรายละเอียดของการแปลเฉพาะโดยใช้ ID

curl -X GET "https://api.i18nagent.ai/translations/{id}" \
  -H "Authorization: Bearer i18n_your_api_key_here" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.i18nagent.ai/translations/{id}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer i18n_your_api_key_here',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
console.log(data);
import requests
import json

response = requests.get(
    'https://api.i18nagent.ai/translations/{id}',
    headers={
        'Authorization': 'Bearer i18n_your_api_key_here',
        'Content-Type': 'application/json'
    }
)

print(response.json())
package main

import (
    "bytes"
    "encoding/json"
    "net/http"
)

func main() {
    client := &http.Client{}
    
    req, _ := http.NewRequest("GET", "https://api.i18nagent.ai/translations/{id}", )
    req.Header.Add("Authorization", "Bearer i18n_your_api_key_here")
    req.Header.Add("Content-Type", "application/json")
    
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}

คำสั่งข้างต้นจะส่งคืนข้อมูล JSON ในรูปแบบดังนี้:

{
  "translations": [
    {
      "original": "Hello, world!",
      "translated": "¡Hola, mundo!",
      "confidence": 0.98
    }
  ],
  "metadata": {
    "sourceLanguage": "en",
    "targetLanguage": "es",
    "wordCount": 2,
    "creditsUsed": 0.002,
    "timestamp": "2025-09-19T08:57:08.357Z"
  }
}

พารามิเตอร์ Query

พารามิเตอร์ จำเป็น คำอธิบาย
id ใช่ ID ของการแปล
--------- -------- -----------
id Yes Translation ID

รับสถานะการแปล

GET /translations/{id}/status

รับสถานะปัจจุบันของงานแปล

curl -X GET "https://api.i18nagent.ai/translations/{id}/status" \
  -H "Authorization: Bearer i18n_your_api_key_here" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.i18nagent.ai/translations/{id}/status', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer i18n_your_api_key_here',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
console.log(data);
import requests
import json

response = requests.get(
    'https://api.i18nagent.ai/translations/{id}/status',
    headers={
        'Authorization': 'Bearer i18n_your_api_key_here',
        'Content-Type': 'application/json'
    }
)

print(response.json())
package main

import (
    "bytes"
    "encoding/json"
    "net/http"
)

func main() {
    client := &http.Client{}
    
    req, _ := http.NewRequest("GET", "https://api.i18nagent.ai/translations/{id}/status", )
    req.Header.Add("Authorization", "Bearer i18n_your_api_key_here")
    req.Header.Add("Content-Type", "application/json")
    
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}

คำสั่งข้างต้นจะส่งคืนข้อมูล JSON ในรูปแบบดังนี้:

{
  "translations": [
    {
      "original": "Hello, world!",
      "translated": "¡Hola, mundo!",
      "confidence": 0.98
    }
  ],
  "metadata": {
    "sourceLanguage": "en",
    "targetLanguage": "es",
    "wordCount": 2,
    "creditsUsed": 0.002,
    "timestamp": "2025-09-19T08:57:08.357Z"
  }
}

พารามิเตอร์ Query

พารามิเตอร์ จำเป็น คำอธิบาย
id ใช่ ID ของการแปล
--------- -------- -----------
id Yes Translation ID

ดาวน์โหลดผลลัพธ์การแปล

GET /translations/{id}/result

ดาวน์โหลดเนื้อหาที่แปลแล้ว

curl -X GET "https://api.i18nagent.ai/translations/{id}/result" \
  -H "Authorization: Bearer i18n_your_api_key_here" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.i18nagent.ai/translations/{id}/result', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer i18n_your_api_key_here',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
console.log(data);
import requests
import json

response = requests.get(
    'https://api.i18nagent.ai/translations/{id}/result',
    headers={
        'Authorization': 'Bearer i18n_your_api_key_here',
        'Content-Type': 'application/json'
    }
)

print(response.json())
package main

import (
    "bytes"
    "encoding/json"
    "net/http"
)

func main() {
    client := &http.Client{}
    
    req, _ := http.NewRequest("GET", "https://api.i18nagent.ai/translations/{id}/result", )
    req.Header.Add("Authorization", "Bearer i18n_your_api_key_here")
    req.Header.Add("Content-Type", "application/json")
    
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}

คำสั่งข้างต้นจะส่งคืนข้อมูล JSON ในรูปแบบดังนี้:

{
  "translations": [
    {
      "original": "Hello, world!",
      "translated": "¡Hola, mundo!",
      "confidence": 0.98
    }
  ],
  "metadata": {
    "sourceLanguage": "en",
    "targetLanguage": "es",
    "wordCount": 2,
    "creditsUsed": 0.002,
    "timestamp": "2025-09-19T08:57:08.357Z"
  }
}

พารามิเตอร์ Query

พารามิเตอร์ จำเป็น คำอธิบาย
id ใช่ ID ของการแปล
language ไม่ รหัสภาษาสำหรับผลลัพธ์ภาษาเฉพาะ
--------- -------- -----------
id Yes Translation ID
language No Language code for specific language result

ดาวน์โหลดไฟล์ต้นฉบับ

translation_of_input_1

ดาวน์โหลดไฟล์ต้นฉบับที่อัปโหลด

translation_of_input_3

translation_of_input_4

translation_of_input_5

translation_of_input_6

คำสั่งข้างต้นจะส่งผลลัพธ์เป็น JSON ในลักษณะนี้:

translation_of_input_8

พารามิเตอร์ในการสอบถาม

พารามิเตอร์ จำเป็น คำอธิบาย
id ใช่ รหัสการแปลภาษา
--------- -------- -----------
id Yes Translation ID

ดำเนินการแปลภาษาต่อจากจุดตรวจสอบ

translation_of_input_12

ดำเนินการแปลภาษาต่อจากจุดตรวจสอบที่ล้มเหลวหรือถูกขัดจังหวะ หรือจากจุดตรวจสอบล่าสุดที่ประสบความสำเร็จโดยอัตโนมัติ

translation_of_input_14

translation_of_input_15

translation_of_input_16

translation_of_input_17

คำสั่งข้างต้นจะส่งผลลัพธ์เป็น JSON ในลักษณะนี้:

translation_of_input_19

พารามิเตอร์ในการสอบถาม

พารามิเตอร์ จำเป็น คำอธิบาย
id ใช่ รหัสการแปลภาษา
--------- -------- -----------
id Yes Translation ID

พารามิเตอร์ในเนื้อหาการร้องขอ

พารามิเตอร์ ชนิดข้อมูล จำเป็น คำอธิบาย
checkpointId สตริง ไม่ รหัสจุดตรวจสอบที่จะดำเนินการแปลต่อ (ได้จากจุดสิ้นสุดสถานะ) หากไม่ระบุและ autoDetect เป็น true จะดำเนินการแปลต่อจากจุดตรวจสอบล่าสุดที่ประสบความสำเร็จ
continueToEnd บูลีน ไม่ ว่าจะดำเนินการแปลต่อจนถึงเนื้อหาที่เหลือทั้งหมดหลังจากดำเนินการแปลต่อ (ค่าเริ่มต้น: true)
autoDetect บูลีน ไม่ ตรวจหาและดำเนินการแปลต่อจากจุดตรวจสอบล่าสุดที่ประสบความสำเร็จโดยอัตโนมัติ หากไม่ระบุ checkpointId (ค่าเริ่มต้น: true)
--------- ---- -------- -----------
checkpointId string No Opaque checkpoint ID to resume from (obtained from status endpoint). If not provided and autoDetect is true, will resume from last successful checkpoint.
continueToEnd boolean No Whether to continue processing all remaining content after resuming (default: true)
autoDetect boolean No Automatically detect and resume from the last successful checkpoint if checkpointId is not provided (default: true)

รับงานแปลภาษาที่กำลังดำเนินการอยู่

translation_of_input_25

รับรายการงานแปลภาษาที่กำลังดำเนินการอยู่ในปัจจุบัน

translation_of_input_27

translation_of_input_28

translation_of_input_29

translation_of_input_30

คำสั่งข้างต้นจะส่งผลลัพธ์เป็น JSON ในลักษณะนี้:

translation_of_input_32

ข้อผิดพลาด

API i18n-agent ใช้รหัสข้อผิดพลาดต่อไปนี้:

รหัสข้อผิดพลาด ความหมายและวิธีแก้ไข
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is invalid.
402 Payment Required -- Insufficient credits in your account.
403 Forbidden -- Your API key is inactive or team not found.
404 Not Found -- The specified resource could not be found.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

รูปแบบการตอบสนองข้อผิดพลาดสำหรับนักพัฒนาไทย

ตัวอย่างโค้ดสำหรับนักพัฒนาไทย