Quick Start
Quick Start
Simple example to create an analysis.
POST /trpc/analysis.create
Create a new analysis from audio file.
Request
POST https://api.evolu-ai.com/trpc/analysis.create
Content-Type: application/json
X-API-Key: evai_your_key_here
{
"json": {
"salespersonId": "user_xxx",
"audioUrl": "https://your-storage.com/audio.mp3"
}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
salespersonId | string | Yes | ID of the salesperson |
audioUrl | string | Yes* | URL of the audio file (HTTPS) |
audioKey | string | Yes* | Storage key if already uploaded |
transcript | string | Yes* | Text transcript directly |
clientName | string | No | Client name |
clientContact | string | No | Client email or phone |
*One of: audioUrl, audioKey, or transcript is required
Response
{
"result": {
"data": {
"id": "anal_abc123",
"score": 87,
"summary": "Analysis summary here...",
"transcript": "Full transcript...",
"createdAt": "2024-01-15T12:00:00Z"
}
}
}cURL Example
curl -X POST 'https://api.evolu-ai.com/trpc/analysis.create' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: evai_your_key_here' \
-d '{
"json": {
"salespersonId": "user_abc123",
"audioUrl": "https://storage.company.com/call-123.mp3",
"clientName": "John Doe"
}
}'JavaScript Example
const response = await fetch('https://api.evolu-ai.com/trpc/analysis.create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'evai_your_key_here'
},
body: JSON.stringify({
json: {
salespersonId: 'user_abc123',
audioUrl: 'https://storage.company.com/call-123.mp3',
clientName: 'John Doe'
}
})
});
const { result: { data } } = await response.json();
console.log('Analysis ID:', data.id);
console.log('Score:', data.score);Python Example
import requests
response = requests.post(
'https://api.evolu-ai.com/trpc/analysis.create',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'evai_your_key_here'
},
json={
'json': {
'salespersonId': 'user_abc123',
'audioUrl': 'https://storage.company.com/call-123.mp3',
'clientName': 'John Doe'
}
}
)
data = response.json()
print(f"Analysis ID: {data['result']['data']['id']}")
print(f"Score: {data['result']['data']['score']}")Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique analysis ID |
score | number | Overall score (0-100) |
summary | string | Analysis summary |
transcript | string | Full transcript |
salespersonName | string | Name of salesperson |
clientName | string | Client name |
createdAt | string | ISO timestamp |
Error Response
{
"error": {
"message": "Invalid input",
"code": "BAD_REQUEST"
}
}