Push Transcripts to Coval

To push your calls/chats to Coval, you’ll need to add a snippet to wherever you finish your call in the code.

import requests
url = "https://api.coval.dev/eval/transcript"
payload = {
    "transcript": [{ "role": "assistant",
    "content": "<Assistant's response>"
  },
  {
    "role": "user",
    "content": "<User's input>"
  },
  {
    "role": "system",
    "content": "<Tool Call details in JSON format>" }],
    "audio": <wav file>,
    "metrics": {},
    "metadata": {"agent_id": "<string>"}
}
headers = {
    "x-api-key": "API-KEY",
    "Content-Type": "application/json"
}

Push Transcripts to Coval with Vapi End-of-Call Report

If you only want to use Vapi’s end of call report, you can use this example:
the payload is the actual vapi payload, so you can ignore the specific fields inside of it

curl --request POST \
  --url https://api.coval.dev/eval/transcript \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <API_KEY>' \
  --data '{
    "provider": "vapi",
    "payload": {
      "message": {
        "type": "end-of-call-report",
        "artifact": {
          "messages": [],
          "recordingUrl": ""
        }
      }
    },
    "metrics": {
      "metric_type_ai_delay": {}
    }
  }