Tài liệu API
Mọi thứ bạn cần để tích hợp công cụ suy luận thời gian thực của PULSE vào nền tảng thương mại điện tử.
Authentication
Learn how to authenticate your API requests
Inference API
Get real-time persona predictions
Product Tagging
Tag products with Digital Twin attributes
Webhooks
Receive real-time event notifications
Base URL
Authentication
All API requests require authentication using an API key. Include your key in theAuthorizationheader.
Security Note: Never expose your API key in client-side code. All inference requests should be made from your backend servers.
Inference API
/v1/inferGet real-time persona inference for a visitor session. Returns persona attributes, confidence scores, and recommended product rankings.
Request Body
{
"session_id": "sess_abc123",
"context": {
"device": "mobile",
"browser": "safari",
"referrer": "instagram.com",
"geo": {
"country": "US",
"region": "CA"
},
"time": "2025-01-14T23:30:00Z"
},
"behavior": {
"search_query": "running shoes under 100",
"filters": ["price:0-100", "rating:4+"],
"viewed_products": ["prod_123", "prod_456"],
"dwell_time_ms": 45000
}
}Response
{
"persona": {
"primary": "value_conscious_runner",
"confidence": 0.89,
"attributes": {
"price_sensitivity": "high",
"brand_loyalty": "low",
"social_proof_reliance": "high",
"purchase_intent": "active"
}
},
"recommendations": {
"product_ids": ["prod_789", "prod_012", "prod_345"],
"rerank_scores": [0.94, 0.91, 0.87]
},
"metadata": {
"inference_time_ms": 32,
"model_version": "v2.3.1"
}
}Product Tagging
/v1/products/tagGenerate Digital Twin tags for your products. Upload product data and receive psychographic attributes for persona matching.
Request Body
{
"products": [
{
"id": "prod_123",
"name": "Performance Running Shoe",
"description": "Lightweight cushioned...",
"price": 129.99,
"category": "footwear/running",
"image_url": "https://..."
}
]
}Webhooks
Configure webhooks to receive real-time notifications for events like persona updates, conversion tracking, and model improvements.
Available Events
- •
session.converted- Conversion attributed to PULSE - •
products.tagged- Product tagging completed - •
model.updated- Inference model improved
Rate Limits
| Plan | Inference API | Tagging API |
|---|---|---|
| Starter | 100 req/sec | 10 req/sec |
| Growth | 500 req/sec | 50 req/sec |
| Enterprise | Custom | Custom |
SDKs & Libraries
JavaScript / Node.js
npm install @pulse-ai/sdkPython
pip install pulse-aiRuby
gem install pulse-aiCần trợ giúp?
Đội ngũ kỹ sư giải pháp của chúng tôi sẵn sàng giúp bạn tích hợp PULSE thành công.