/api/v1/jobsट्रांसक्रिप्शन जॉब सबमिट करें
submit सीमाट्रांसक्रिप्शन के लिए 1..N सार्वजनिक TikTok URL सबमिट करें। बैच का आकार आपके प्लान से सीमित है; एक single URL का परिणाम तुरंत इनलाइन लौट सकता है।
curl -X POST "https://www.tokcaption.com/api/v1/jobs" \
-H "X-API-Key: $TOKCAPTION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":["https://www.tiktok.com/@creator/video/1234567890","https://www.tiktok.com/@creator/video/0987654321"],"output_language":"en","also_translate_to":["es"],"allow_asr_fallback":false,"include_download_assets":false,"idempotency_key":"client-req-001"}'- जब प्रोसेसिंग इनलाइन पूरी होती है, तो एक ही URL HTTP 200 के साथ टर्मिनल completed या failed पेलोड लौटा सकता है।
- बैच HTTP 202 के साथ job_id, एग्रीगेट स्टेटस और items के अंदर हर आइटम का स्टेटस लौटाते हैं।
- प्रति वीडियो स्थिति के लिए items ऐरे देखें: queued, processing, completed, या failed।
- फ़्री प्लान पर include_download_assets: true सेट करने पर PLAN_REQUIRED (403) लौटता है।
बॉडी फ़ील्ड्स
सफल रिस्पॉन्स · HTTP 202
{
"job_id": "b86f89f2-34f6-4b76-88f6-03c13c51b7a6",
"status": "queued",
"total_items": 2,
"items": [
{
"id": "tx_1",
"transcript_id": "85f4dd35-3bc5-413f-81a6-63e0b61722d2",
"item_index": 0,
"input_url": "https://www.tiktok.com/@creator/video/1234567890",
"status": "queued"
}
]
}तुरंत एकल सफलता
HTTP 200{
"job_id": "51f0ab70-7b6f-4f3b-9116-4135a6d8f53d",
"status": "completed",
"total_items": 1,
"completed": 1,
"failed": 0,
"items": [
{
"id": "tx_single_1",
"transcript_id": "85f4dd35-3bc5-413f-81a6-63e0b61722d2",
"item_index": 0,
"status": "completed",
"output_language": "en",
"source_language": "en",
"selected_track_type": "creator",
"transcript_text": "Whenever I'm asked to teach a beginner how to cook...",
"metadata": {
"author_username": "foodnetwork",
"duration_seconds": 29
},
"completed_at": "2026-03-14T08:33:14.000Z"
}
]
}एकल विफलता (कैप्शन नहीं)
HTTP 200{
"job_id": "8a0d6d7a-78f0-4ab0-8a8c-72f8f5184de8",
"status": "failed",
"total_items": 1,
"completed": 0,
"failed": 1,
"items": [
{
"id": "tx_single_2",
"transcript_id": "d40b2545-7c62-4bbb-a7e3-020c663f18a0",
"item_index": 0,
"status": "failed",
"error_code": "NO_CAPTIONS_AVAILABLE",
"error_message": "Captions are not available for this TikTok video."
}
]
}एरर