@pouchy_ai/companion-sdk - v0.1.0
    Preparing search index...

    Type Alias CallCredentials

    CallCredentials:
        | {
            agentId: string;
            firstMessage?: string;
            instructions: string;
            language?: string;
            provider: "elevenlabs-convai";
            token: string;
            voice?: string;
        }
        | {
            clientSecret: string;
            expiresAt: number
            | null;
            model: string;
            provider: "openai-realtime";
            voice: string;
        }

    Voice-plane credentials, discriminated by provider (see startCall).

    Type Declaration

    • {
          agentId: string;
          firstMessage?: string;
          instructions: string;
          language?: string;
          provider: "elevenlabs-convai";
          token: string;
          voice?: string;
      }
      • agentId: string
      • OptionalfirstMessage?: string

        First-message override ('' = suppress the canned greeting so the call opens in-character / context-aware). Pass as overrides.agent.firstMessage.

      • instructions: string

        Pass as overrides.agent.prompt.prompt when starting the EL session.

      • Optionallanguage?: string

        Server-resolved agent language (ISO 639-1, e.g. 'zh'). Pass as overrides.agent.language so the call opens in the user's language.

      • provider: "elevenlabs-convai"
      • token: string

        EL conversation token (open WebRTC with @elevenlabs/client).

      • Optionalvoice?: string

        Server-resolved EL voice id (the user's cloned/localized voice). Pass as overrides.tts.voiceId so the call isn't a stock default voice.

    • {
          clientSecret: string;
          expiresAt: number | null;
          model: string;
          provider: "openai-realtime";
          voice: string;
      }
      • clientSecret: string

        Ephemeral client secret (ek_…); open WebRTC directly to OpenAI.

      • expiresAt: number | null
      • model: string
      • provider: "openai-realtime"
      • voice: string