API เดียวสำหรับโมเดลสร้างภาพ วิดีโอ และเสียงชั้นนำ
รูปแบบคำขอเดียวกันสำหรับทุกโมเดล ทราบราคาที่แน่นอนก่อนเรียกใช้ เก็บไฟล์ไว้ตลอดไปหรือฟรี 7 วัน แล้วแต่คุณเลือก
POSTapi.doitong.com/v1/run/{model_id}
จากคีย์ไปสู่วิดีโอที่เสร็จสมบูรณ์ในการเรียกใช้ครั้งเดียว
# Keys start with doitong_
export DOITONG_API_KEY="doitong_..."
# Check it works: returns your API credit balance
curl https://api.doitong.com/v1/account \
-H "Authorization: Bearer $DOITONG_API_KEY"
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/kling-video/v3/pro/image-to-video?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "The banana manager turns to the camera, smiles and waves while coworkers keep typing, gentle handheld camera",
"image": "https://content.doitong.com/images/gp/image_20260610003801_541d9719_316882.png",
"duration": 5
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"model": "kling-video/v3/pro/image-to-video",
"status": "succeeded",
"cost": {
"credits": 840,
"usd": "0.84",
"charged": 840,
"refunded": 0
},
"outputs": [
{
"type": "video",
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
"content_type": "video/mp4",
"file_size": 1843200,
"width": 1280,
"height": 720,
"duration": 5,
"stored": true
}
]
}
ดูว่าแต่ละโมเดลสร้างอะไรได้บ้าง
เรียกดูตามแล็บ
แล็บทั้งหมด (84)- Alibaba เอนด์พอยต์: 142
- Black Forest Labs เอนด์พอยต์: 135
- Lightricks เอนด์พอยต์: 102
- MiniMax เอนด์พอยต์: 64
- Kling เอนด์พอยต์: 62
- ByteDance เอนด์พอยต์: 57
- Bria AI เอนด์พอยต์: 54
- Stability AI เอนด์พอยต์: 48
- PixVerse เอนด์พอยต์: 42
- Google เอนด์พอยต์: 41
- Ideogram เอนด์พอยต์: 36
- Tencent เอนด์พอยต์: 33
- Microsoft เอนด์พอยต์: 27
- NVIDIA เอนด์พอยต์: 25
- Meta เอนด์พอยต์: 24
- Recraft เอนด์พอยต์: 24
- Vidu เอนด์พอยต์: 22
- xAI เอนด์พอยต์: 19
เรียนรู้คำขอเดียว ใช้ได้กับทุกโมเดล
พารามิเตอร์แบบรวมเป็นหนึ่ง
image, duration และ aspect_ratio มีความหมายเหมือนกันในทุกโมเดล ชื่อแบบ native ของโมเดลยังใช้เป็น alias ได้
"image": "…", "duration": 5
URL คำขอเดียวสำหรับทุกโมเดล
สลับโมเดลโดยเปลี่ยนพาธ การยืนยันตัวตน บอดี้ และการตอบกลับยังคงเหมือนเดิม
POST /run/{model_id}
Quote = ค่าใช้จ่าย
POST /quote/{model_id} จะคืนราคาที่แน่นอนสำหรับอินพุตของคุณ นั่นคือจำนวนที่คุณจ่ายและจะไม่มีวันมากกว่านั้น
→ { "credits": 560, "usd": "0.56" }
เก็บไฟล์ไว้นานเท่าที่คุณต้องการ
เอาต์พุตทุกไฟล์จะถูกคัดลอกไปยังพื้นที่จัดเก็บของเรา เก็บไว้ตลอดไปในราคา $0.10 ต่อ GB ต่อเดือน หรือฟรี 7 วัน: สลับได้ครั้งเดียวในการตั้งค่าบัญชีหรือในแต่ละคำขอ
?storage=permanent | temporary
รูปแบบข้อผิดพลาดเดียว
ข้อผิดพลาดทุกครั้งจะระบุพารามิเตอร์ สาเหตุ และลิงก์เอกสารในทุกโมเดล อินพุตที่ไม่ถูกต้องจะไม่ถูกเรียกเก็บเงิน
"param": "duration", "code": "out_of_range"
งบประมาณต่อคีย์ + MCP
จำกัดการใช้จ่ายต่อคีย์ แล้วส่งต่อคีย์นั้นให้เอเจนต์ผ่านเซิร์ฟเวอร์ MCP
api.doitong.com/v1/mcp
ให้เอเจนต์เลือกโมเดล แจ้งราคา และเรียกใช้
เชื่อมต่อ Claude, ChatGPT หรือ Cursor กับเซิร์ฟเวอร์ MCP ของ Doitong ด้วยคีย์เดียวกับที่ใช้สำหรับ REST หน้าเอกสารทุกหน้ายังมีเวอร์ชัน Markdown เพื่อให้เอเจนต์อ่านได้ตรงกับที่คุณอ่าน
- แจ้งราคาก่อนเรียกใช้ทุกครั้ง เพื่อให้เอเจนต์อยู่ภายในงบประมาณ
- ข้อผิดพลาดจะระบุพารามิเตอร์ที่เอเจนต์ต้องแก้ไข
- เวอร์ชัน Markdown ของทุกหน้าสำหรับหน้าต่างบริบท
วางลงใน Claude, ChatGPT หรือ Cursor แล้วอธิบายสิ่งที่คุณต้องการสร้าง
แสดงพรอมต์
You can generate images, video, audio and 3D with the Doitong API.
Read https://doitong.com/developers/llms.txt first, then the .md page of each model you plan to use.
Base URL: https://api.doitong.com/v1. Authenticate with the header "Authorization: Bearer $DOITONG_API_KEY".
List models with GET /models and read one model's schema with GET /models/{model_id}.
Always call POST /quote/{model_id} with the input first and tell me the price (1000 API credits = 1 USD).
Then call POST /run/{model_id}?wait=20 with the same JSON body and an Idempotency-Key header.
If the status is still queued or running, poll GET /requests/{id}?wait=20.
Use outputs[].url from the response; files are kept forever unless the account keeps them 7 days
(pass ?storage=temporary for throwaway runs). Use only parameters from the model schema.
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
--header "Authorization: Bearer YOUR_API_KEY"
// .cursor/mcp.json
{
"mcpServers": {
"doitong-models": {
"url": "https://api.doitong.com/v1/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
// claude_desktop_config.json
{
"mcpServers": {
"doitong-models": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.doitong.com/v1/mcp",
"--header",
"Authorization: Bearer YOUR_API_KEY"
]
}
}
}
เรียกใช้ครั้งเดียวในโฟลเดอร์โปรเจกต์ของคุณ ใช้คีย์ Bearer เดียวกับ REST API
รีสตาร์ต Cursor หลังบันทึก เซิร์ฟเวอร์จะแสดงอยู่ใต้ MCP ในการตั้งค่า
ไปที่ Settings → Developer → Edit config แล้วรีสตาร์ต Claude Desktop ต้องใช้ Node.js