เริ่มต้นใช้งาน
API ของ eroq
Base URL เดียว คีย์ bearer เดียว หน่วยคิดเงินเดียว ทุกโมเดล ทั้งแชตโรลเพลย์ รูปภาพ วิดีโอ เสียงพูด และการถอดเสียง ใช้รูปแบบเดียวกันหมด และทุกการเรียกมีราคาเป็นเครดิตที่ดูได้จากตารางราคา
เริ่มต้นใช้งานด่วน
คีย์ → เรียก → ได้ผลตอบกลับ ภายในห้านาที
การยืนยันตัวตน
คีย์แบบ bearer และวิธีเก็บให้ปลอดภัยแบบไม่มีเรื่องน่าตื่นเต้น
เครดิต
หน่วยเดียวที่จ่ายล่วงหน้า ราคาคงที่ ไม่ต้องคำนวณโทเค็น
ส่งคำขอ
รูปแบบคำขอและผลตอบกลับเป็นไปตามแบบของ OpenAI เท่าที่มีให้ (chat/completions, images/generations, audio/speech) โค้ดฝั่งไคลเอนต์เดิมจึงมักย้ายมาใช้ได้ด้วยการเปลี่ยนแค่สามอย่าง คือ base URL คีย์ และ id ของโมเดล
curl https://eroq.ai/v1/chat/completions \
-H "Authorization: Bearer $EROQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "eroq-rp-plus",
"context": "Mira: sardonic starship mechanic, dry humor, hates small talk. Scene: engine bay, mid-shift.",
"messages": [
{
"role": "user",
"content": "The reactor is making that noise again."
}
]
}'{
"id": "cmpl_9f2e17ab",
"object": "chat.completion",
"model": "eroq-rp-plus",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "*slides out from under the manifold, wiping grease on her overalls* That noise is the reactor's way of saying you skipped the coolant flush. Again."
},
"finish_reason": "stop"
}],
"usage": { "credits_spent": 3, "credits_remaining": 997 }
}ดูการเรียกใช้งานจริง
ยังไม่มีคีย์ใช่ไหม ลองรันตัวอย่างได้เลย มันเล่นซ้ำการเรียกจริงจากข้อมูลของเอกสารเอง ทำงานในเบราว์เซอร์ของคุณทั้งหมด