REST API
Model voice resources and operations through conventional HTTP boundaries.
Explore API, SDK, WebSocket, webhook, SIP and example concepts through a developer-first surface. Illustrative syntax is clearly labeled until stable contracts are published.
// Illustrative API syntax — example only, not a final contract
const response = await fetch("https://api.4vf.example/v1/agents", {
method: "POST",
headers: {
"content-type": "application/json",
"authorization": "Bearer <token>"
},
body: JSON.stringify({
name: "Support Agent",
language: "en",
tools: ["lookup_order"]
})
});
const agent = await response.json();
Explore the core developer primitives through concise examples while stable API contracts continue to evolve.
Model voice resources and operations through conventional HTTP boundaries.
Wrap common client and server integration patterns with typed developer ergonomics.
Support event-oriented real-time interaction where streaming transport is appropriate.
Notify your systems about lifecycle and workflow events at configured endpoints.
Connect voice infrastructure using established telephony interoperability patterns.
Use clearly labeled illustrative code to understand architecture without presenting unstable syntax as a final contract.
Streaming transport can expose useful runtime events for applications that need to coordinate UI or downstream logic with a voice session.
Observe when voice input starts or stops.
Track model or tool lifecycle events exposed by the runtime.
Keep your UI synchronized with the conversation when appropriate.
// Illustrative event handling
socket.addEventListener("message", (event) => {
const message = JSON.parse(event.data);
if (message.type === "speech.detected") {
console.log("caller is speaking");
}
});
Use webhooks for event delivery and SIP for telephony interoperability where supported by the deployed platform boundary.
Explore concepts and examples in the documentation as stable interfaces continue to evolve.
Read the Docs