# เอกสารสำหรับเอเจนต์ AI

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

## จุดเริ่มต้น

| URL | คืออะไร |
|---|---|
| [https://doitong.com/developers/llms.txt](https://doitong.com/developers/llms.txt) | ดัชนีในรูปแบบ [llms.txt](https://llmstxt.org): คู่มือและโมเดลทุกตัวพร้อมคำอธิบายหนึ่งบรรทัด |
| [https://doitong.com/developers/llms-full.txt](https://doitong.com/developers/llms-full.txt) | คู่มือทุกฉบับแบบเต็ม โมเดลเด่นแบบเต็ม และข้อมูลสำคัญของโมเดลทั้งหมด 1,496 รายการ (id ผู้สร้าง ราคา ลิงก์ไปยังหน้าเต็ม) ในไฟล์ Markdown เดียว |
| `/<lang>/developers/llms.txt` | ดัชนีเดียวกันโดยใช้คู่มือในภาษาอื่นของเว็บไซต์ เช่น `https://doitong.com/de/developers/llms.txt` (ภาษาอังกฤษเป็นค่าเริ่มต้น) |
| `<any page>.md` | หน้า Markdown ที่ตรงกับหน้าเว็บ เช่น [https://doitong.com/developers/models/flux/schnell.md](https://doitong.com/developers/models/flux/schnell.md) หรือ [https://doitong.com/developers/docs/quickstart.md](https://doitong.com/developers/docs/quickstart.md) |
| `/developers/models/<id>/llms.txt` | เหมือนกับหน้า `.md` ที่ตรงกับโมเดลนั้น |
| [https://doitong.com/developers/openapi.json](https://doitong.com/developers/openapi.json) | OpenAPI 3.1 สำหรับเครื่องมือสร้างโค้ด: ทุกเอนด์พอยต์และบอดีคำขอที่มีชนิดข้อมูลของโมเดลเด่น ส่วน `?model=<id>`, `?category=<id>` หรือ `?models=all` จะเพิ่มรายการอื่น ๆ |
| `https://api.doitong.com/v1/models` | แค็ตตาล็อกในรูปแบบ JSON (ไม่ต้องใช้คีย์) |

หน้า Markdown ของแต่ละโมเดลมีราคาเป็น USD และเครดิต API พารามิเตอร์ทุกตัวพร้อมค่าที่อนุญาตทั้งหมด ตัวอย่างเฉพาะค่าที่จำเป็นและ
ตัวอย่างแบบเต็ม รูปแบบการตอบกลับ และโค้ดพร้อมใช้สำหรับ curl, JavaScript, Python และ MCP

## คัดลอกสำหรับ AI

หน้าโมเดลทุกหน้ามีปุ่ม **คัดลอกสำหรับ AI**: คัดลอกหน้าเป็น Markdown หรือเปิดใน ChatGPT หรือ Claude พร้อม
พรอมต์ที่ชี้ผู้ช่วยไปยังเวอร์ชัน Markdown

## พรอมต์ที่ใช้งานได้

วางข้อความนี้ใน Claude, ChatGPT หรือ Cursor แล้วอธิบายสิ่งที่คุณต้องการสร้าง:

```text พรอมต์
I want to generate images/video/audio with the Doitong API.
Read https://doitong.com/developers/llms.txt first, then the .md page of each model you plan to use.
Facts: base URL https://api.doitong.com/v1; auth header "Authorization: Bearer <key>" with the key from the
DOITONG_API_KEY environment variable; run with POST /run/{model_id}?wait=20 and, if the status is
still queued or running, poll GET /requests/{id}?wait=20; outputs[].url are file URLs on Doitong storage
(kept forever by default; add ?storage=temporary for throwaway runs, deleted after 7 days).
Get the price first with POST /quote/{model_id} (same body): exact, or for a model charged by usage the
most the run can cost (the unused part is refunded). Prices are in USD; 1000 API credits = 1 USD.
Use the parameter names from the model page; never invent parameters.
```

## ให้เอเจนต์เรียกใช้โมเดลด้วยตัวเอง

หากต้องการให้เอเจนต์สร้างสื่อโดยตรง ให้เชื่อมต่อ [เซิร์ฟเวอร์ MCP](https://doitong.com/developers/docs/mcp) ด้วยคีย์ที่มี
งบประมาณเป็นเครดิต API จากนั้นเอเจนต์จะมีเครื่องมือสำหรับค้นหาโมเดล ดูราคา เรียกใช้ และดึงผลลัพธ์ และจะไม่สามารถใช้จ่ายเกิน
งบประมาณได้
