API Reference
RESTful API for programmatic access to Pulse functionality.
Authentication
All API requests require authentication using a Bearer token:
curl -X POST https://api.pulse.dev/v1/infer/fraud-detector \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": {...}}'Get your API key from the Pulse dashboard or by running pulse auth login.
Base URL
https://api.pulse.devEndpoints
POST
/v1/infer/{model}Run inference on a deployed model
Request Body
{
"input": {
"transaction_amount": 1500.00,
"merchant_category": "electronics"
},
"options": {
"include_metadata": true
}
}Response
{
"id": "inf_abc123",
"model": "fraud-detector",
"version": "1.0.0-def456",
"output": {
"is_fraud": false,
"confidence": 0.12
},
"metadata": {
"latency_ms": 45,
"cached": false
}
}POST
/v1/train/{model}Trigger a training run
Request Body
{
"snapshot": "snap_abc123",
"options": {
"gpu": true,
"notify_on_complete": true
}
}Response
{
"id": "run_xyz789",
"model": "fraud-detector",
"status": "running",
"started_at": "2024-01-15T10:30:00Z",
"snapshot": "snap_abc123"
}POST
/v1/snapshot/{datasource}Create a new data snapshot
Request Body
{
"options": {
"force": false,
"compression": "zstd"
}
}Response
{
"id": "snap_def456",
"datasource": "transactions-db",
"created_at": "2024-01-15T10:30:00Z",
"rows": 1247832,
"size_bytes": 524288000,
"hash": "sha256:e3b0c442..."
}GET
/v1/models/{model}/versionsList model versions
Response
{
"model": "fraud-detector",
"versions": [
{
"version": "1.0.0-def456",
"created_at": "2024-01-15T10:30:00Z",
"status": "deployed",
"metrics": {
"accuracy": 0.9847,
"f1_score": 0.9621
}
},
{
"version": "1.0.0-abc123",
"created_at": "2024-01-10T08:00:00Z",
"status": "archived"
}
]
}GET
/v1/lineage/{id}Get lineage information
Response
{
"id": "inf_abc123",
"type": "inference",
"model": {
"name": "fraud-detector",
"version": "1.0.0-def456"
},
"training": {
"id": "run_xyz789",
"snapshot": "snap_abc123",
"started_at": "2024-01-15T02:00:00Z",
"completed_at": "2024-01-15T02:04:32Z"
},
"datasource": {
"name": "transactions-db",
"type": "postgresql",
"rows": 1247832
}
}Error Handling
All errors follow a consistent format:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Input validation failed",
"details": [
{
"field": "transaction_amount",
"message": "must be a positive number"
}
]
}
}Error Codes
| Code | HTTP Status | Description |
|---|---|---|
| VALIDATION_ERROR | 400 | Invalid input data |
| UNAUTHORIZED | 401 | Invalid or missing API key |
| NOT_FOUND | 404 | Resource not found |
| RATE_LIMITED | 429 | Too many requests |
| INTERNAL_ERROR | 500 | Internal server error |
Rate Limits
API requests are rate limited based on your plan:
| Plan | Requests/min | Burst |
|---|---|---|
| Free | 60 | 10 |
| Pro | 600 | 100 |
| Enterprise | Unlimited | Custom |
SDKs
Official SDKs for popular languages:
# Python
pip install pulse-sdk
# JavaScript/TypeScript
npm install @anthropic/pulse
# Go
go get github.com/anthropic/pulse-go