curl --request POST \
--url https://api.example.com/api/v1/voice/process \
--header 'Content-Type: application/json' \
--data '
{
"audio_url": "<string>",
"parties": [
{}
],
"contract_type": "<string>"
}
'{
"contract_id": "<string>",
"transcript": "<string>",
"terms": {},
"contract_hash": "<string>",
"contract_summary": "<string>",
"processing_status": "<string>",
"confidence_score": 123,
"created_at": "<string>"
}Process recorded audio to extract contract terms and generate a binding agreement
curl --request POST \
--url https://api.example.com/api/v1/voice/process \
--header 'Content-Type: application/json' \
--data '
{
"audio_url": "<string>",
"parties": [
{}
],
"contract_type": "<string>"
}
'{
"contract_id": "<string>",
"transcript": "<string>",
"terms": {},
"contract_hash": "<string>",
"contract_summary": "<string>",
"processing_status": "<string>",
"confidence_score": 123,
"created_at": "<string>"
}.wav, .mp3, .m4a, .oggExample: "https://storage.example.com/recordings/contract_call.mp3"phone: Phone number (string)role: Party role - "buyer" or "seller" (string)name: Full name (string, optional)[
{"phone": "+254712345678", "role": "buyer", "name": "John Kamau"},
{"phone": "+254787654321", "role": "seller", "name": "Mary Wanjiku"}
]
agricultural_supply, service_agreement, loan_agreementtotal_amount: Numeric valuecurrency: Currency code (e.g., “KES”)delivery_date: ISO date stringdelivery_location: Location descriptionquality_requirements: List of quality criteriapayment_terms: Payment conditionscompleted, failed, or partialcurl -X POST https://api.voicepact.com/api/v1/voice/process \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"audio_url": "https://storage.voicepact.com/recordings/call_12345.mp3",
"parties": [
{
"phone": "+254712345678",
"role": "buyer",
"name": "John Kamau"
},
{
"phone": "+254787654321",
"role": "seller",
"name": "Mary Wanjiku"
}
],
"contract_type": "agricultural_supply"
}'
{
"contract_id": "contract_9f8e7d6c5b4a",
"transcript": "Buyer: I would like to purchase 100 bags of maize at 3500 shillings per bag. Seller: I agree to sell 100 bags at 3500 shillings each, delivery by next Friday to Nairobi depot. Quality must be grade A, moisture content below 13.5%...",
"terms": {
"total_amount": 350000,
"currency": "KES",
"quantity": "100 bags",
"unit_price": 3500,
"product": "maize",
"delivery_date": "2026-03-13",
"delivery_location": "Nairobi depot",
"quality_requirements": [
"Grade A maize",
"Moisture content below 13.5%"
],
"payment_terms": "Payment upon delivery"
},
"contract_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"contract_summary": "Agreement for sale of 100 bags of maize at KES 3,500 per bag (total KES 350,000). Delivery by March 13, 2026 to Nairobi depot. Quality: Grade A, moisture below 13.5%.",
"processing_status": "completed",
"confidence_score": 0.94,
"created_at": "2026-03-06T14:23:45.123456Z"
}
{
"detail": "Audio URL is required"
}
{
"detail": "Voice processing failed: Unable to transcribe audio - poor quality"
}
{
"detail": "Voice processing failed: Database connection timeout"
}
confidence_score is above 0.7 for reliable extractioncontract_hash for future verification