Skip to main content

Prerequisites

  1. Request an API key from your Illocution contact and store it as ILLOCUTION_KEY.
  2. Have at least one audio or video sample (demo_call.mp4 in the examples below).
  3. Install curl (or Postman) and ensure outbound HTTPS access to your deployment.

Batch Upload in 3 Steps

1. Send the file

curl -X POST https://api.illocution.ai/analyze \
  -H "X-API-Key: $ILLOCUTION_KEY" \
  -F "file=@demo_call.mp4"

2. Inspect the response

(truncated example):
{
  "conversation_id": "analysis_1234abcd",
  "summary": { "overview": "...", "key_insights": ["[00:12] ..."] },
  "timeline": [{ "utterance_id": "utt_0", "speaker": "Speaker_0", ... }],
  "insights": { "overall_sentiment": { "mean": 0.35, "trend": "positive" } }
}

3. Download artifacts

If needed, use the returned artifact_dir to access persisted analysis files.

Realtime Replay Walkthrough

1. Start the SSE stream

curl -N https://api.illocution.ai/analyze/stream \
  -H "Accept: text/event-stream" \
  -H "X-API-Key: $ILLOCUTION_KEY" \
  -F "file=@demo_call.mp4"

2. Listen for events

(sample output):
event: final_transcript
data: {"utterance_id":"analysis_utt_0003","speaker":"Speaker_0","text":"Thanks for joining..."}

event: emotion
data: {"utterance_id":"analysis_utt_0003","emotion":{"joy":0.62,...},"scores":{"valence":0.41,...}}

3. Close the stream

After the done event fires or when idle.

Live Capture End-to-End

1. Start a session

curl -X POST https://api.illocution.ai/analyze/live/start \
  -H "X-API-Key: $ILLOCUTION_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename": "live_demo.wav", "ttl_seconds": 1200}'
Response includes session_id, chunk_endpoint, events_endpoint, and control_endpoint.

2. Upload sequential chunks

(pseudo-example using bash loop):
CHUNK_URL="https://api.illocution.ai/analyze/live/$SESSION_ID/chunk"
seq 0 4 | while read N; do
  curl -X POST "$CHUNK_URL" \
    -H "X-API-Key: $ILLOCUTION_KEY" \
    -F "chunk_seq=$N" \
    -F "chunk=@chunks/$N.pcm"
done

3. Attach to the SSE feed

curl -N https://api.illocution.ai/analyze/live/$SESSION_ID/events \
  -H "Accept: text/event-stream" \
  -H "X-API-Key: $ILLOCUTION_KEY"

4. Finalize when done

curl -X POST https://api.illocution.ai/analyze/live/$SESSION_ID/control \
  -H "X-API-Key: $ILLOCUTION_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"finalize"}'
The SSE client will then receive the final summary_update and done events. These flows can be copied directly into Mintlify pages (“Batch Quickstart”, “Replay Quickstart”, “Live Quickstart”) for customer onboarding.