@squidcloud/client
    Preparing search index...

    Interface CreateAiVoiceSessionRequest

    Request to open a voice session: a phone call the provider relays to a Squid agent in real time. The response carries the relay URL the provider must connect to.

    interface CreateAiVoiceSessionRequest {
        agentId: string;
        chatOptions?: AllAiAgentChatOptions;
        connectTimeoutSeconds?: number;
        externalCallId?: string;
        greeting?: string;
        greetingMode?: "phrase" | "agent";
        metadata?: Record<string, unknown>;
        provider: "openai" | "twilio";
        relayBaseUrl?: string;
    }
    Index
    agentId: string

    The agent that answers the call.

    chatOptions?: AllAiAgentChatOptions

    Chat options applied to every turn of the call: instructions, connected integrations, agent context.

    connectTimeoutSeconds?: number

    How long the relay token stays valid before the provider connects, in seconds. Defaults to 5 minutes.

    externalCallId?: string

    The provider's id of the call (a Twilio CallSid), when known before the provider connects.

    greeting?: string

    What the agent says in agent mode when there is nothing to personalize.

    greetingMode?: "phrase" | "agent"

    agent has the agent open the call once the provider connects; otherwise the provider speaks its own greeting.

    metadata?: Record<string, unknown>

    Free-form data echoed on every session event, for the caller's own bookkeeping.

    provider: "openai" | "twilio"

    The telephony provider that relays the call.

    relayBaseUrl?: string

    Public base URL of the application when it differs from the default, such as a tunnel in local development.