🎯 พื้นฐาน API ของ HeyGen
What is HeyGen API Fundamentals?
🇹🇭 ภาษาไทย
API (Application Programming Interface) ช่วยให้โปรแกรมต่างๆ สื่อสารกัน HeyGen API ให้คุณสร้างวิดีโอด้วยโค้ดโดยไม่ต้องใช้หน้าเว็บ คุณจะเรียนรู้เกี่ยวกับ API keys, endpoints, requests/responses, JSON และ rate limits สัปดาห์นี้เราจะเรียนไวยากรณ์ Present Perfect เช่น "I have created an API key" และ "The API has returned a response" — ใช้เมื่อพูดถึงประสบการณ์หรือการกระทำที่เพิ่งเสร็จ
🇬🇧 English
An API lets programs communicate with each other. The HeyGen API lets you create videos with code — no web interface needed! You'll learn about API keys, endpoints, requests/responses, JSON, and rate limits. Grammar: Present Perfect — "I have created an API key" and "The API has returned a response" — used for experiences or recently completed actions.
🤩 Fun Facts — ข้อเท็จจริงน่ารู้
🔹 The HeyGen API can generate a video in under 5 minutes using a single API call.
HeyGen API สร้างวิดีโอได้ในเวลาไม่ถึง 5 นาทีด้วย API call เพียงครั้งเดียว
🔹 JSON was created by Douglas Crockford and is now the most popular data format on the web.
JSON ถูกสร้างโดย Douglas Crockford และเป็นรูปแบบข้อมูลที่นิยมที่สุดบนเว็บ
🔹 HTTP status code 200 means "OK" — your request was successful.
สถานะ HTTP 200 แปลว่า "OK" — คำขอของคุณสำเร็จแล้ว
🔹 Rate limiting protects servers — HeyGen allows about 50 API calls per minute.
Rate limiting ปกป้องเซิร์ฟเวอร์ — HeyGen อนุญาตประมาณ 50 API calls ต่อนาที
🧪 Quick Check — ตรวจสอบด่วน
Test your understanding — ทดสอบความเข้าใจ
What is "API" in Thai?
"API" แปลว่าอะไร?
Which is the definition of "endpoint"?
คำนิยามของ "endpoint" คือข้อใด?
Which grammar topic are we studying this week?
เราเรียนหัวข้อไวยากรณ์อะไรสัปดาห์นี้?
📚 คำศัพท์สำคัญ
Key Vocabulary
🧪 Quick Check — ตรวจสอบด่วน
Test your understanding — ทดสอบความเข้าใจ
What does "request" mean?
"request" หมายถึงอะไร?
"response" in Thai is:
"response" ภาษาไทยคือ:
Which word means: "A value you send with an API request..."?
คำใดหมายถึง: "A value you send with an API request..."?
📖 ไวยากรณ์: Present Perfect (I have created... / The API has returned...)
Grammar Focus
📖 Grammar Focus: Present Perfect (I have created... / The API has returned...)
I have created an API key. (ฉันได้สร้างคีย์ API แล้ว)
The API has returned a response. (API ได้ส่งกลับการตอบกลับแล้ว)
I have not received a response yet. (ฉันยังไม่ได้รับการตอบกลับ)
The server has not processed the request. (เซิร์ฟเวอร์ยังไม่ได้ประมวลผลคำขอ)
Have you authenticated with the API key? (คุณยืนยันตัวตนด้วยคีย์ API แล้วหรือยัง?)
Has the video finished rendering? (วิดีโอเรนเดอร์เสร็จแล้วหรือยัง?)
I have already tested the endpoint. (ฉันได้ทดสอบเอนด์พอยต์แล้ว)
Have you ever used a webhook? (คุณเคยใช้เว็บฮุกไหม?)
🚀 บทเรียนทีละขั้น
Step-by-Step Tutorial
1Get Your API Key — รับคีย์ API ของคุณ
2Make Your First API Request — ทำ API Request แรก
3Understand the JSON Response — เข้าใจ JSON Response
4Create a Video via API — สร้างวิดีโอผ่าน API
🌎 การใช้งานจริง
Real World Application
💼 In Real Life — ในชีวิตจริง
Thai tech startups integrate the HeyGen API into their platforms so customers can generate personalized video messages automatically.
สตาร์ทอัพเทคโนโลยีไทยผสาน HeyGen API เข้ากับแพลตฟอร์มของตน เพื่อให้ลูกค้าสร้างข้อความวิดีโอเฉพาะบุคคลได้โดยอัตโนมัติ
🧪 Quick Check — ตรวจสอบด่วน
Test your understanding — ทดสอบความเข้าใจ
Which sentence correctly uses Present Perfect (I have created... / The API has returned...)?
ประโยคใดใช้ Present Perfect (I have created... / The API has returned...) ถูกต้อง?
What is the Thai meaning of "rate limit"?
"rate limit" แปลว่าอะไร?
In the real world, heygen api fundamentals is important because:
ในโลกจริง พื้นฐาน API ของ HeyGen สำคัญเพราะ:
📝 การบ้าน
Homework
สร้างคีย์ API บน HeyGen (ถ้ามีสิทธิ์เข้าถึง) หรืออธิบายขั้นตอนด้วย Present Perfect
เขียน 6 ประโยค Present Perfect เกี่ยวกับเส้นทางการเรียนรู้ API ของคุณ
อ่านเอกสาร HeyGen API แล้วระบุ 5 endpoints พร้อมคำอธิบาย
เขียน JSON request body สำหรับการสร้างวิดีโอ และอธิบายแต่ละ parameter
🎉 ยินดีด้วย! / Congratulations!
คุณจบบทเรียนสัปดาห์ที่ 10 แล้ว!
You have completed Week 10: HeyGen API Fundamentals! Keep learning! ไปต่อกันเลย!