{
  "aboutHtml": "<p>GPT-6 Astra เป็นโมเดลของ OpenAI สำหรับงานให้เหตุผลและงานวิชาชีพที่ยากที่สุด ผู้พัฒนาสร้างโมเดลนี้สำหรับวิศวกรรมซอฟต์แวร์ การใช้คอมพิวเตอร์ การวิจัย งานวิทยาศาสตร์ และการสร้างเอกสาร โมเดลรับข้อความและภาพ แล้วสร้างข้อความ เช่น คำอธิบาย โค้ด และชิ้นงานที่มีโครงสร้าง โปรไฟล์ Astra แบบมาตรฐานนี้แยกจากโหมดการให้เหตุผล Pro และโปรไฟล์ Sol กับ Luna</p><h4>ทำงานตั้งแต่ต้นจนจบ</h4><p>เตรียมงานโดยยึดผลลัพธ์ที่ต้องการ แหล่งข้อมูลที่เกี่ยวข้อง และเกณฑ์การเสร็จสิ้น สำหรับวิศวกรรมซอฟต์แวร์ ให้แนบโค้ด ความผิดพลาดที่สังเกตพบ พฤติกรรมที่คาดหวัง และอินเทอร์เฟซที่ต้องรักษาไว้ สำหรับการวิเคราะห์เชิงวิชาชีพ ให้ส่งเอกสาร การตัดสินใจที่ต้องทำ และเงื่อนไขที่ข้อสรุปต้องพิจารณา ตัวอย่างคำสั่งที่ใช้ได้จริงคือ “เปรียบเทียบทางเลือกเหล่านี้กับข้อกำหนด ระบุสิ่งที่ต้องพึ่งพา และจัดทำบันทึกเพื่อการตัดสินใจพร้อมหลักฐานสำหรับข้อค้นพบสำคัญทุกรายการ”</p><p>สำหรับงานที่ใช้ภาพ ให้เตรียมแหล่งข้อมูลให้อ่านได้ชัดเจน และระบุว่าภาพแสดงสถานะอินเทอร์เฟซ แผนภูมิ หรือข้อกำหนดการออกแบบ ขอให้ระบุรายละเอียดที่มองเห็นได้ซึ่งรองรับข้อสังเกต ชิ้นงานโค้ดหรือเอกสารควรเชื่อมโยงกับหลักฐานนั้น แทนการสมมติว่ามีการดำเนินการภายนอกแล้ว</p><h4>การเขียนพรอมต์และติดตามงาน</h4><p>แนวทาง Astra ของ OpenAI แนะนำให้กำหนดเป้าหมาย เกณฑ์ความสำเร็จ กฎเรื่องหลักฐาน และเงื่อนไขหยุดให้ชัดเจน แนวทางระบุว่าโมเดลตอบสนองต่อคำสั่งละเอียดในบริบทและไฟล์ที่เข้าถึงได้อย่างมาก จึงควรแก้ความขัดแย้งของแนวทางและระบุลำดับความสำคัญของงานผู้ใช้ กำหนดว่าเมื่อใดโมเดลควรใช้ข้อมูลที่มี ตั้งสมมติฐานอย่างสมเหตุสมผล หรือถามหารายละเอียดที่ขาดไปและอาจเปลี่ยนผลลัพธ์</p><p>ผู้สร้างยังแนะนำให้ปรับรูปแบบคำตอบและความลึกของการตรวจสอบ สำหรับเอกสาร ให้อธิบายผู้อ่านและโครงสร้างสุดท้าย สำหรับงานวิศวกรรม ให้กำหนดการตรวจสอบที่เกี่ยวข้องกับการเปลี่ยนแปลง วิธีนี้ทำให้โมเดลมีจุดจบงานที่ชัดเจนโดยไม่เพิ่มงานที่ไม่เกี่ยวข้อง</p><h4>การให้เหตุผลและบริบท</h4><p>Astra รองรับระดับความเข้มข้นในการให้เหตุผล low, medium, high, xhigh และ max แต่ไม่รองรับ none ระดับความเข้มข้นแยกจากโหมดการให้เหตุผลมาตรฐานหรือ Pro ของผู้พัฒนา การ์ดโมเดลระบุบริบท 1,050,000 โทเค็น อินพุตสูงสุด 922,000 โทเค็น และเอาต์พุตสูงสุด 128,000 โทเค็น วันที่ตัดความรู้คือ 30 เมษายน 2026</p><p>การให้เหตุผลใช้พื้นที่คำตอบ แม้โทเค็นภายในแบบดิบจะไม่ถูกเปิดเผยเป็นคำตอบทั่วไป ควรเผื่อพื้นที่สำหรับชิ้นงานสุดท้าย และตรวจสอบสถานะการสิ้นสุดเมื่อใช้งบหมด หน้าต่างบริบทขนาดใหญ่ยังต้องมีป้ายแหล่งข้อมูล ขอบเขตงาน และข้อสังเกตที่เกี่ยวข้อง</p><h4>เครื่องมือและงานที่ดำเนินต่อเนื่อง</h4><p>ผู้พัฒนาระบุการเรียกใช้ฟังก์ชันผ่าน Responses ส่วน Chat Completions ไม่รองรับการเรียกใช้ฟังก์ชันสำหรับ Astra เครื่องมือที่รองรับมีการค้นหาเว็บและไฟล์ การสร้างภาพ ตัวแปลและรันโค้ด การดำเนินการ shell และ patch ทักษะ การใช้คอมพิวเตอร์ การเชื่อมต่อ MCP และการค้นหาเครื่องมือ นอกจากนี้ยังระบุ Structured Outputs และการสตรีม เอาต์พุตของ Astra เองยังเป็นข้อความ ขณะที่การดำเนินการของเครื่องมือสร้างข้อสังเกตหรือชิ้นงานของตน</p><p>เวิร์กโฟลว์ GPT-6 ที่ระบุในเอกสารสามารถวิเคราะห์ต่อขณะที่เครื่องมือแบบอะซิงโครนัสทำงาน รับการปรับทิศทางระหว่างเทิร์น รักษาการให้เหตุผลระหว่างการเรียก และย่อบทสนทนายาวได้ แอปพลิเคชันเป็นผู้เรียกใช้เครื่องมือของตนและจัดการผลลัพธ์ที่ยังรออยู่ รักษาความเชื่อมโยงระหว่างการเรียกเดิมกับข้อสังเกต เพื่อให้งานใช้หลักฐานจริง</p><p>ผลลัพธ์สุดท้ายที่เป็นประโยชน์คือชิ้นงานวิเคราะห์หรือโค้ดที่เสร็จแล้ว โดยระบุเหตุผลรองรับและเงื่อนไขที่เหลืออย่างชัดเจน ตรวจสอบข้อความที่พึ่งพาแหล่งข้อมูล และใช้ข้อสังเกตจากการตรวจสอบจริงสำหรับงานที่ดำเนินการแล้ว รักษาโปรไฟล์ Astra ที่ระบุชื่อและช่วงระดับความเข้มข้นที่รองรับ แทนการนำการตั้งค่าให้ตอบโดยตรงหรือขีดจำกัดของโมเดลอื่นมาใช้</p>",
  "aboutText": "GPT-6 Astra เป็นโมเดลของ OpenAI สำหรับงานให้เหตุผลและงานวิชาชีพที่ยากที่สุด ผู้พัฒนาสร้างโมเดลนี้สำหรับวิศวกรรมซอฟต์แวร์ การใช้คอมพิวเตอร์ การวิจัย งานวิทยาศาสตร์ และการสร้างเอกสาร โมเดลรับข้อความและภาพ แล้วสร้างข้อความ เช่น คำอธิบาย โค้ด และชิ้นงานที่มีโครงสร้าง โปรไฟล์ Astra แบบมาตรฐานนี้แยกจากโหมดการให้เหตุผล Pro และโปรไฟล์ Sol กับ Luna\n\n### ทำงานตั้งแต่ต้นจนจบ\n\nเตรียมงานโดยยึดผลลัพธ์ที่ต้องการ แหล่งข้อมูลที่เกี่ยวข้อง และเกณฑ์การเสร็จสิ้น สำหรับวิศวกรรมซอฟต์แวร์ ให้แนบโค้ด ความผิดพลาดที่สังเกตพบ พฤติกรรมที่คาดหวัง และอินเทอร์เฟซที่ต้องรักษาไว้ สำหรับการวิเคราะห์เชิงวิชาชีพ ให้ส่งเอกสาร การตัดสินใจที่ต้องทำ และเงื่อนไขที่ข้อสรุปต้องพิจารณา ตัวอย่างคำสั่งที่ใช้ได้จริงคือ “เปรียบเทียบทางเลือกเหล่านี้กับข้อกำหนด ระบุสิ่งที่ต้องพึ่งพา และจัดทำบันทึกเพื่อการตัดสินใจพร้อมหลักฐานสำหรับข้อค้นพบสำคัญทุกรายการ”\n\nสำหรับงานที่ใช้ภาพ ให้เตรียมแหล่งข้อมูลให้อ่านได้ชัดเจน และระบุว่าภาพแสดงสถานะอินเทอร์เฟซ แผนภูมิ หรือข้อกำหนดการออกแบบ ขอให้ระบุรายละเอียดที่มองเห็นได้ซึ่งรองรับข้อสังเกต ชิ้นงานโค้ดหรือเอกสารควรเชื่อมโยงกับหลักฐานนั้น แทนการสมมติว่ามีการดำเนินการภายนอกแล้ว\n\n### การเขียนพรอมต์และติดตามงาน\n\nแนวทาง Astra ของ OpenAI แนะนำให้กำหนดเป้าหมาย เกณฑ์ความสำเร็จ กฎเรื่องหลักฐาน และเงื่อนไขหยุดให้ชัดเจน แนวทางระบุว่าโมเดลตอบสนองต่อคำสั่งละเอียดในบริบทและไฟล์ที่เข้าถึงได้อย่างมาก จึงควรแก้ความขัดแย้งของแนวทางและระบุลำดับความสำคัญของงานผู้ใช้ กำหนดว่าเมื่อใดโมเดลควรใช้ข้อมูลที่มี ตั้งสมมติฐานอย่างสมเหตุสมผล หรือถามหารายละเอียดที่ขาดไปและอาจเปลี่ยนผลลัพธ์\n\nผู้สร้างยังแนะนำให้ปรับรูปแบบคำตอบและความลึกของการตรวจสอบ สำหรับเอกสาร ให้อธิบายผู้อ่านและโครงสร้างสุดท้าย สำหรับงานวิศวกรรม ให้กำหนดการตรวจสอบที่เกี่ยวข้องกับการเปลี่ยนแปลง วิธีนี้ทำให้โมเดลมีจุดจบงานที่ชัดเจนโดยไม่เพิ่มงานที่ไม่เกี่ยวข้อง\n\n### การให้เหตุผลและบริบท\n\nAstra รองรับระดับความเข้มข้นในการให้เหตุผล low, medium, high, xhigh และ max แต่ไม่รองรับ none ระดับความเข้มข้นแยกจากโหมดการให้เหตุผลมาตรฐานหรือ Pro ของผู้พัฒนา การ์ดโมเดลระบุบริบท 1,050,000 โทเค็น อินพุตสูงสุด 922,000 โทเค็น และเอาต์พุตสูงสุด 128,000 โทเค็น วันที่ตัดความรู้คือ 30 เมษายน 2026\n\nการให้เหตุผลใช้พื้นที่คำตอบ แม้โทเค็นภายในแบบดิบจะไม่ถูกเปิดเผยเป็นคำตอบทั่วไป ควรเผื่อพื้นที่สำหรับชิ้นงานสุดท้าย และตรวจสอบสถานะการสิ้นสุดเมื่อใช้งบหมด หน้าต่างบริบทขนาดใหญ่ยังต้องมีป้ายแหล่งข้อมูล ขอบเขตงาน และข้อสังเกตที่เกี่ยวข้อง\n\n### เครื่องมือและงานที่ดำเนินต่อเนื่อง\n\nผู้พัฒนาระบุการเรียกใช้ฟังก์ชันผ่าน Responses ส่วน Chat Completions ไม่รองรับการเรียกใช้ฟังก์ชันสำหรับ Astra เครื่องมือที่รองรับมีการค้นหาเว็บและไฟล์ การสร้างภาพ ตัวแปลและรันโค้ด การดำเนินการ shell และ patch ทักษะ การใช้คอมพิวเตอร์ การเชื่อมต่อ MCP และการค้นหาเครื่องมือ นอกจากนี้ยังระบุ Structured Outputs และการสตรีม เอาต์พุตของ Astra เองยังเป็นข้อความ ขณะที่การดำเนินการของเครื่องมือสร้างข้อสังเกตหรือชิ้นงานของตน\n\nเวิร์กโฟลว์ GPT-6 ที่ระบุในเอกสารสามารถวิเคราะห์ต่อขณะที่เครื่องมือแบบอะซิงโครนัสทำงาน รับการปรับทิศทางระหว่างเทิร์น รักษาการให้เหตุผลระหว่างการเรียก และย่อบทสนทนายาวได้ แอปพลิเคชันเป็นผู้เรียกใช้เครื่องมือของตนและจัดการผลลัพธ์ที่ยังรออยู่ รักษาความเชื่อมโยงระหว่างการเรียกเดิมกับข้อสังเกต เพื่อให้งานใช้หลักฐานจริง\n\nผลลัพธ์สุดท้ายที่เป็นประโยชน์คือชิ้นงานวิเคราะห์หรือโค้ดที่เสร็จแล้ว โดยระบุเหตุผลรองรับและเงื่อนไขที่เหลืออย่างชัดเจน ตรวจสอบข้อความที่พึ่งพาแหล่งข้อมูล และใช้ข้อสังเกตจากการตรวจสอบจริงสำหรับงานที่ดำเนินการแล้ว รักษาโปรไฟล์ Astra ที่ระบุชื่อและช่วงระดับความเข้มข้นที่รองรับ แทนการนำการตั้งค่าให้ตอบโดยตรงหรือขีดจำกัดของโมเดลอื่นมาใช้",
  "editorialOverlay": {
    "copy_fields": null,
    "copy_sha256": null,
    "copy_source": null,
    "html_sha256": "d00839f5afc4d41e71af5556a4c64165f751c36c802825e41877dbf495c306b2",
    "module_sha256": "ee9dc1c50b1e6a8fb7fa062030fcb4646b9aaaeb08be513b723a5a92a7290f06",
    "raw_model_unchanged": true,
    "schema": "ailoot-native-model-editorial-v1"
  },
  "locale": "th",
  "methods": [
    {
      "html": "<div class=\"sheet-head\"><span class=\"mav\" aria-hidden=\"true\">O</span><h2 id=\"sheet-title\">OpenAI: GPT-6 Astra (batch)</h2><button class=\"icon-btn\" type=\"button\" data-close-sheet aria-label=\"ปิด\">×</button></div><div class=\"idline\"><span>OpenAI /</span><code>openai/gpt-6-astra:batch</code><button type=\"button\" id=\"copy-id\">คัดลอก ID</button></div><nav class=\"card-jump-nav\" aria-label=\"ส่วนต่าง ๆ ของการ์ดโมเดล\"><button type=\"button\" data-card-jump=\"overview\">เริ่มต้น</button><button type=\"button\" data-card-jump=\"methods\">อินพุตและเมธอด</button><button type=\"button\" data-card-jump=\"pricing\">ราคา</button><button type=\"button\" data-card-jump=\"examples\">ตัวอย่าง</button><button type=\"button\" data-card-jump=\"results\">ผลลัพธ์</button><button type=\"button\" data-card-jump=\"aliases\">ชื่ออื่น</button></nav><div class=\"card-method-tabs\" role=\"tablist\" aria-label=\"เมธอด API\"><button type=\"button\" role=\"tab\" tabindex=\"0\" aria-controls=\"card-method-content\" aria-selected=\"true\" id=\"card-method-tab-0\" data-card-method=\"Ultra|batches|/v1/batches|openai%2Fgpt-6-astra%3Abatch\">แบตช์</button></div><div id=\"card-method-content\" role=\"tabpanel\" aria-labelledby=\"card-method-tab-0\"><section class=\"card-section\" data-card-section=\"overview\"><h3 tabindex=\"-1\">เริ่มต้น</h3><p class=\"mdesc-full\">GPT-6 Astra เป็นโมเดลของ OpenAI สำหรับการให้เหตุผลที่ยาก วิศวกรรมซอฟต์แวร์ การวิจัย และงานเอกสารระดับวิชาชีพ โดยผสานความเข้าใจข้อความและภาพเข้ากับการวิเคราะห์บริบทยาวและเวิร์กโฟลว์ที่ใช้เครื่องมือช่วยดำเนินงาน เพื่อสร้างผลลัพธ์ข้อความภายในบริบท 1,050,000 โทเค็น</p><dl class=\"card-io\" data-card-io><div><dt>อินพุตที่รองรับ</dt><dd>ข้อความ</dd></div><div><dt>ผลลัพธ์</dt><dd>ข้อความ</dd></div></dl><details class=\"card-about\"><summary>เกี่ยวกับโมเดล</summary><p class=\"note-s\" data-model-method-boundary>คำอธิบายนี้ครอบคลุมความสามารถของโมเดล อินพุต เอาต์พุต และตัวเลือกที่ใช้ได้ใน Ailoot แสดงด้านล่างตามเมธอดที่เลือก</p><div class=\"mabout\" id=\"m-about\"><p>GPT-6 Astra เป็นโมเดลของ OpenAI สำหรับงานให้เหตุผลและงานวิชาชีพที่ยากที่สุด ผู้พัฒนาสร้างโมเดลนี้สำหรับวิศวกรรมซอฟต์แวร์ การใช้คอมพิวเตอร์ การวิจัย งานวิทยาศาสตร์ และการสร้างเอกสาร โมเดลรับข้อความและภาพ แล้วสร้างข้อความ เช่น คำอธิบาย โค้ด และชิ้นงานที่มีโครงสร้าง โปรไฟล์ Astra แบบมาตรฐานนี้แยกจากโหมดการให้เหตุผล Pro และโปรไฟล์ Sol กับ Luna</p><h4>ทำงานตั้งแต่ต้นจนจบ</h4><p>เตรียมงานโดยยึดผลลัพธ์ที่ต้องการ แหล่งข้อมูลที่เกี่ยวข้อง และเกณฑ์การเสร็จสิ้น สำหรับวิศวกรรมซอฟต์แวร์ ให้แนบโค้ด ความผิดพลาดที่สังเกตพบ พฤติกรรมที่คาดหวัง และอินเทอร์เฟซที่ต้องรักษาไว้ สำหรับการวิเคราะห์เชิงวิชาชีพ ให้ส่งเอกสาร การตัดสินใจที่ต้องทำ และเงื่อนไขที่ข้อสรุปต้องพิจารณา ตัวอย่างคำสั่งที่ใช้ได้จริงคือ “เปรียบเทียบทางเลือกเหล่านี้กับข้อกำหนด ระบุสิ่งที่ต้องพึ่งพา และจัดทำบันทึกเพื่อการตัดสินใจพร้อมหลักฐานสำหรับข้อค้นพบสำคัญทุกรายการ”</p><p>สำหรับงานที่ใช้ภาพ ให้เตรียมแหล่งข้อมูลให้อ่านได้ชัดเจน และระบุว่าภาพแสดงสถานะอินเทอร์เฟซ แผนภูมิ หรือข้อกำหนดการออกแบบ ขอให้ระบุรายละเอียดที่มองเห็นได้ซึ่งรองรับข้อสังเกต ชิ้นงานโค้ดหรือเอกสารควรเชื่อมโยงกับหลักฐานนั้น แทนการสมมติว่ามีการดำเนินการภายนอกแล้ว</p><h4>การเขียนพรอมต์และติดตามงาน</h4><p>แนวทาง Astra ของ OpenAI แนะนำให้กำหนดเป้าหมาย เกณฑ์ความสำเร็จ กฎเรื่องหลักฐาน และเงื่อนไขหยุดให้ชัดเจน แนวทางระบุว่าโมเดลตอบสนองต่อคำสั่งละเอียดในบริบทและไฟล์ที่เข้าถึงได้อย่างมาก จึงควรแก้ความขัดแย้งของแนวทางและระบุลำดับความสำคัญของงานผู้ใช้ กำหนดว่าเมื่อใดโมเดลควรใช้ข้อมูลที่มี ตั้งสมมติฐานอย่างสมเหตุสมผล หรือถามหารายละเอียดที่ขาดไปและอาจเปลี่ยนผลลัพธ์</p><p>ผู้สร้างยังแนะนำให้ปรับรูปแบบคำตอบและความลึกของการตรวจสอบ สำหรับเอกสาร ให้อธิบายผู้อ่านและโครงสร้างสุดท้าย สำหรับงานวิศวกรรม ให้กำหนดการตรวจสอบที่เกี่ยวข้องกับการเปลี่ยนแปลง วิธีนี้ทำให้โมเดลมีจุดจบงานที่ชัดเจนโดยไม่เพิ่มงานที่ไม่เกี่ยวข้อง</p><h4>การให้เหตุผลและบริบท</h4><p>Astra รองรับระดับความเข้มข้นในการให้เหตุผล low, medium, high, xhigh และ max แต่ไม่รองรับ none ระดับความเข้มข้นแยกจากโหมดการให้เหตุผลมาตรฐานหรือ Pro ของผู้พัฒนา การ์ดโมเดลระบุบริบท 1,050,000 โทเค็น อินพุตสูงสุด 922,000 โทเค็น และเอาต์พุตสูงสุด 128,000 โทเค็น วันที่ตัดความรู้คือ 30 เมษายน 2026</p><p>การให้เหตุผลใช้พื้นที่คำตอบ แม้โทเค็นภายในแบบดิบจะไม่ถูกเปิดเผยเป็นคำตอบทั่วไป ควรเผื่อพื้นที่สำหรับชิ้นงานสุดท้าย และตรวจสอบสถานะการสิ้นสุดเมื่อใช้งบหมด หน้าต่างบริบทขนาดใหญ่ยังต้องมีป้ายแหล่งข้อมูล ขอบเขตงาน และข้อสังเกตที่เกี่ยวข้อง</p><h4>เครื่องมือและงานที่ดำเนินต่อเนื่อง</h4><p>ผู้พัฒนาระบุการเรียกใช้ฟังก์ชันผ่าน Responses ส่วน Chat Completions ไม่รองรับการเรียกใช้ฟังก์ชันสำหรับ Astra เครื่องมือที่รองรับมีการค้นหาเว็บและไฟล์ การสร้างภาพ ตัวแปลและรันโค้ด การดำเนินการ shell และ patch ทักษะ การใช้คอมพิวเตอร์ การเชื่อมต่อ MCP และการค้นหาเครื่องมือ นอกจากนี้ยังระบุ Structured Outputs และการสตรีม เอาต์พุตของ Astra เองยังเป็นข้อความ ขณะที่การดำเนินการของเครื่องมือสร้างข้อสังเกตหรือชิ้นงานของตน</p><p>เวิร์กโฟลว์ GPT-6 ที่ระบุในเอกสารสามารถวิเคราะห์ต่อขณะที่เครื่องมือแบบอะซิงโครนัสทำงาน รับการปรับทิศทางระหว่างเทิร์น รักษาการให้เหตุผลระหว่างการเรียก และย่อบทสนทนายาวได้ แอปพลิเคชันเป็นผู้เรียกใช้เครื่องมือของตนและจัดการผลลัพธ์ที่ยังรออยู่ รักษาความเชื่อมโยงระหว่างการเรียกเดิมกับข้อสังเกต เพื่อให้งานใช้หลักฐานจริง</p><p>ผลลัพธ์สุดท้ายที่เป็นประโยชน์คือชิ้นงานวิเคราะห์หรือโค้ดที่เสร็จแล้ว โดยระบุเหตุผลรองรับและเงื่อนไขที่เหลืออย่างชัดเจน ตรวจสอบข้อความที่พึ่งพาแหล่งข้อมูล และใช้ข้อสังเกตจากการตรวจสอบจริงสำหรับงานที่ดำเนินการแล้ว รักษาโปรไฟล์ Astra ที่ระบุชื่อและช่วงระดับความเข้มข้นที่รองรับ แทนการนำการตั้งค่าให้ตอบโดยตรงหรือขีดจำกัดของโมเดลอื่นมาใช้</p></div></details></section><section class=\"card-section\" data-card-section=\"methods\"><h3 tabindex=\"-1\">ใช้งานได้ใน Ailoot · อินพุตและเมธอด</h3><details class=\"card-method\" open><summary><b>Ailoot Ultra · การประมวลผลแบบชุด</b> <code>POST /v1/batches</code></summary><dl class=\"method-capabilities\"><div><dt>ขาเข้า</dt><dd><code>text</code></dd></div><div><dt>ขาออก</dt><dd><code>text</code></dd></div><div><dt>รูปแบบเอาต์พุต</dt><dd>JSON ของ results[].response.body ที่ส่งกลับโดยตรง</dd></div></dl><div class=\"tw\" data-card-parameters data-typed-parameters><table><thead><tr><th>ฟิลด์</th><th>ประเภท</th><th>ข้อกำหนด</th><th>ค่าและข้อจำกัด</th><th>ค่าเริ่มต้น</th></tr></thead><tbody><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">endpoint</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>string</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>จำเป็น</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span><div>/v1/chat/completions</div></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">model</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>string</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>จำเป็น</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span><div>openai/gpt-6-astra:batch</div></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">requests</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>batch_item[]</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>จำเป็น</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span><div>จำนวนรายการขั้นต่ำ: 1</div></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">requests[].custom_id</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>string</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>จำเป็น</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">requests[].body.messages</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>message[]</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>จำเป็น</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">completion_window</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>string</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>ไม่บังคับ</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span><div>24h</div></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">provider</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>object|null</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>ไม่บังคับ</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">requests[].body.model</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>string</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>ไม่บังคับ</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span><div>openai/gpt-6-astra:batch, openai/gpt-6-astra</div></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">provider.only</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>string[]</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>ไม่บังคับ</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span><div>openai</div></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr><tr data-parameter-availability=\"source_interface\"><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">provider.allow_fallbacks</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span><code>boolean|null</code></td><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>ไม่บังคับ</td><td data-cell-label=\"ค่าและข้อจำกัด\"><span class=\"card-cell-label\">ค่าและข้อจำกัด</span><div>false, null</div></td><td data-cell-label=\"ค่าเริ่มต้น\" data-default=\"unspecified\"><span class=\"card-cell-label\">ค่าเริ่มต้น</span>—</td></tr></tbody></table></div><details class=\"note-s\" data-method-contract><summary>พารามิเตอร์และวงจรการทำงานของเมธอด</summary><div class=\"tw\" data-card-table=\"contract\"><table><thead><tr><th>พารามิเตอร์</th><th>ข้อกำหนด</th></tr></thead><tbody><tr><th data-cell-label=\"พารามิเตอร์\" scope=\"row\"><span class=\"card-cell-label\">พารามิเตอร์</span><code>content_type</code></th><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>application/json</td></tr><tr><th data-cell-label=\"พารามิเตอร์\" scope=\"row\"><span class=\"card-cell-label\">พารามิเตอร์</span><code>required</code></th><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>endpoint, model, requests</td></tr><tr><th data-cell-label=\"พารามิเตอร์\" scope=\"row\"><span class=\"card-cell-label\">พารามิเตอร์</span><code>material_types</code></th><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>text</td></tr><tr><th data-cell-label=\"พารามิเตอร์\" scope=\"row\"><span class=\"card-cell-label\">พารามิเตอร์</span><code>representation</code></th><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>ส่ง requests[] ไว้ในคำขอโดยตรง โดยแต่ละรายการมี custom_id และ body</td></tr><tr><th data-cell-label=\"พารามิเตอร์\" scope=\"row\"><span class=\"card-cell-label\">พารามิเตอร์</span><code>request_endpoint_profile</code></th><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>/v1/chat/completions</td></tr><tr><th data-cell-label=\"พารามิเตอร์\" scope=\"row\"><span class=\"card-cell-label\">พารามิเตอร์</span><code>file_material</code></th><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>ผู้เรียกใช้อาจอ่านไฟล์ JSONL ที่เข้ารหัส UTF-8 จากเครื่องของตนลงใน requests[] ได้ ไม่มีการใช้ค่าระบุวัตถุประสงค์การอัปโหลด input_file_id หรือการอ้างอิงไฟล์ หากไม่มีข้อมูลของลูกค้าหรือข้อมูลว่าง ให้หยุดการเตรียมก่อนส่ง POST</td></tr><tr><th data-cell-label=\"พารามิเตอร์\" scope=\"row\"><span class=\"card-cell-label\">พารามิเตอร์</span><code>serialization_order</code></th><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>endpoint, model, provider (หากระบุมา), completion_window (หากระบุมา), requests อยู่ท้ายสุด</td></tr><tr><th data-cell-label=\"พารามิเตอร์\" scope=\"row\"><span class=\"card-cell-label\">พารามิเตอร์</span><code>optional_controls</code></th><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>provider.only, provider.allow_fallbacks, completion_window</td></tr><tr><th data-cell-label=\"พารามิเตอร์\" scope=\"row\"><span class=\"card-cell-label\">พารามิเตอร์</span><code>schema_scope</code></th><td data-cell-label=\"ข้อกำหนด\"><span class=\"card-cell-label\">ข้อกำหนด</span>เนื้อหาคำขอ Chat Completions แบบข้อความ ภายในโครงสร้างคำขอแบบชุดที่ส่งโดยตรงตามที่ระบุในเอกสาร</td></tr></tbody></table></div><p>วงจรการทำงาน: <code>asynchronous</code></p><p class=\"note-s\"><code>GET /v1/batches/{operation_id}</code> · ค่า response.id จริงจากการตอบกลับคำขอสร้างครั้งเดิม โดยใช้ผู้ใช้/คีย์/กลุ่มเดิม</p></details></details></section><section class=\"card-section\" data-card-section=\"pricing\"><h3 tabindex=\"-1\">ราคา</h3><div data-native-semantic-method=\"v1\" data-tariff-reference-only><p class=\"note-s\" data-rate-support-note>ข้อมูลอัตราราคาไม่ได้เพิ่มตัวเลือกคำขอ พารามิเตอร์ที่รองรับระบุไว้สำหรับเมธอดที่เลือก</p><dl data-price-conditions><dt>โหมดรวดเร็ว</dt><dd>ไม่ได้ระบุ <span class=\"note-s\">เมื่อเลือกโหมดรวดเร็ว</span></dd><dt>โหมดยืดหยุ่น</dt><dd>ไม่ได้ระบุ <span class=\"note-s\">เมื่อเลือกโหมด flex</span></dd><dt>ระดับการใช้เหตุผลสูงสุด</dt><dd>ไม่ได้ระบุ <span class=\"note-s\">เมื่อใช้การปรับตามค่าเริ่มต้น (default) สำหรับระดับการใช้เหตุผลสูงสุด</span></dd><dt>การคิดราคาแคชแบบระบุชัด</dt><dd>ไม่ได้เปิดใช้ <span class=\"note-s\">เมื่อร้องขอแคชแบบระบุชัด</span></dd></dl></div><div data-declared-tariff-pricing><h4>อัตราค่าบริการ Ailoot</h4><h4>ราคาตามการตั้งค่า</h4><p class=\"note-s\">เทียบค่าบริการแต่ละรายการกับเงื่อนไขที่แสดง เลือกใช้อัตราเดียวสำหรับแต่ละชุดการตั้งค่าที่เป็นตัวเลือกทดแทนกัน</p><div class=\"tw\" data-pricing-profiles><table><thead><tr><th>การตั้งค่า</th><th>ตารางอัตราค่าบริการ</th><th>โทเค็นบริบท มากกว่า</th><th>โทเค็นบริบท ไม่เกินและรวมค่า</th><th>ค่าบริการ</th></tr></thead><tbody><tr><th data-cell-label=\"การตั้งค่า\" scope=\"row\"><span class=\"card-cell-label\">การตั้งค่า</span>อัตราราคาพื้นฐานของโทเคน</th><td data-cell-label=\"ตารางอัตราค่าบริการ\"><span class=\"card-cell-label\">ตารางอัตราค่าบริการ</span>อัตราพื้นฐาน</td><td data-cell-label=\"โทเค็นบริบท มากกว่า\"><span class=\"card-cell-label\">โทเค็นบริบท มากกว่า</span>—</td><td data-cell-label=\"โทเค็นบริบท ไม่เกินและรวมค่า\"><span class=\"card-cell-label\">โทเค็นบริบท ไม่เกินและรวมค่า</span>ไม่มีขีดจำกัดสูงสุด</td><td data-cell-label=\"ค่าบริการ\"><span class=\"card-cell-label\">ค่าบริการ</span><div><span>ขาเข้า · โทเค็นอินพุต</span> <b>$0.01</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาออก · โทเค็นเอาต์พุต</span> <b>$0.05</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาเข้า · การอ่านแคช</span> <b>$0.001</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาเข้า · การเขียนแคช</span> <b>$0.0125</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาเข้า · การเขียนแคช, 1 ชั่วโมง</span> <b>—</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div></td></tr><tr><th data-cell-label=\"การตั้งค่า\" scope=\"row\"><span class=\"card-cell-label\">การตั้งค่า</span>ระดับความยาวคำขอ 1</th><td data-cell-label=\"ตารางอัตราค่าบริการ\"><span class=\"card-cell-label\">ตารางอัตราค่าบริการ</span>—</td><td data-cell-label=\"โทเค็นบริบท มากกว่า\"><span class=\"card-cell-label\">โทเค็นบริบท มากกว่า</span>0</td><td data-cell-label=\"โทเค็นบริบท ไม่เกินและรวมค่า\"><span class=\"card-cell-label\">โทเค็นบริบท ไม่เกินและรวมค่า</span>272,000</td><td data-cell-label=\"ค่าบริการ\"><span class=\"card-cell-label\">ค่าบริการ</span><div><span>ขาเข้า · โทเค็นอินพุต</span> <b>$0.01</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาออก · โทเค็นเอาต์พุต</span> <b>$0.05</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาเข้า · การอ่านแคช</span> <b>$0.001</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาเข้า · การเขียนแคช</span> <b>$0.0125</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาเข้า · การเขียนแคช, 1 ชั่วโมง</span> <b>—</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div></td></tr><tr><th data-cell-label=\"การตั้งค่า\" scope=\"row\"><span class=\"card-cell-label\">การตั้งค่า</span>ระดับความยาวคำขอ 2</th><td data-cell-label=\"ตารางอัตราค่าบริการ\"><span class=\"card-cell-label\">ตารางอัตราค่าบริการ</span>—</td><td data-cell-label=\"โทเค็นบริบท มากกว่า\"><span class=\"card-cell-label\">โทเค็นบริบท มากกว่า</span>272,000</td><td data-cell-label=\"โทเค็นบริบท ไม่เกินและรวมค่า\"><span class=\"card-cell-label\">โทเค็นบริบท ไม่เกินและรวมค่า</span>ไม่มีขีดจำกัดสูงสุด</td><td data-cell-label=\"ค่าบริการ\"><span class=\"card-cell-label\">ค่าบริการ</span><div><span>ขาเข้า · โทเค็นอินพุต</span> <b>$0.02</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาออก · โทเค็นเอาต์พุต</span> <b>$0.075</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาเข้า · การอ่านแคช</span> <b>$0.002</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาเข้า · การเขียนแคช</span> <b>$0.025</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div><div><span>ขาเข้า · การเขียนแคช, 1 ชั่วโมง</span> <b>—</b> <span class=\"price-unit\">/ 1K โทเค็น</span></div></td></tr></tbody></table></div></div><p class=\"note-s\">Ailoot กันยอดเงินประมาณการไว้ก่อนส่งคำขอ หลังได้ผลลัพธ์ จะคิดค่าบริการสุดท้ายตามการใช้งานที่วัดได้ การคิดค่าบริการแบบสตรีมใช้บันทึกการใช้งานสุดท้าย <a href=\"/docs/th/billing/reserve/\">วิธีกันยอดเงินและคิดค่าบริการสุดท้าย →</a></p></section><section class=\"card-section\" data-card-section=\"examples\"><h3 tabindex=\"-1\">ตัวอย่างคำขอ</h3><h4>Ailoot Ultra · การประมวลผลแบบชุด</h4><div class=\"code-group\"><div class=\"cg-bar\"><div class=\"cg-tabs\" role=\"tablist\" aria-label=\"ตัวเลือกโค้ด\"><button class=\"cg-tab\" id=\"model-code-2115-tab-0\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2115-panel-0\" aria-selected=\"true\" tabindex=\"0\">curl · ข้อมูลทดสอบที่เก็บไว้</button><button class=\"cg-tab\" id=\"model-code-2115-tab-1\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2115-panel-1\" aria-selected=\"false\" tabindex=\"-1\">Python HTTP · JSONL จริงของลูกค้า</button><button class=\"cg-tab\" id=\"model-code-2115-tab-2\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2115-panel-2\" aria-selected=\"false\" tabindex=\"-1\">Python · บันทึกผลลัพธ์ที่เสร็จสมบูรณ์ทุกรายการ</button></div><div class=\"cg-tools\"><button class=\"cg-btn cg-copy\" type=\"button\" aria-label=\"คัดลอกโค้ด\"><svg class=\"cp\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><rect x=\"5.25\" y=\"5.25\" width=\"8.5\" height=\"8.5\" rx=\"1.75\"/><path d=\"M10.75 5.25V3.5a1.25 1.25 0 0 0-1.25-1.25H3.5A1.25 1.25 0 0 0 2.25 3.5v6a1.25 1.25 0 0 0 1.25 1.25h1.75\"/></svg><svg class=\"ok\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><path d=\"m3 8.5 3.25 3.25L13 5\"/></svg></button></div></div><div class=\"cg-body\"><div class=\"cg-pane\" id=\"model-code-2115-panel-0\" role=\"tabpanel\" aria-labelledby=\"model-code-2115-tab-0\"><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\npython3 - &lt;&lt;&#39;PY_REQUEST&#39;\nimport json\nfrom pathlib import Path\nbody=json.loads(&#39;{&quot;endpoint&quot;:&quot;/v1/chat/completions&quot;,&quot;model&quot;:&quot;openai/gpt-6-astra:batch&quot;,&quot;requests&quot;:[{&quot;custom_id&quot;:&quot;req-0001&quot;,&quot;body&quot;:{&quot;messages&quot;:[{&quot;role&quot;:&quot;user&quot;,&quot;content&quot;:&quot;Hello!&quot;}],&quot;max_tokens&quot;:16}}]}&#39;)\nPath(&quot;batch-request.json&quot;).write_text(json.dumps(body,ensure_ascii=False),encoding=&quot;utf-8&quot;)\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/batches \\\n  -H &quot;Authorization: Bearer $AILOOT_API_KEY&quot; -H &#39;Content-Type: application/json&#39; \\\n  --data-binary @batch-request.json -D batch-response-headers.txt -o batch-create-response.json\n</code></pre></div><div class=\"cg-pane\" id=\"model-code-2115-panel-1\" role=\"tabpanel\" aria-labelledby=\"model-code-2115-tab-1\" hidden><pre data-lang=\"python\"><code>import json, os\nfrom pathlib import Path\nfrom urllib.request import Request, urlopen\n\ndef prepare_requests(customer_path):\n    path = Path(customer_path)\n    if not path.is_file(): raise ValueError(&quot;Customer JSONL file is missing&quot;)\n    items = [json.loads(line) for line in path.read_text(encoding=&quot;utf-8&quot;).splitlines() if line.strip()]\n    if not items: raise ValueError(&quot;Customer JSONL contains no requests&quot;)\n    ids = set()\n    for item in items:\n        if set(item) != {&quot;custom_id&quot;, &quot;body&quot;}: raise ValueError(&quot;Each item needs custom_id and body&quot;)\n        cid = item[&quot;custom_id&quot;]\n        if not isinstance(cid, str) or not cid.strip() or cid in ids: raise ValueError(&quot;custom_id must be nonempty and unique&quot;)\n        ids.add(cid)\n        if not isinstance(item[&quot;body&quot;], dict) or not item[&quot;body&quot;].get(&quot;messages&quot;): raise ValueError(&quot;Supply actual text messages&quot;)\n        supplied_model = item[&quot;body&quot;].get(&quot;model&quot;)\n        if supplied_model is not None and supplied_model not in [&#39;openai/gpt-6-astra:batch&#39;, &#39;openai/gpt-6-astra&#39;]: raise ValueError(&quot;body.model must be an exact documented caller or wire ID&quot;)\n    return {&quot;endpoint&quot;:&quot;/v1/chat/completions&quot;, &quot;model&quot;:&quot;openai/gpt-6-astra:batch&quot;, &quot;requests&quot;:items}\n\nif __name__ == &quot;__main__&quot;:\n    material = os.environ.get(&quot;AILOOT_BATCH_REQUESTS_JSONL&quot;, &quot;&quot;)\n    if not material: raise SystemExit(&quot;Set AILOOT_BATCH_REQUESTS_JSONL to your actual customer file&quot;)\n    body = prepare_requests(material)\n    key = os.environ.get(&quot;AILOOT_API_KEY&quot;, &quot;&quot;)\n    if not key: raise SystemExit(&quot;Set AILOOT_API_KEY&quot;)\n    request = Request(&quot;https://api.ailoot.ai/v1/batches&quot;, data=json.dumps(body, ensure_ascii=False).encode(&quot;utf-8&quot;), headers={&quot;Authorization&quot;:&quot;Bearer &quot; + key, &quot;Content-Type&quot;:&quot;application/json&quot;}, method=&quot;POST&quot;)\n    with urlopen(request) as response:\n        raw = response.read()\n        Path(&quot;batch-create-response.json&quot;).write_bytes(raw)\n        print(raw.decode(&quot;utf-8&quot;))\n</code></pre></div><div class=\"cg-pane\" id=\"model-code-2115-panel-2\" role=\"tabpanel\" aria-labelledby=\"model-code-2115-tab-2\" hidden><pre data-lang=\"python\"><code>import json\nfrom pathlib import Path\nraw = Path(&quot;batch-status-response.json&quot;).read_bytes()\nresponse = json.loads(raw)\nif response.get(&quot;status&quot;) != &quot;completed&quot;:\n    raise SystemExit(&quot;Keep the original operation; read its status without resubmitting&quot;)\nresults = response.get(&quot;results&quot;)\nif not isinstance(results, list) or not results:\n    raise SystemExit(&quot;Preserve the original response; completed results are missing&quot;)\nPath(&quot;batch-results.jsonl&quot;).write_text(&quot;&quot;.join(json.dumps(item, ensure_ascii=False) + &quot;\\n&quot; for item in results), encoding=&quot;utf-8&quot;)\n# Preserve batch-status-response.json with aggregate usage and every result/error.\n</code></pre></div></div></div></section><section class=\"card-section\" data-card-section=\"results\"><h3 tabindex=\"-1\">รับและบันทึกผลลัพธ์</h3><h4>Ailoot Ultra · การประมวลผลแบบชุด</h4><p class=\"note-s\">JSON ของ results[].response.body ที่ส่งกลับโดยตรง</p><ul class=\"card-result-paths\"><li><code>GET /v1/batches/{operation_id}</code></li></ul><h5>ตรวจสอบสถานะงาน</h5><div class=\"code-group\"><div class=\"cg-bar\"><div class=\"cg-tabs\" role=\"tablist\" aria-label=\"ตัวเลือกโค้ด\"><button class=\"cg-tab\" id=\"model-code-2116-tab-0\" role=\"tab\" type=\"button\" aria-controls=\"model-code-2116-panel-0\" aria-selected=\"true\" tabindex=\"0\">curl · สถานะของการดำเนินการเดิม</button></div><div class=\"cg-tools\"><button class=\"cg-btn cg-copy\" type=\"button\" aria-label=\"คัดลอกโค้ด\"><svg class=\"cp\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><rect x=\"5.25\" y=\"5.25\" width=\"8.5\" height=\"8.5\" rx=\"1.75\"/><path d=\"M10.75 5.25V3.5a1.25 1.25 0 0 0-1.25-1.25H3.5A1.25 1.25 0 0 0 2.25 3.5v6a1.25 1.25 0 0 0 1.25 1.25h1.75\"/></svg><svg class=\"ok\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\"><path d=\"m3 8.5 3.25 3.25L13 5\"/></svg></button></div></div><div class=\"cg-body\"><div class=\"cg-pane\" id=\"model-code-2116-panel-0\" role=\"tabpanel\" aria-labelledby=\"model-code-2116-tab-0\"><pre data-lang=\"bash\"><code>set -eu\n: &quot;${AILOOT_API_KEY:?Set your Ailoot API key}&quot;\nBATCH_OPERATION_ID=&quot;$(python3 - &lt;&lt;&#39;PY_ID&#39;\nimport json\nfrom pathlib import Path\nfrom urllib.parse import quote\nresponse = json.loads(Path(&quot;batch-create-response.json&quot;).read_text(encoding=&quot;utf-8&quot;))\noperation = response.get(&quot;id&quot;)\nif not isinstance(operation, str) or not operation: raise SystemExit(&quot;No actual original operation ID; preserve the response and do not resubmit&quot;)\nprint(quote(operation, safe=&quot;&quot;))\nPY_ID\n)&quot;\ncurl --fail-with-body --silent --show-error &quot;https://api.ailoot.ai/v1/batches/$BATCH_OPERATION_ID&quot; \\\n  -H &quot;Authorization: Bearer $AILOOT_API_KEY&quot; -o batch-status-response.json\n</code></pre></div></div></div><div class=\"card-result-process\" data-all-results><h5>เก็บผลลัพธ์ที่เสร็จสมบูรณ์ทั้งหมด</h5><p class=\"note-s\">เก็บทุกการตอบกลับ ไฟล์ และส่วนเนื้อหาที่ส่งกลับมาอย่างครบถ้วน</p><p class=\"note-s\">เก็บ JSON สถานะเดิมให้ครบถ้วน รวมถึงผลลัพธ์/custom_id ทุกรายการ และเนื้อหาการตอบกลับหรือข้อผิดพลาดทั้งหมด บันทึก results[] ที่เสร็จสมบูรณ์เป็น JSONL โดยไม่กรองข้อมูล</p></div><div class=\"card-result-process\" data-unknown-recovery><h5>เมื่อต้องตรวจสอบการตอบกลับต้นฉบับ</h5><p class=\"note-s\">เก็บ ID การดำเนินการเดิมไว้ การตอบกลับ 503 result_pending_check มี X-Should-Retry:false ห้ามส่งงานแบบชุดเดิมซ้ำเด็ดขาดเมื่อยังไม่ทราบสถานะของงาน</p></div><details class=\"card-about\" data-output-fields><summary>ฟิลด์การตอบกลับ</summary><div class=\"tw\" data-card-table=\"output\"><table><thead><tr><th>ฟิลด์</th><th>ประเภท</th></tr></thead><tbody><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">results[].custom_id</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>string</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">results[].response.body.choices[].message.content</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>string|null</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">results[].error</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>object|null</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">usage</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>object|null</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">id</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>string</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">model</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>string</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">endpoint</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>string</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">status</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>string</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">request_counts</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>object</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">results[].id</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>string</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">results[].response.status_code</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>integer</td></tr><tr><th data-cell-label=\"ฟิลด์\" scope=\"row\"><span class=\"card-cell-label\">ฟิลด์</span><code class=\"card-field-name\">results[].response.request_id</code></th><td data-cell-label=\"ประเภท\" data-field-type><span class=\"card-cell-label\">ประเภท</span>string</td></tr></tbody></table></div></details><details class=\"card-about\" data-method-errors><summary>ข้อผิดพลาดและขั้นตอนถัดไป</summary><div class=\"tw\" data-card-table=\"errors\"><table><thead><tr><th>การตอบกลับ</th><th>เงื่อนไข</th><th>ขั้นตอนถัดไป</th></tr></thead><tbody><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>400 · <code>invalid_request_error</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>โครงสร้างคำขอแบบส่งโดยตรงตามเอกสารไม่ถูกต้อง มีคีย์ซ้ำ หรือมีข้อขัดแย้งเกี่ยวกับตัวตนของรายการหรือความสามารถของโมเดลที่กำหนดไว้</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>แก้ไขฟิลด์ที่ระบุให้ถูกต้องก่อนส่งคำขอใหม่ทุกครั้ง</td></tr><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>401 · <code>authentication_error</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>คีย์ API ไม่ถูกต้อง</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>ใช้คีย์ Ailoot ที่ได้รับอนุญาต</td></tr><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>403 · <code>permission_error</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>กลุ่มสำหรับการประมวลผลแบบชุดไม่พร้อมใช้งาน</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>ตรวจสอบสิทธิ์ของคีย์/กลุ่ม</td></tr><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>422 · <code>invalid_request_error</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>การประมวลผลแบบชุดเรียกเก็บเงินจากยอดเงินคงเหลือ คำขอสร้างที่ใช้การเรียกเก็บผ่านการสมัครสมาชิกจะถูกปฏิเสธ</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>ใช้กลุ่มที่ได้รับอนุญาตให้เรียกเก็บเงินจากยอดเงินคงเหลือ</td></tr><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>422 · <code>price_unavailable</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>ไม่สามารถคำนวณราคาล่วงหน้าสำหรับข้อมูลนำเข้าของงานแบบชุดได้</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>เก็บการตอบกลับไว้ และใช้ข้อมูลนำเข้าตามเอกสารของ API ประเภทนั้น</td></tr><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>402 · <code>billing_error</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>ไม่สามารถกันยอดเงินสำรองสำหรับการประมวลผลแบบชุดได้</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>แก้ไขเงื่อนไขการรับคำขอให้เรียบร้อยก่อนส่งคำขอใหม่</td></tr><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>503 · <code>price_unavailable</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>ราคาของวิธีประมวลผลแบบชุด/อัตราราคาของระบบไม่พร้อมใช้งาน</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>เก็บการตอบกลับไว้ ห้ามแทนที่ด้วยราคาอื่น</td></tr><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>503 · <code>api_error</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>เส้นทางที่ระบุไว้ของผู้ให้บริการต้นทางไม่พร้อมใช้งาน</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>เก็บการตอบกลับไว้เพื่อแก้ไขเส้นทางการส่งคำขอ</td></tr><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>503 · <code>result_pending_check</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>ผลลัพธ์เดิมต้องได้รับการตรวจสอบ โดยมี X-Should-Retry:false</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>เก็บค่า operation_id/id เดิมไว้แล้วอ่านสถานะของการดำเนินการนั้น ห้ามส่ง POST เดิมซ้ำเด็ดขาด</td></tr><tr><th data-cell-label=\"การตอบกลับ\" scope=\"row\"><span class=\"card-cell-label\">การตอบกลับ</span>404 · <code>not_found</code></th><td data-cell-label=\"เงื่อนไข\"><span class=\"card-cell-label\">เงื่อนไข</span>ไม่พบการดำเนินการตรวจสอบสถานะงานแบบชุด หรือการดำเนินการนั้นเป็นของตัวตนอื่น</td><td data-cell-label=\"ขั้นตอนถัดไป\"><span class=\"card-cell-label\">ขั้นตอนถัดไป</span>ใช้ค่า id เดิมให้ตรงทุกตัว พร้อมผู้ใช้/คีย์/กลุ่มเดิม</td></tr></tbody></table></div></details></section><section class=\"card-section\" data-card-section=\"aliases\"><h3 tabindex=\"-1\">ชื่ออื่น</h3><h4>ชื่ออื่นของโมเดล</h4><p class=\"note-s\"><span data-model-alias-route=\"Ultra\"><b>Ailoot Ultra</b> <a href=\"#m=openai%2Fgpt-6-astra%3Abatch&amp;route=Ultra&amp;caller=openai%2Fgpt-6-astra%3Abatch&amp;fmt=batches\"><code>openai/gpt-6-astra:batch</code></a></span></p><h4>ชื่อพาธเมธอดอื่น</h4><p class=\"note-s\">ใช้พาธเมธอดที่แสดงด้านบน</p><h4>ID ที่เกี่ยวข้องสำหรับเรียกใช้โมเดล</h4><p class=\"note-s\"><a href=\"#m=openai%2Fgpt-6-astra%3Abatch&amp;route=Ultra&amp;caller=openai%2Fgpt-6-astra%3Abatch&amp;fmt=batches\"><code>openai/gpt-6-astra:batch</code></a></p></section></div>",
      "method_identity": {
        "effective_request_model_id": "openai/gpt-6-astra:batch",
        "fmt": "batches",
        "http": "POST",
        "path": "/v1/batches",
        "request_model_id": "openai/gpt-6-astra:batch",
        "route_label": "Ultra"
      },
      "method_key": "Ultra|batches|/v1/batches|openai%2Fgpt-6-astra%3Abatch",
      "ordinal": 0,
      "rawMethod": {
        "available": null,
        "cache_read": 1,
        "cache_write": 12.5,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "all_results": "Preserve full JSON and every result; provider real IDs are only read from actual returned responses.",
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "header": "Authorization: Bearer"
            },
            "errors": [
              {
                "code": null,
                "condition": "โครงสร้างคำขอแบบส่งโดยตรงตามเอกสารไม่ถูกต้อง มีคีย์ซ้ำ หรือมีข้อขัดแย้งเกี่ยวกับตัวตนของรายการหรือความสามารถของโมเดลที่กำหนดไว้",
                "http_status": 400,
                "recovery": "แก้ไขฟิลด์ที่ระบุให้ถูกต้องก่อนส่งคำขอใหม่ทุกครั้ง",
                "type": "invalid_request_error"
              },
              {
                "code": null,
                "condition": "คีย์ API ไม่ถูกต้อง",
                "http_status": 401,
                "recovery": "ใช้คีย์ Ailoot ที่ได้รับอนุญาต",
                "type": "authentication_error"
              },
              {
                "code": null,
                "condition": "กลุ่มสำหรับการประมวลผลแบบชุดไม่พร้อมใช้งาน",
                "http_status": 403,
                "recovery": "ตรวจสอบสิทธิ์ของคีย์/กลุ่ม",
                "type": "permission_error"
              },
              {
                "code": null,
                "condition": "การประมวลผลแบบชุดเรียกเก็บเงินจากยอดเงินคงเหลือ คำขอสร้างที่ใช้การเรียกเก็บผ่านการสมัครสมาชิกจะถูกปฏิเสธ",
                "http_status": 422,
                "recovery": "ใช้กลุ่มที่ได้รับอนุญาตให้เรียกเก็บเงินจากยอดเงินคงเหลือ",
                "type": "invalid_request_error"
              },
              {
                "code": null,
                "condition": "ไม่สามารถคำนวณราคาล่วงหน้าสำหรับข้อมูลนำเข้าของงานแบบชุดได้",
                "http_status": 422,
                "recovery": "เก็บการตอบกลับไว้ และใช้ข้อมูลนำเข้าตามเอกสารของ API ประเภทนั้น",
                "type": "price_unavailable"
              },
              {
                "code": null,
                "condition": "ไม่สามารถกันยอดเงินสำรองสำหรับการประมวลผลแบบชุดได้",
                "http_status": 402,
                "recovery": "แก้ไขเงื่อนไขการรับคำขอให้เรียบร้อยก่อนส่งคำขอใหม่",
                "type": "billing_error"
              },
              {
                "code": null,
                "condition": "ราคาของวิธีประมวลผลแบบชุด/อัตราราคาของระบบไม่พร้อมใช้งาน",
                "http_status": 503,
                "recovery": "เก็บการตอบกลับไว้ ห้ามแทนที่ด้วยราคาอื่น",
                "type": "price_unavailable"
              },
              {
                "code": null,
                "condition": "เส้นทางที่ระบุไว้ของผู้ให้บริการต้นทางไม่พร้อมใช้งาน",
                "http_status": 503,
                "recovery": "เก็บการตอบกลับไว้เพื่อแก้ไขเส้นทางการส่งคำขอ",
                "type": "api_error"
              },
              {
                "code": "result_pending_check",
                "condition": "ผลลัพธ์เดิมต้องได้รับการตรวจสอบ โดยมี X-Should-Retry:false",
                "http_status": 503,
                "recovery": "เก็บค่า operation_id/id เดิมไว้แล้วอ่านสถานะของการดำเนินการนั้น ห้ามส่ง POST เดิมซ้ำเด็ดขาด",
                "type": null
              },
              {
                "code": "not_found",
                "condition": "ไม่พบการดำเนินการตรวจสอบสถานะงานแบบชุด หรือการดำเนินการนั้นเป็นของตัวตนอื่น",
                "http_status": 404,
                "recovery": "ใช้ค่า id เดิมให้ตรงทุกตัว พร้อมผู้ใช้/คีย์/กลุ่มเดิม",
                "type": null
              }
            ],
            "example_body": {
              "endpoint": "/v1/chat/completions",
              "model": "openai/gpt-6-astra:batch",
              "requests": [
                {
                  "body": {
                    "max_tokens": 16,
                    "messages": [
                      {
                        "content": "Hello!",
                        "role": "user"
                      }
                    ]
                  },
                  "custom_id": "req-0001"
                }
              ]
            },
            "input_constraints": [
              "Use the exact shown :batch model ID.",
              "Each custom_id must be nonempty and unique within the batch.",
              "Keep requests last in the serialized body; duplicate JSON keys are rejected.",
              "Each body.model is omitted or equals the exact batch caller or its documented base ID.",
              "Per-item provider, service_tier and input_type are outside this batch profile.",
              "stream is omitted or false.",
              "Supply text messages for this Chat batch profile; image/audio/file/video objects, hosted tools and cache-control fields are outside this profile.",
              "If body.model is present, use only the exact caller or wire ID listed here; no suffix conversion is needed.",
              "For google/ wire IDs, all items use an identical response_format."
            ],
            "outputs": {
              "all_results": "เก็บ JSON สถานะเดิมให้ครบถ้วน รวมถึงผลลัพธ์/custom_id ทุกรายการ และเนื้อหาการตอบกลับหรือข้อผิดพลาดทั้งหมด บันทึก results[] ที่เสร็จสมบูรณ์เป็น JSONL โดยไม่กรองข้อมูล",
              "enclosing_family": "batch",
              "family": "text",
              "fields": [
                {
                  "name": "results[].custom_id",
                  "type": "string"
                },
                {
                  "name": "results[].response.body.choices[].message.content",
                  "type": "string|null"
                },
                {
                  "name": "results[].error",
                  "type": "object|null"
                },
                {
                  "name": "usage",
                  "type": "object|null"
                },
                {
                  "description": null,
                  "name": "id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "model",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "endpoint",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "status",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "request_counts",
                  "type": "object"
                },
                {
                  "description": null,
                  "name": "results[].id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "results[].response.status_code",
                  "type": "integer"
                },
                {
                  "description": null,
                  "name": "results[].response.request_id",
                  "type": "string"
                }
              ],
              "format": "JSON ของ results[].response.body ที่ส่งกลับโดยตรง"
            },
            "parameters": [
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "/v1/chat/completions"
                ],
                "enum_known": true,
                "name": "endpoint",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "openai/gpt-6-astra:batch"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "min_items": 1,
                "name": "requests",
                "required": true,
                "type": "batch_item[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "requests[].custom_id",
                "required": true,
                "type": "string",
                "unique_within_batch": true
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "requests[].body.messages",
                "required": true,
                "type": "message[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "24h"
                ],
                "enum_known": true,
                "name": "completion_window",
                "required": false,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "provider",
                "required": false,
                "type": "object|null"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "openai/gpt-6-astra:batch",
                  "openai/gpt-6-astra"
                ],
                "enum_known": true,
                "name": "requests[].body.model",
                "required": false,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  [
                    "openai"
                  ]
                ],
                "enum_known": true,
                "name": "provider.only",
                "required": false,
                "type": "string[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  false,
                  null
                ],
                "enum_known": true,
                "name": "provider.allow_fallbacks",
                "required": false,
                "type": "boolean|null"
              }
            ],
            "provider_policy": {
              "allow_fallbacks": false,
              "configured_only": [
                "openai"
              ],
              "per_item_override": false,
              "when_omitted": "Current Source injects the exact persisted declaration before fresh submission."
            },
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "completion_window": {
                  "enum": [
                    "24h"
                  ],
                  "type": "string"
                },
                "endpoint": {
                  "enum": [
                    "/v1/chat/completions"
                  ],
                  "type": "string"
                },
                "model": {
                  "enum": [
                    "openai/gpt-6-astra:batch"
                  ],
                  "type": "string"
                },
                "provider": {
                  "additionalProperties": false,
                  "properties": {
                    "allow_fallbacks": {
                      "enum": [
                        false,
                        null
                      ],
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "only": {
                      "enum": [
                        [
                          "openai"
                        ]
                      ],
                      "items": {
                        "enum": [
                          "openai"
                        ],
                        "type": "string"
                      },
                      "maxItems": 1,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "requests": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "body": {
                        "additionalProperties": true,
                        "properties": {
                          "max_tokens": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "messages": {
                            "items": {
                              "properties": {
                                "content": {
                                  "type": "string"
                                },
                                "role": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "type": "object"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "model": {
                            "enum": [
                              "openai/gpt-6-astra:batch",
                              "openai/gpt-6-astra"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "messages"
                        ],
                        "type": "object"
                      },
                      "custom_id": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "custom_id",
                      "body"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array"
                }
              },
              "required": [
                "endpoint",
                "model",
                "requests"
              ],
              "type": "object"
            },
            "schema_template": {
              "endpoint": "/v1/chat/completions",
              "model": "openai/gpt-6-astra:batch",
              "requests": [
                {
                  "body": {
                    "max_tokens": 16,
                    "messages": [
                      {
                        "content": "Hello!",
                        "role": "user"
                      }
                    ]
                  },
                  "custom_id": "req-0001"
                }
              ]
            },
            "unsupported": [
              "Files/input_file_id batch upload workflow",
              "active cancel route",
              "public batch list/delete/result-download route",
              "model-name-derived capability or weights equivalence"
            ]
          },
          "input": {
            "content_type": "application/json",
            "file_material": "ผู้เรียกใช้อาจอ่านไฟล์ JSONL ที่เข้ารหัส UTF-8 จากเครื่องของตนลงใน requests[] ได้ ไม่มีการใช้ค่าระบุวัตถุประสงค์การอัปโหลด input_file_id หรือการอ้างอิงไฟล์ หากไม่มีข้อมูลของลูกค้าหรือข้อมูลว่าง ให้หยุดการเตรียมก่อนส่ง POST",
            "material_types": [
              "text"
            ],
            "optional_controls": [
              "provider.only",
              "provider.allow_fallbacks",
              "completion_window"
            ],
            "representation": "ส่ง requests[] ไว้ในคำขอโดยตรง โดยแต่ละรายการมี custom_id และ body",
            "request_endpoint_profile": "/v1/chat/completions",
            "required": [
              "endpoint",
              "model",
              "requests"
            ],
            "schema_scope": "เนื้อหาคำขอ Chat Completions แบบข้อความ ภายในโครงสร้างคำขอแบบชุดที่ส่งโดยตรงตามที่ระบุในเอกสาร",
            "serialization_order": [
              "endpoint",
              "model",
              "provider (หากระบุมา)",
              "completion_window (หากระบุมา)",
              "requests อยู่ท้ายสุด"
            ]
          },
          "lifecycle": {
            "cancel": null,
            "create": {
              "accepted_status": 202,
              "http": "POST",
              "path": "/v1/batches"
            },
            "delete": null,
            "file_upload": null,
            "mode": "asynchronous",
            "observed_status_values": [
              "validating",
              "in_progress",
              "finalizing",
              "completed",
              "failed",
              "expired",
              "cancelling",
              "cancelled"
            ],
            "owned_results": {
              "behavior": "Completed results are saved as owned JSONL, read back byte-for-byte and registered in the existing media library before publication after settlement. Status returns inline results; no separate Batch download route is added.",
              "format": "application/x-ndjson",
              "public_url_field_in_status": null
            },
            "status": {
              "http": "GET",
              "id_source": "ค่า response.id จริงจากการตอบกลับคำขอสร้างครั้งเดิม โดยใช้ผู้ใช้/คีย์/กลุ่มเดิม",
              "path": "/v1/batches/{operation_id}"
            },
            "terminal": [
              "completed",
              "failed",
              "expired",
              "cancelled"
            ],
            "unknown": "เก็บ ID การดำเนินการเดิมไว้ การตอบกลับ 503 result_pending_check มี X-Should-Retry:false ห้ามส่งงานแบบชุดเดิมซ้ำเด็ดขาดเมื่อยังไม่ทราบสถานะของงาน"
          },
          "manufacturer_capability": null,
          "method": {
            "http": "POST",
            "path": "/v1/batches"
          },
          "output": {
            "all_results": "Preserve the full original status JSON, every result/custom_id and complete response or error body. Save completed results[] as JSONL without filtering.",
            "family": "batch",
            "format": "JSON; completed results[] are returned inline and can be saved as JSONL."
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "อัตราราคาพื้นฐานของโทเคน",
            "units": [
              {
                "amount": "0.01000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.05000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.00005",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000001",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.0125000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.0000125",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": 272000,
              "min_context_tokens_exclusive": 0
            },
            "label": "ระดับความยาวคำขอ 1",
            "units": [
              {
                "amount": "0.01000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.05000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.00005",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000001",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.0125000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.0000125",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": null,
              "min_context_tokens_exclusive": 272000
            },
            "label": "ระดับความยาวคำขอ 2",
            "units": [
              {
                "amount": "0.02000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00002",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.075000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.000075",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.002000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000002",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.000025",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\npython3 - <<'PY_REQUEST'\nimport json\nfrom pathlib import Path\nbody=json.loads('{\"endpoint\":\"/v1/chat/completions\",\"model\":\"openai/gpt-6-astra:batch\",\"requests\":[{\"custom_id\":\"req-0001\",\"body\":{\"messages\":[{\"role\":\"user\",\"content\":\"Hello!\"}],\"max_tokens\":16}}]}')\nPath(\"batch-request.json\").write_text(json.dumps(body,ensure_ascii=False),encoding=\"utf-8\")\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/batches \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @batch-request.json -D batch-response-headers.txt -o batch-create-response.json\n",
            "label": "curl · retained fixture",
            "language": "bash"
          },
          {
            "code": "import json, os\nfrom pathlib import Path\nfrom urllib.request import Request, urlopen\n\ndef prepare_requests(customer_path):\n    path = Path(customer_path)\n    if not path.is_file(): raise ValueError(\"Customer JSONL file is missing\")\n    items = [json.loads(line) for line in path.read_text(encoding=\"utf-8\").splitlines() if line.strip()]\n    if not items: raise ValueError(\"Customer JSONL contains no requests\")\n    ids = set()\n    for item in items:\n        if set(item) != {\"custom_id\", \"body\"}: raise ValueError(\"Each item needs custom_id and body\")\n        cid = item[\"custom_id\"]\n        if not isinstance(cid, str) or not cid.strip() or cid in ids: raise ValueError(\"custom_id must be nonempty and unique\")\n        ids.add(cid)\n        if not isinstance(item[\"body\"], dict) or not item[\"body\"].get(\"messages\"): raise ValueError(\"Supply actual text messages\")\n        supplied_model = item[\"body\"].get(\"model\")\n        if supplied_model is not None and supplied_model not in ['openai/gpt-6-astra:batch', 'openai/gpt-6-astra']: raise ValueError(\"body.model must be an exact documented caller or wire ID\")\n    return {\"endpoint\":\"/v1/chat/completions\", \"model\":\"openai/gpt-6-astra:batch\", \"requests\":items}\n\nif __name__ == \"__main__\":\n    material = os.environ.get(\"AILOOT_BATCH_REQUESTS_JSONL\", \"\")\n    if not material: raise SystemExit(\"Set AILOOT_BATCH_REQUESTS_JSONL to your actual customer file\")\n    body = prepare_requests(material)\n    key = os.environ.get(\"AILOOT_API_KEY\", \"\")\n    if not key: raise SystemExit(\"Set AILOOT_API_KEY\")\n    request = Request(\"https://api.ailoot.ai/v1/batches\", data=json.dumps(body, ensure_ascii=False).encode(\"utf-8\"), headers={\"Authorization\":\"Bearer \" + key, \"Content-Type\":\"application/json\"}, method=\"POST\")\n    with urlopen(request) as response:\n        raw = response.read()\n        Path(\"batch-create-response.json\").write_bytes(raw)\n        print(raw.decode(\"utf-8\"))\n",
            "label": "Python HTTP · actual customer JSONL",
            "language": "python"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\nBATCH_OPERATION_ID=\"$(python3 - <<'PY_ID'\nimport json\nfrom pathlib import Path\nfrom urllib.parse import quote\nresponse = json.loads(Path(\"batch-create-response.json\").read_text(encoding=\"utf-8\"))\noperation = response.get(\"id\")\nif not isinstance(operation, str) or not operation: raise SystemExit(\"No actual original operation ID; preserve the response and do not resubmit\")\nprint(quote(operation, safe=\"\"))\nPY_ID\n)\"\ncurl --fail-with-body --silent --show-error \"https://api.ailoot.ai/v1/batches/$BATCH_OPERATION_ID\" \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -o batch-status-response.json\n",
            "label": "curl · original operation status",
            "language": "bash"
          },
          {
            "code": "import json\nfrom pathlib import Path\nraw = Path(\"batch-status-response.json\").read_bytes()\nresponse = json.loads(raw)\nif response.get(\"status\") != \"completed\":\n    raise SystemExit(\"Keep the original operation; read its status without resubmitting\")\nresults = response.get(\"results\")\nif not isinstance(results, list) or not results:\n    raise SystemExit(\"Preserve the original response; completed results are missing\")\nPath(\"batch-results.jsonl\").write_text(\"\".join(json.dumps(item, ensure_ascii=False) + \"\\n\" for item in results), encoding=\"utf-8\")\n# Preserve batch-status-response.json with aggregate usage and every result/error.\n",
            "label": "Python · save every completed result",
            "language": "python"
          }
        ],
        "family": "batch",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "batches",
        "hints": [
          "Read your actual request items before submission; inline requests are required.",
          "Keep the returned operation ID and every result. Never replay an unknown submission."
        ],
        "http": "POST",
        "in": 10,
        "input": [
          "text"
        ],
        "label": "การประมวลผลแบบชุด",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "out": 50,
        "output": [
          "text"
        ],
        "path": "/v1/batches",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          },
          {
            "label": "Explicit cache pricing",
            "value": "Not enabled",
            "when": "When explicit cache is requested"
          }
        ],
        "pricing": {
          "billing_mode": "token",
          "image_input_price": null,
          "image_output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": "0.01000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.05000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.00005",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000001",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.0125000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.0000125",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": 272000,
              "min_context_tokens_exclusive": 0
            },
            "label": "Request-length tier 1",
            "units": [
              {
                "amount": "0.01000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.05000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.00005",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000001",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.0125000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.0000125",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": null,
              "min_context_tokens_exclusive": 272000
            },
            "label": "Request-length tier 2",
            "units": [
              {
                "amount": "0.02000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00002",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.075000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.000075",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.002000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000002",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.000025",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "request_model_id": "openai/gpt-6-astra:batch",
        "route_label": "Ultra",
        "status_reads": [
          "GET /v1/batches/{operation_id}"
        ],
        "tiers": [
          {
            "cache_read": 1,
            "cache_read_multiplier": null,
            "cache_write": 12.5,
            "cache_write_1h": null,
            "cache_write_multiplier": null,
            "created_at": "0001-01-01T00:00:00Z",
            "in": 10,
            "input_multiplier": null,
            "max": 272000,
            "max_tokens": 272000,
            "min": 0,
            "min_tokens": 0,
            "out": 50,
            "output_multiplier": null,
            "per_request_price": null,
            "sort_order": 0,
            "tier_label": "",
            "updated_at": "0001-01-01T00:00:00Z"
          },
          {
            "cache_read": 2,
            "cache_read_multiplier": null,
            "cache_write": 25,
            "cache_write_1h": null,
            "cache_write_multiplier": null,
            "created_at": "0001-01-01T00:00:00Z",
            "in": 20,
            "input_multiplier": null,
            "max": null,
            "max_tokens": null,
            "min": 272000,
            "min_tokens": 272000,
            "out": 75,
            "output_multiplier": null,
            "per_request_price": null,
            "sort_order": 1,
            "tier_label": "",
            "updated_at": "0001-01-01T00:00:00Z"
          }
        ],
        "units": [
          {
            "amount": "0.01000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0.00001",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.05000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.00005",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": "0.001000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": "0.000001",
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": "0.0125000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": "0.0000125",
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          }
        ]
      }
    }
  ],
  "model_id": "openai/gpt-6-astra:batch",
  "nativeProvenance": {
    "input_facts_canonical_sha256": "3b3992f8a79adb63f3356cf8257ada754534509b45eb4e47bbc336075fc3301d",
    "input_html_sha256": "0a00780bd2d4ec60504c46c94b3a5918ca239266ca60290a5936a178a5eb630c",
    "private_audit_sha256": "95966272b1cdac2fc0cba90c10dfb77e4d8dd27c758dc25e8748ce79c33f6683",
    "role": "historical-normalized-input-audit-hashes",
    "schema": "ailoot-native-model-provenance-v2"
  },
  "page": {
    "canonical": "https://ailoot.ai/models/th/openai-gpt-6-astra-u003a-batch/",
    "description": "GPT-6 Astra เป็นโมเดลของ OpenAI สำหรับการให้เหตุผลที่ยาก วิศวกรรมซอฟต์แวร์ การวิจัย และงานเอกสารระดับวิชาชีพ โดยผสานความเข้าใจข้อความและภาพเข้ากับการวิเคราะห์บริบทยาวและเวิร์กโฟลว์ที่ใช้เครื่องมือช่วยดำเนินงาน เพื่อสร้างผลลัพธ์ข้อความภายในบริบท 1,050,000 โทเค็น",
    "locale": "th",
    "md_url": "https://ailoot.ai/models/th/openai-gpt-6-astra-u003a-batch/index.md",
    "title": "OpenAI: GPT-6 Astra (batch) — Ailoot",
    "url": "https://ailoot.ai/models/th/openai-gpt-6-astra-u003a-batch/"
  },
  "rawModel": {
    "about": "GPT-6 Astra เป็นโมเดลของ OpenAI สำหรับงานให้เหตุผลและงานวิชาชีพที่ยากที่สุด ผู้พัฒนาสร้างโมเดลนี้สำหรับวิศวกรรมซอฟต์แวร์ การใช้คอมพิวเตอร์ การวิจัย งานวิทยาศาสตร์ และการสร้างเอกสาร โมเดลรับข้อความและภาพ แล้วสร้างข้อความ เช่น คำอธิบาย โค้ด และชิ้นงานที่มีโครงสร้าง โปรไฟล์ Astra แบบมาตรฐานนี้แยกจากโหมดการให้เหตุผล Pro และโปรไฟล์ Sol กับ Luna\n\n### ทำงานตั้งแต่ต้นจนจบ\n\nเตรียมงานโดยยึดผลลัพธ์ที่ต้องการ แหล่งข้อมูลที่เกี่ยวข้อง และเกณฑ์การเสร็จสิ้น สำหรับวิศวกรรมซอฟต์แวร์ ให้แนบโค้ด ความผิดพลาดที่สังเกตพบ พฤติกรรมที่คาดหวัง และอินเทอร์เฟซที่ต้องรักษาไว้ สำหรับการวิเคราะห์เชิงวิชาชีพ ให้ส่งเอกสาร การตัดสินใจที่ต้องทำ และเงื่อนไขที่ข้อสรุปต้องพิจารณา ตัวอย่างคำสั่งที่ใช้ได้จริงคือ “เปรียบเทียบทางเลือกเหล่านี้กับข้อกำหนด ระบุสิ่งที่ต้องพึ่งพา และจัดทำบันทึกเพื่อการตัดสินใจพร้อมหลักฐานสำหรับข้อค้นพบสำคัญทุกรายการ”\n\nสำหรับงานที่ใช้ภาพ ให้เตรียมแหล่งข้อมูลให้อ่านได้ชัดเจน และระบุว่าภาพแสดงสถานะอินเทอร์เฟซ แผนภูมิ หรือข้อกำหนดการออกแบบ ขอให้ระบุรายละเอียดที่มองเห็นได้ซึ่งรองรับข้อสังเกต ชิ้นงานโค้ดหรือเอกสารควรเชื่อมโยงกับหลักฐานนั้น แทนการสมมติว่ามีการดำเนินการภายนอกแล้ว\n\n### การเขียนพรอมต์และติดตามงาน\n\nแนวทาง Astra ของ OpenAI แนะนำให้กำหนดเป้าหมาย เกณฑ์ความสำเร็จ กฎเรื่องหลักฐาน และเงื่อนไขหยุดให้ชัดเจน แนวทางระบุว่าโมเดลตอบสนองต่อคำสั่งละเอียดในบริบทและไฟล์ที่เข้าถึงได้อย่างมาก จึงควรแก้ความขัดแย้งของแนวทางและระบุลำดับความสำคัญของงานผู้ใช้ กำหนดว่าเมื่อใดโมเดลควรใช้ข้อมูลที่มี ตั้งสมมติฐานอย่างสมเหตุสมผล หรือถามหารายละเอียดที่ขาดไปและอาจเปลี่ยนผลลัพธ์\n\nผู้สร้างยังแนะนำให้ปรับรูปแบบคำตอบและความลึกของการตรวจสอบ สำหรับเอกสาร ให้อธิบายผู้อ่านและโครงสร้างสุดท้าย สำหรับงานวิศวกรรม ให้กำหนดการตรวจสอบที่เกี่ยวข้องกับการเปลี่ยนแปลง วิธีนี้ทำให้โมเดลมีจุดจบงานที่ชัดเจนโดยไม่เพิ่มงานที่ไม่เกี่ยวข้อง\n\n### การให้เหตุผลและบริบท\n\nAstra รองรับระดับความเข้มข้นในการให้เหตุผล low, medium, high, xhigh และ max แต่ไม่รองรับ none ระดับความเข้มข้นแยกจากโหมดการให้เหตุผลมาตรฐานหรือ Pro ของผู้พัฒนา การ์ดโมเดลระบุบริบท 1,050,000 โทเค็น อินพุตสูงสุด 922,000 โทเค็น และเอาต์พุตสูงสุด 128,000 โทเค็น วันที่ตัดความรู้คือ 30 เมษายน 2026\n\nการให้เหตุผลใช้พื้นที่คำตอบ แม้โทเค็นภายในแบบดิบจะไม่ถูกเปิดเผยเป็นคำตอบทั่วไป ควรเผื่อพื้นที่สำหรับชิ้นงานสุดท้าย และตรวจสอบสถานะการสิ้นสุดเมื่อใช้งบหมด หน้าต่างบริบทขนาดใหญ่ยังต้องมีป้ายแหล่งข้อมูล ขอบเขตงาน และข้อสังเกตที่เกี่ยวข้อง\n\n### เครื่องมือและงานที่ดำเนินต่อเนื่อง\n\nผู้พัฒนาระบุการเรียกใช้ฟังก์ชันผ่าน Responses ส่วน Chat Completions ไม่รองรับการเรียกใช้ฟังก์ชันสำหรับ Astra เครื่องมือที่รองรับมีการค้นหาเว็บและไฟล์ การสร้างภาพ ตัวแปลและรันโค้ด การดำเนินการ shell และ patch ทักษะ การใช้คอมพิวเตอร์ การเชื่อมต่อ MCP และการค้นหาเครื่องมือ นอกจากนี้ยังระบุ Structured Outputs และการสตรีม เอาต์พุตของ Astra เองยังเป็นข้อความ ขณะที่การดำเนินการของเครื่องมือสร้างข้อสังเกตหรือชิ้นงานของตน\n\nเวิร์กโฟลว์ GPT-6 ที่ระบุในเอกสารสามารถวิเคราะห์ต่อขณะที่เครื่องมือแบบอะซิงโครนัสทำงาน รับการปรับทิศทางระหว่างเทิร์น รักษาการให้เหตุผลระหว่างการเรียก และย่อบทสนทนายาวได้ แอปพลิเคชันเป็นผู้เรียกใช้เครื่องมือของตนและจัดการผลลัพธ์ที่ยังรออยู่ รักษาความเชื่อมโยงระหว่างการเรียกเดิมกับข้อสังเกต เพื่อให้งานใช้หลักฐานจริง\n\nผลลัพธ์สุดท้ายที่เป็นประโยชน์คือชิ้นงานวิเคราะห์หรือโค้ดที่เสร็จแล้ว โดยระบุเหตุผลรองรับและเงื่อนไขที่เหลืออย่างชัดเจน ตรวจสอบข้อความที่พึ่งพาแหล่งข้อมูล และใช้ข้อสังเกตจากการตรวจสอบจริงสำหรับงานที่ดำเนินการแล้ว รักษาโปรไฟล์ Astra ที่ระบุชื่อและช่วงระดับความเข้มข้นที่รองรับ แทนการนำการตั้งค่าให้ตอบโดยตรงหรือขีดจำกัดของโมเดลอื่นมาใช้",
    "alias_of": null,
    "aliases": [],
    "author": "OpenAI",
    "capabilities": {
      "context_length": 1050000,
      "manufacturer_input": [
        "file",
        "image",
        "text"
      ],
      "manufacturer_output": [
        "text"
      ]
    },
    "card_routes": [
      {
        "label": "Ultra",
        "rates": [
          {
            "amount": "0.01000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0.00001",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.05000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.00005",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          }
        ],
        "summary": "ดูราคาตามการกำหนดค่าแบบครบถ้วนในรายละเอียด"
      }
    ],
    "ctx": null,
    "formats": [
      "batches"
    ],
    "id": "openai/gpt-6-astra:batch",
    "input": [
      "text"
    ],
    "kind": "text",
    "max_out": null,
    "methods": [
      {
        "available": null,
        "cache_read": 1,
        "cache_write": 12.5,
        "cache_write_1h": null,
        "contract": {
          "data": {
            "all_results": "Preserve full JSON and every result; provider real IDs are only read from actual returned responses.",
            "authentication": {
              "api_key_source": "AILOOT_API_KEY",
              "header": "Authorization: Bearer"
            },
            "errors": [
              {
                "code": null,
                "condition": "โครงสร้างคำขอแบบส่งโดยตรงตามเอกสารไม่ถูกต้อง มีคีย์ซ้ำ หรือมีข้อขัดแย้งเกี่ยวกับตัวตนของรายการหรือความสามารถของโมเดลที่กำหนดไว้",
                "http_status": 400,
                "recovery": "แก้ไขฟิลด์ที่ระบุให้ถูกต้องก่อนส่งคำขอใหม่ทุกครั้ง",
                "type": "invalid_request_error"
              },
              {
                "code": null,
                "condition": "คีย์ API ไม่ถูกต้อง",
                "http_status": 401,
                "recovery": "ใช้คีย์ Ailoot ที่ได้รับอนุญาต",
                "type": "authentication_error"
              },
              {
                "code": null,
                "condition": "กลุ่มสำหรับการประมวลผลแบบชุดไม่พร้อมใช้งาน",
                "http_status": 403,
                "recovery": "ตรวจสอบสิทธิ์ของคีย์/กลุ่ม",
                "type": "permission_error"
              },
              {
                "code": null,
                "condition": "การประมวลผลแบบชุดเรียกเก็บเงินจากยอดเงินคงเหลือ คำขอสร้างที่ใช้การเรียกเก็บผ่านการสมัครสมาชิกจะถูกปฏิเสธ",
                "http_status": 422,
                "recovery": "ใช้กลุ่มที่ได้รับอนุญาตให้เรียกเก็บเงินจากยอดเงินคงเหลือ",
                "type": "invalid_request_error"
              },
              {
                "code": null,
                "condition": "ไม่สามารถคำนวณราคาล่วงหน้าสำหรับข้อมูลนำเข้าของงานแบบชุดได้",
                "http_status": 422,
                "recovery": "เก็บการตอบกลับไว้ และใช้ข้อมูลนำเข้าตามเอกสารของ API ประเภทนั้น",
                "type": "price_unavailable"
              },
              {
                "code": null,
                "condition": "ไม่สามารถกันยอดเงินสำรองสำหรับการประมวลผลแบบชุดได้",
                "http_status": 402,
                "recovery": "แก้ไขเงื่อนไขการรับคำขอให้เรียบร้อยก่อนส่งคำขอใหม่",
                "type": "billing_error"
              },
              {
                "code": null,
                "condition": "ราคาของวิธีประมวลผลแบบชุด/อัตราราคาของระบบไม่พร้อมใช้งาน",
                "http_status": 503,
                "recovery": "เก็บการตอบกลับไว้ ห้ามแทนที่ด้วยราคาอื่น",
                "type": "price_unavailable"
              },
              {
                "code": null,
                "condition": "เส้นทางที่ระบุไว้ของผู้ให้บริการต้นทางไม่พร้อมใช้งาน",
                "http_status": 503,
                "recovery": "เก็บการตอบกลับไว้เพื่อแก้ไขเส้นทางการส่งคำขอ",
                "type": "api_error"
              },
              {
                "code": "result_pending_check",
                "condition": "ผลลัพธ์เดิมต้องได้รับการตรวจสอบ โดยมี X-Should-Retry:false",
                "http_status": 503,
                "recovery": "เก็บค่า operation_id/id เดิมไว้แล้วอ่านสถานะของการดำเนินการนั้น ห้ามส่ง POST เดิมซ้ำเด็ดขาด",
                "type": null
              },
              {
                "code": "not_found",
                "condition": "ไม่พบการดำเนินการตรวจสอบสถานะงานแบบชุด หรือการดำเนินการนั้นเป็นของตัวตนอื่น",
                "http_status": 404,
                "recovery": "ใช้ค่า id เดิมให้ตรงทุกตัว พร้อมผู้ใช้/คีย์/กลุ่มเดิม",
                "type": null
              }
            ],
            "example_body": {
              "endpoint": "/v1/chat/completions",
              "model": "openai/gpt-6-astra:batch",
              "requests": [
                {
                  "body": {
                    "max_tokens": 16,
                    "messages": [
                      {
                        "content": "Hello!",
                        "role": "user"
                      }
                    ]
                  },
                  "custom_id": "req-0001"
                }
              ]
            },
            "input_constraints": [
              "Use the exact shown :batch model ID.",
              "Each custom_id must be nonempty and unique within the batch.",
              "Keep requests last in the serialized body; duplicate JSON keys are rejected.",
              "Each body.model is omitted or equals the exact batch caller or its documented base ID.",
              "Per-item provider, service_tier and input_type are outside this batch profile.",
              "stream is omitted or false.",
              "Supply text messages for this Chat batch profile; image/audio/file/video objects, hosted tools and cache-control fields are outside this profile.",
              "If body.model is present, use only the exact caller or wire ID listed here; no suffix conversion is needed.",
              "For google/ wire IDs, all items use an identical response_format."
            ],
            "outputs": {
              "all_results": "เก็บ JSON สถานะเดิมให้ครบถ้วน รวมถึงผลลัพธ์/custom_id ทุกรายการ และเนื้อหาการตอบกลับหรือข้อผิดพลาดทั้งหมด บันทึก results[] ที่เสร็จสมบูรณ์เป็น JSONL โดยไม่กรองข้อมูล",
              "enclosing_family": "batch",
              "family": "text",
              "fields": [
                {
                  "name": "results[].custom_id",
                  "type": "string"
                },
                {
                  "name": "results[].response.body.choices[].message.content",
                  "type": "string|null"
                },
                {
                  "name": "results[].error",
                  "type": "object|null"
                },
                {
                  "name": "usage",
                  "type": "object|null"
                },
                {
                  "description": null,
                  "name": "id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "model",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "endpoint",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "status",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "request_counts",
                  "type": "object"
                },
                {
                  "description": null,
                  "name": "results[].id",
                  "type": "string"
                },
                {
                  "description": null,
                  "name": "results[].response.status_code",
                  "type": "integer"
                },
                {
                  "description": null,
                  "name": "results[].response.request_id",
                  "type": "string"
                }
              ],
              "format": "JSON ของ results[].response.body ที่ส่งกลับโดยตรง"
            },
            "parameters": [
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "/v1/chat/completions"
                ],
                "enum_known": true,
                "name": "endpoint",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "openai/gpt-6-astra:batch"
                ],
                "enum_known": true,
                "name": "model",
                "required": true,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "min_items": 1,
                "name": "requests",
                "required": true,
                "type": "batch_item[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "requests[].custom_id",
                "required": true,
                "type": "string",
                "unique_within_batch": true
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "requests[].body.messages",
                "required": true,
                "type": "message[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "24h"
                ],
                "enum_known": true,
                "name": "completion_window",
                "required": false,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": null,
                "enum_known": false,
                "name": "provider",
                "required": false,
                "type": "object|null"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  "openai/gpt-6-astra:batch",
                  "openai/gpt-6-astra"
                ],
                "enum_known": true,
                "name": "requests[].body.model",
                "required": false,
                "type": "string"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  [
                    "openai"
                  ]
                ],
                "enum_known": true,
                "name": "provider.only",
                "required": false,
                "type": "string[]"
              },
              {
                "availability": "source_interface",
                "default": null,
                "default_known": false,
                "enum": [
                  false,
                  null
                ],
                "enum_known": true,
                "name": "provider.allow_fallbacks",
                "required": false,
                "type": "boolean|null"
              }
            ],
            "provider_policy": {
              "allow_fallbacks": false,
              "configured_only": [
                "openai"
              ],
              "per_item_override": false,
              "when_omitted": "Current Source injects the exact persisted declaration before fresh submission."
            },
            "request_schema": {
              "additionalProperties": false,
              "properties": {
                "completion_window": {
                  "enum": [
                    "24h"
                  ],
                  "type": "string"
                },
                "endpoint": {
                  "enum": [
                    "/v1/chat/completions"
                  ],
                  "type": "string"
                },
                "model": {
                  "enum": [
                    "openai/gpt-6-astra:batch"
                  ],
                  "type": "string"
                },
                "provider": {
                  "additionalProperties": false,
                  "properties": {
                    "allow_fallbacks": {
                      "enum": [
                        false,
                        null
                      ],
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "only": {
                      "enum": [
                        [
                          "openai"
                        ]
                      ],
                      "items": {
                        "enum": [
                          "openai"
                        ],
                        "type": "string"
                      },
                      "maxItems": 1,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "requests": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "body": {
                        "additionalProperties": true,
                        "properties": {
                          "max_tokens": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "messages": {
                            "items": {
                              "properties": {
                                "content": {
                                  "type": "string"
                                },
                                "role": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "role",
                                "content"
                              ],
                              "type": "object"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "model": {
                            "enum": [
                              "openai/gpt-6-astra:batch",
                              "openai/gpt-6-astra"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "messages"
                        ],
                        "type": "object"
                      },
                      "custom_id": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "custom_id",
                      "body"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array"
                }
              },
              "required": [
                "endpoint",
                "model",
                "requests"
              ],
              "type": "object"
            },
            "schema_template": {
              "endpoint": "/v1/chat/completions",
              "model": "openai/gpt-6-astra:batch",
              "requests": [
                {
                  "body": {
                    "max_tokens": 16,
                    "messages": [
                      {
                        "content": "Hello!",
                        "role": "user"
                      }
                    ]
                  },
                  "custom_id": "req-0001"
                }
              ]
            },
            "unsupported": [
              "Files/input_file_id batch upload workflow",
              "active cancel route",
              "public batch list/delete/result-download route",
              "model-name-derived capability or weights equivalence"
            ]
          },
          "input": {
            "content_type": "application/json",
            "file_material": "ผู้เรียกใช้อาจอ่านไฟล์ JSONL ที่เข้ารหัส UTF-8 จากเครื่องของตนลงใน requests[] ได้ ไม่มีการใช้ค่าระบุวัตถุประสงค์การอัปโหลด input_file_id หรือการอ้างอิงไฟล์ หากไม่มีข้อมูลของลูกค้าหรือข้อมูลว่าง ให้หยุดการเตรียมก่อนส่ง POST",
            "material_types": [
              "text"
            ],
            "optional_controls": [
              "provider.only",
              "provider.allow_fallbacks",
              "completion_window"
            ],
            "representation": "ส่ง requests[] ไว้ในคำขอโดยตรง โดยแต่ละรายการมี custom_id และ body",
            "request_endpoint_profile": "/v1/chat/completions",
            "required": [
              "endpoint",
              "model",
              "requests"
            ],
            "schema_scope": "เนื้อหาคำขอ Chat Completions แบบข้อความ ภายในโครงสร้างคำขอแบบชุดที่ส่งโดยตรงตามที่ระบุในเอกสาร",
            "serialization_order": [
              "endpoint",
              "model",
              "provider (หากระบุมา)",
              "completion_window (หากระบุมา)",
              "requests อยู่ท้ายสุด"
            ]
          },
          "lifecycle": {
            "cancel": null,
            "create": {
              "accepted_status": 202,
              "http": "POST",
              "path": "/v1/batches"
            },
            "delete": null,
            "file_upload": null,
            "mode": "asynchronous",
            "observed_status_values": [
              "validating",
              "in_progress",
              "finalizing",
              "completed",
              "failed",
              "expired",
              "cancelling",
              "cancelled"
            ],
            "owned_results": {
              "behavior": "Completed results are saved as owned JSONL, read back byte-for-byte and registered in the existing media library before publication after settlement. Status returns inline results; no separate Batch download route is added.",
              "format": "application/x-ndjson",
              "public_url_field_in_status": null
            },
            "status": {
              "http": "GET",
              "id_source": "ค่า response.id จริงจากการตอบกลับคำขอสร้างครั้งเดิม โดยใช้ผู้ใช้/คีย์/กลุ่มเดิม",
              "path": "/v1/batches/{operation_id}"
            },
            "terminal": [
              "completed",
              "failed",
              "expired",
              "cancelled"
            ],
            "unknown": "เก็บ ID การดำเนินการเดิมไว้ การตอบกลับ 503 result_pending_check มี X-Should-Retry:false ห้ามส่งงานแบบชุดเดิมซ้ำเด็ดขาดเมื่อยังไม่ทราบสถานะของงาน"
          },
          "manufacturer_capability": null,
          "method": {
            "http": "POST",
            "path": "/v1/batches"
          },
          "output": {
            "all_results": "Preserve the full original status JSON, every result/custom_id and complete response or error body. Save completed results[] as JSONL without filtering.",
            "family": "batch",
            "format": "JSON; completed results[] are returned inline and can be saved as JSONL."
          }
        },
        "ctx": null,
        "declared_pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "อัตราราคาพื้นฐานของโทเคน",
            "units": [
              {
                "amount": "0.01000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.05000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.00005",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000001",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.0125000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.0000125",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": 272000,
              "min_context_tokens_exclusive": 0
            },
            "label": "ระดับความยาวคำขอ 1",
            "units": [
              {
                "amount": "0.01000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.05000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.00005",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000001",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.0125000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.0000125",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": null,
              "min_context_tokens_exclusive": 272000
            },
            "label": "ระดับความยาวคำขอ 2",
            "units": [
              {
                "amount": "0.02000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00002",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.075000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.000075",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.002000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000002",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.000025",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "examples": [
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\npython3 - <<'PY_REQUEST'\nimport json\nfrom pathlib import Path\nbody=json.loads('{\"endpoint\":\"/v1/chat/completions\",\"model\":\"openai/gpt-6-astra:batch\",\"requests\":[{\"custom_id\":\"req-0001\",\"body\":{\"messages\":[{\"role\":\"user\",\"content\":\"Hello!\"}],\"max_tokens\":16}}]}')\nPath(\"batch-request.json\").write_text(json.dumps(body,ensure_ascii=False),encoding=\"utf-8\")\nPY_REQUEST\ncurl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/batches \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -H 'Content-Type: application/json' \\\n  --data-binary @batch-request.json -D batch-response-headers.txt -o batch-create-response.json\n",
            "label": "curl · retained fixture",
            "language": "bash"
          },
          {
            "code": "import json, os\nfrom pathlib import Path\nfrom urllib.request import Request, urlopen\n\ndef prepare_requests(customer_path):\n    path = Path(customer_path)\n    if not path.is_file(): raise ValueError(\"Customer JSONL file is missing\")\n    items = [json.loads(line) for line in path.read_text(encoding=\"utf-8\").splitlines() if line.strip()]\n    if not items: raise ValueError(\"Customer JSONL contains no requests\")\n    ids = set()\n    for item in items:\n        if set(item) != {\"custom_id\", \"body\"}: raise ValueError(\"Each item needs custom_id and body\")\n        cid = item[\"custom_id\"]\n        if not isinstance(cid, str) or not cid.strip() or cid in ids: raise ValueError(\"custom_id must be nonempty and unique\")\n        ids.add(cid)\n        if not isinstance(item[\"body\"], dict) or not item[\"body\"].get(\"messages\"): raise ValueError(\"Supply actual text messages\")\n        supplied_model = item[\"body\"].get(\"model\")\n        if supplied_model is not None and supplied_model not in ['openai/gpt-6-astra:batch', 'openai/gpt-6-astra']: raise ValueError(\"body.model must be an exact documented caller or wire ID\")\n    return {\"endpoint\":\"/v1/chat/completions\", \"model\":\"openai/gpt-6-astra:batch\", \"requests\":items}\n\nif __name__ == \"__main__\":\n    material = os.environ.get(\"AILOOT_BATCH_REQUESTS_JSONL\", \"\")\n    if not material: raise SystemExit(\"Set AILOOT_BATCH_REQUESTS_JSONL to your actual customer file\")\n    body = prepare_requests(material)\n    key = os.environ.get(\"AILOOT_API_KEY\", \"\")\n    if not key: raise SystemExit(\"Set AILOOT_API_KEY\")\n    request = Request(\"https://api.ailoot.ai/v1/batches\", data=json.dumps(body, ensure_ascii=False).encode(\"utf-8\"), headers={\"Authorization\":\"Bearer \" + key, \"Content-Type\":\"application/json\"}, method=\"POST\")\n    with urlopen(request) as response:\n        raw = response.read()\n        Path(\"batch-create-response.json\").write_bytes(raw)\n        print(raw.decode(\"utf-8\"))\n",
            "label": "Python HTTP · actual customer JSONL",
            "language": "python"
          },
          {
            "code": "set -eu\n: \"${AILOOT_API_KEY:?Set your Ailoot API key}\"\nBATCH_OPERATION_ID=\"$(python3 - <<'PY_ID'\nimport json\nfrom pathlib import Path\nfrom urllib.parse import quote\nresponse = json.loads(Path(\"batch-create-response.json\").read_text(encoding=\"utf-8\"))\noperation = response.get(\"id\")\nif not isinstance(operation, str) or not operation: raise SystemExit(\"No actual original operation ID; preserve the response and do not resubmit\")\nprint(quote(operation, safe=\"\"))\nPY_ID\n)\"\ncurl --fail-with-body --silent --show-error \"https://api.ailoot.ai/v1/batches/$BATCH_OPERATION_ID\" \\\n  -H \"Authorization: Bearer $AILOOT_API_KEY\" -o batch-status-response.json\n",
            "label": "curl · original operation status",
            "language": "bash"
          },
          {
            "code": "import json\nfrom pathlib import Path\nraw = Path(\"batch-status-response.json\").read_bytes()\nresponse = json.loads(raw)\nif response.get(\"status\") != \"completed\":\n    raise SystemExit(\"Keep the original operation; read its status without resubmitting\")\nresults = response.get(\"results\")\nif not isinstance(results, list) or not results:\n    raise SystemExit(\"Preserve the original response; completed results are missing\")\nPath(\"batch-results.jsonl\").write_text(\"\".join(json.dumps(item, ensure_ascii=False) + \"\\n\" for item in results), encoding=\"utf-8\")\n# Preserve batch-status-response.json with aggregate usage and every result/error.\n",
            "label": "Python · save every completed result",
            "language": "python"
          }
        ],
        "family": "batch",
        "fast_multiplier": null,
        "flex_multiplier": null,
        "fmt": "batches",
        "hints": [
          "Read your actual request items before submission; inline requests are required.",
          "Keep the returned operation ID and every result. Never replay an unknown submission."
        ],
        "http": "POST",
        "in": 10,
        "input": [
          "text"
        ],
        "label": "การประมวลผลแบบชุด",
        "max_out": null,
        "max_reasoning_effort_multiplier": null,
        "out": 50,
        "output": [
          "text"
        ],
        "path": "/v1/batches",
        "price_conditions": [
          {
            "label": "Fast mode",
            "value": "Not specified",
            "when": "When fast mode is selected"
          },
          {
            "label": "Flex mode",
            "value": "Not specified",
            "when": "When flex mode is selected"
          },
          {
            "label": "Maximum reasoning effort",
            "value": "Not specified",
            "when": "When maximum reasoning effort uses the default adjustment"
          },
          {
            "label": "Explicit cache pricing",
            "value": "Not enabled",
            "when": "When explicit cache is requested"
          }
        ],
        "pricing": {
          "billing_mode": "token",
          "image_input_price": null,
          "image_output_price": null,
          "per_request_price": null
        },
        "pricing_profiles": [
          {
            "dimensions": {
              "regime": "base"
            },
            "label": "Base token rates",
            "units": [
              {
                "amount": "0.01000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.05000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.00005",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000001",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.0125000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.0000125",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": 272000,
              "min_context_tokens_exclusive": 0
            },
            "label": "Request-length tier 1",
            "units": [
              {
                "amount": "0.01000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00001",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.05000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.00005",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.001000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000001",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.0125000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.0000125",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          },
          {
            "dimensions": {
              "max_context_tokens_inclusive": null,
              "min_context_tokens_exclusive": 272000
            },
            "label": "Request-length tier 2",
            "units": [
              {
                "amount": "0.02000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "input_price",
                "label": "Input tokens",
                "native_amount_usd_per_unit": "0.00002",
                "native_quantity": 1,
                "native_unit": "input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "input_token"
              },
              {
                "amount": "0.075000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "output_price",
                "label": "Output tokens",
                "native_amount_usd_per_unit": "0.000075",
                "native_quantity": 1,
                "native_unit": "output_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "out",
                "unit": "output_token"
              },
              {
                "amount": "0.002000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_read_price",
                "label": "Cache read",
                "native_amount_usd_per_unit": "0.000002",
                "native_quantity": 1,
                "native_unit": "cached_input_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "cached_input_token"
              },
              {
                "amount": "0.025000",
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_price",
                "label": "Cache write",
                "native_amount_usd_per_unit": "0.000025",
                "native_quantity": 1,
                "native_unit": "generic_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "generic_cache_creation_token"
              },
              {
                "amount": null,
                "amount_unit": "usd_per_thousand_tokens",
                "billing_input": true,
                "estimate_only": false,
                "key": "cache_write_1h_price",
                "label": "Cache write, 1 hour",
                "native_amount_usd_per_unit": null,
                "native_quantity": 1,
                "native_unit": "one_hour_cache_creation_token",
                "public_unit_label": "/ 1K tokens",
                "quantity": 1000,
                "quantity_is_estimate": false,
                "rate_role": "typed_native_retail_rate",
                "side": "in",
                "unit": "one_hour_cache_creation_token"
              }
            ]
          }
        ],
        "request_model_id": "openai/gpt-6-astra:batch",
        "route_label": "Ultra",
        "status_reads": [
          "GET /v1/batches/{operation_id}"
        ],
        "tiers": [
          {
            "cache_read": 1,
            "cache_read_multiplier": null,
            "cache_write": 12.5,
            "cache_write_1h": null,
            "cache_write_multiplier": null,
            "created_at": "0001-01-01T00:00:00Z",
            "in": 10,
            "input_multiplier": null,
            "max": 272000,
            "max_tokens": 272000,
            "min": 0,
            "min_tokens": 0,
            "out": 50,
            "output_multiplier": null,
            "per_request_price": null,
            "sort_order": 0,
            "tier_label": "",
            "updated_at": "0001-01-01T00:00:00Z"
          },
          {
            "cache_read": 2,
            "cache_read_multiplier": null,
            "cache_write": 25,
            "cache_write_1h": null,
            "cache_write_multiplier": null,
            "created_at": "0001-01-01T00:00:00Z",
            "in": 20,
            "input_multiplier": null,
            "max": null,
            "max_tokens": null,
            "min": 272000,
            "min_tokens": 272000,
            "out": 75,
            "output_multiplier": null,
            "per_request_price": null,
            "sort_order": 1,
            "tier_label": "",
            "updated_at": "0001-01-01T00:00:00Z"
          }
        ],
        "units": [
          {
            "amount": "0.01000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "input_price",
            "label": "Input tokens",
            "native_amount_usd_per_unit": "0.00001",
            "native_quantity": 1,
            "native_unit": "input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "input_token"
          },
          {
            "amount": "0.05000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "output_price",
            "label": "Output tokens",
            "native_amount_usd_per_unit": "0.00005",
            "native_quantity": 1,
            "native_unit": "output_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "out",
            "unit": "output_token"
          },
          {
            "amount": "0.001000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_read_price",
            "label": "Cache read",
            "native_amount_usd_per_unit": "0.000001",
            "native_quantity": 1,
            "native_unit": "cached_input_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "cached_input_token"
          },
          {
            "amount": "0.0125000",
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_price",
            "label": "Cache write",
            "native_amount_usd_per_unit": "0.0000125",
            "native_quantity": 1,
            "native_unit": "generic_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "generic_cache_creation_token"
          },
          {
            "amount": null,
            "amount_unit": "usd_per_thousand_tokens",
            "billing_input": true,
            "estimate_only": false,
            "key": "cache_write_1h_price",
            "label": "Cache write, 1 hour",
            "native_amount_usd_per_unit": null,
            "native_quantity": 1,
            "native_unit": "one_hour_cache_creation_token",
            "public_unit_label": "/ 1K tokens",
            "quantity": 1000,
            "quantity_is_estimate": false,
            "rate_role": "typed_native_retail_rate",
            "side": "in",
            "unit": "one_hour_cache_creation_token"
          }
        ]
      }
    ],
    "model_aliases": [
      {
        "canonical_model_id": "openai/gpt-6-astra:batch",
        "request_model_id": "openai/gpt-6-astra:batch",
        "route_label": "Ultra"
      }
    ],
    "name": "OpenAI: GPT-6 Astra (batch)",
    "price": {
      "in": 10,
      "in_label": null,
      "out": 50,
      "out_label": null,
      "scope_label": "Token rates",
      "sort_in": 10,
      "sort_out": 50,
      "varies": true
    },
    "short": "GPT-6 Astra เป็นโมเดลของ OpenAI สำหรับการให้เหตุผลที่ยาก วิศวกรรมซอฟต์แวร์ การวิจัย และงานเอกสารระดับวิชาชีพ โดยผสานความเข้าใจข้อความและภาพเข้ากับการวิเคราะห์บริบทยาวและเวิร์กโฟลว์ที่ใช้เครื่องมือช่วยดำเนินงาน เพื่อสร้างผลลัพธ์ข้อความภายในบริบท 1,050,000 โทเค็น"
  },
  "renderer_schema": {
    "method_order": "Original DTO methods order; every exact route/format/path/caller survives.",
    "prices": "Original public DTO fields and original native display HTML; no flattened or normalized offers."
  },
  "representation": "exact-public-dto-and-native-renderer-html",
  "representationNotes": {
    "current_reference": {
      "about_json_pointer": "/aboutHtml",
      "methods": [
        {
          "contract_json_pointer": "/methods/0/rawMethod/contract",
          "html_json_pointer": "/methods/0/html",
          "method_ordinal": 0
        }
      ],
      "role": "current-semantic-reference"
    },
    "raw_input": {
      "examples_role": "historical-input-not-current-ready-examples",
      "json_pointers": [
        "/rawModel",
        "/methods/0/rawMethod"
      ],
      "role": "historical-owner-input"
    },
    "schema": "ailoot-native-model-representations-v1"
  },
  "schema": "ailoot-static-model-facts-v1",
  "schema_version": 1,
  "shortText": "GPT-6 Astra เป็นโมเดลของ OpenAI สำหรับการให้เหตุผลที่ยาก วิศวกรรมซอฟต์แวร์ การวิจัย และงานเอกสารระดับวิชาชีพ โดยผสานความเข้าใจข้อความและภาพเข้ากับการวิเคราะห์บริบทยาวและเวิร์กโฟลว์ที่ใช้เครื่องมือช่วยดำเนินงาน เพื่อสร้างผลลัพธ์ข้อความภายในบริบท 1,050,000 โทเค็น",
  "source": {
    "audit_sha256": "2e00086bcbfc28e64d0cebe97aa47c17d8d5618963027f8ffb9dc6123d7d25b1",
    "bridge_map_sha256": "1125275768b9636fc8461bc7da5061239a81ddfe508e2557843ca42c58ab0036",
    "raw_model_json_sha256": "497c1dbb968220fec61f1376b35b192bc44bab2c965706a6aa692b7aeca6917c",
    "renderer_sha256": "890edb706fafafdd4f598bb324acf65fada58918b0911b97eb80e68be2ef65d9"
  },
  "sourceRevision": "01fee7a7de761136efd048e0f38eab6031c970e11a2290ba98abfed589ad7244"
}
