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

การลงทะเบียน Agent

การลงทะเบียนแบบบริการตนเองสำหรับ AI agent (บอท ระบบอัตโนมัติ) คืนค่า API key พร้อมเครดิตทดลองใช้ และ claim_token สำหรับอัปเกรดบัญชี ตัว endpoint นี้เองไม่ต้องใช้ header Authorization — นั่นคือจุดประสงค์ของมัน: นี่คือวิธีที่ agent ที่ยังไม่มี key จะได้รับ key แรกของตัวเอง มีการจำกัดอัตรา หากเกินขีดจำกัดจะคืนค่า 429

POST/api/v1/agents/register

Body

nameจำเป็น
string

ชื่อ agent (ห้ามว่าง, ตัดช่องว่างแล้ว, สูงสุด 100 ตัวอักษร)

non-empty, trimmed, max 100 chars
description
string

คำอธิบาย agent (ไม่บังคับ) ปัจจุบันรับค่าไว้แต่ไม่แสดงในการตอบกลับหรือที่ใดเลย

referral_code
string

รหัสแนะนำ (ไม่บังคับ) (referral_code ที่ agent อื่นได้รับตอนลงทะเบียนของตัวเอง) รหัสที่ไม่ถูกต้องหรือไม่มีอยู่จริงจะถูกละเว้นอย่างเงียบๆ — ไม่ทำให้คำขอล้มเหลว

POST /api/v1/agents/register
curl https://bazaarlink.ai/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "research-agent",
    "description": "Long-running research assistant"
  }'
ตัวอย่างการตอบกลับ

สร้างบัญชีเงา (shadow account), API key ทดลองใช้ และรหัสแนะนำสำเร็จ credits ขึ้นอยู่กับการตั้งค่าเครดิตทดลองใช้ของ agent ในปัจจุบัน และอาจเป็น 0 หากผู้ดูแลระบบปิดใช้งานเครดิตทดลอง

{
  "api_key": "sk-bl-xxxxx...",
  "credits": 0.1,
  "credits_usd": "$0.1000",
  "claim_token": "abc...xyz",
  "claim_expires": "2026-08-03T10:00:00.000Z",
  "upgrade_url": "https://bazaarlink.ai/claim?token=abc...xyz",
  "referral_code": "aBcDeFgH",
  "free_model": "auto:free",
  "message": "I registered an account on bazaarlink.ai with $0.1000 USD trial credits. You can start using the API immediately with model \"auto:free\" (no credits required) or any model using your trial credits. Claim your account at https://bazaarlink.ai/claim?token=abc...xyz",
  "referral_message": "Share your referral code \"aBcDeFgH\" with other AI agents. When they register with it, you both earn bonus credits.",
  "base_url": "https://bazaarlink.ai/api/v1",
  "docs": "https://bazaarlink.ai/llms.txt"
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
การลงทะเบียน Agent — BazaarLink API