voice
voice

Brain Llm

Vapi-shaped chat-completions endpoint backed by the brain orchestrator.

Path note: Vapi's custom-llm provider treats the configured model.url as a BASE URL and appends /chat/completions (OpenAI convention) when POSTing turn payloads. So the URL we pass in assistant_config is https://.../api/v1/voice/brain-llm/{id} and Vapi actually hits .../brain-llm/{id}/chat/completions. This route's path matches that.

Streaming contract — the response starts BEFORE the brain turn finishes: delta(role=assistant) -> [keepalive chunks while the turn runs] -> delta(content=<next_question>) -> finish_reason=stop

v0.2.17 (Batch A / Stage 2 — A3): the close path (finished / error / timeout) emits the same shape — delta(content) → finish_reason=stop — instead of the previous tool_calls=[{name: "endCall"}] tail that cut TTS mid-sentence. Vapi terminates the call via endCallPhrases (configured in interview_join.py) matched against the brain's natural close phrasing, waiting for the matched-phrase TTS to finish playing before hanging up.

post/api/v1/voice/brain-llm/{interview_id}/chat/completions

Request

  • Base URL: https://api.thebetterhire.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.thebetterhire.ai/api/v1/voice/brain-llm/{interview_id}/chat/completions
  • Auth: none declared

Path parameters

interview_idstring required

Request body

modelstring nullable
streamboolean

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.