End an AI voice call
Ends the call now and returns its minutes and transcript. Unused minutes go back to your pack. Ending a call twice is safe and counts once. Free to call.
POST
Free to callhttps://api.vedicapi.co/v1/ai/call/{id}/endAuthentication
Send your API key as a Bearer token from your server. Never put the key in an app: start calls and ask questions from your backend. More on keys
Authorization: Bearer $VEDICAPI_KEY
Path parameters
idstringrequiredThe call_id from POST /ai/call.
Examplecall_0fee86c70cbcb627988b1faf
Body parameters
This endpoint takes no parameters.
Response
statusstringstarting, active, ended or failed.end_reasonstringended_by_client, agent_stopped (your user left), max_minutes, no_voice (the voice never came, 0 minutes), or agent_failed.minutesintegerStarted minutes used, never more than max_minutes. 0 when a call under a minute had no voice at all (up to 3 a day).transcriptarrayWhat was said, as role and text. Kept 30 days.
Errors
- 400Codes
invalid_jsonWhenA field is missing or invalid. The message names the field. - 401Codes
missing_keyunknown_keyWhenNo key, or the key is wrong, revoked or past its rotation window. - 403Codes
not_allowedWhenThe key has an allow list and this call came from another IP or domain. - 404Codes
no_such_callWhenNo call with that id on your account.
Every error has one shape: { "error": "<message>", "code": "<code>", "request_id": "req_..." }. Errors and limits