BazaarLinkBazaarLink
เข้าสู่ระบบ
เอกสารAPI ข้อมูลอ้างอิงSDK ข้อมูลอ้างอิงการใช้งาน AgentAI ทักษะ
บัญชี

รับรายละเอียดการสร้าง

ค้นหารายละเอียดการใช้งานและการเรียกเก็บเงินของคำขอเดียวด้วย generation id (ฟิลด์ id จากการตอบกลับของเอนด์พอยต์ที่เข้ากันได้ใด ๆ) จำกัดขอบเขตเฉพาะผู้ใช้ของ API key นั้น — generation id ของผู้ใช้อื่นจะคืนค่า 404 ไม่มีการรั่วไหลข้อมูลของพวกเขา ฟิลด์ provider ในการตอบกลับจะคืนค่าคงที่ "bazaarlink" เสมอ ไม่ได้สะท้อนผู้ให้บริการ upstream ที่ถูกจัดเส้นทางไปจริง

GET/api/v1/generation

การอนุญาต

Authorizationจำเป็น
string · header

API key เป็น bearer token ใน header Authorization

พารามิเตอร์คิวรี

idจำเป็น
string

generation id ที่จะค้นหา นำมาจากฟิลด์ id ในการตอบกลับที่สำเร็จของเอนด์พอยต์ที่เข้ากันได้ใด ๆ

GET /api/v1/generation
curl "https://bazaarlink.ai/api/v1/generation?id=gen-abc123" \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY"
ตัวอย่างการตอบกลับ

สำเร็จ usage ใช้รูปแบบฟิลด์โทเค็นเดียวกับเอนด์พอยต์แชท (prompt_tokens/completion_tokens/total_tokens); cost_breakdown ยังแยก subtotal และส่วนลด cache ออกมาด้วย

{
  "data": {
    "id": "gen-abc123",
    "model": "openai/gpt-4.1",
    "provider": "bazaarlink",
    "created_at": "2026-07-27T02:00:00.000Z",
    "app_name": "my-app",
    "finish_reason": "stop",
    "status": 200,
    "duration_ms": 1840,
    "first_token_ms": 320,
    "throughput": 42.5,
    "usage": {
      "prompt_tokens": 128,
      "completion_tokens": 256,
      "total_tokens": 384,
      "prompt_tokens_details": {
        "cached_tokens": 0
      },
      "completion_tokens_details": {
        "reasoning_tokens": 0
      },
      "cost": 0.0034
    },
    "cost_breakdown": {
      "subtotal": 0.0034,
      "cache_discount": 0,
      "total": 0.0034
    }
  }
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
รับรายละเอียดการสร้าง — BazaarLink API