Skip to content

A talking character

Vidu S2-Avatar (reactor/vidu-s2-avatar) turns one photo of a person into a character that talks with a caller in a live call. The character answers through the model’s own language model, shaped by the persona you give it. ViduS2Avatar is its provider over a session, as H3 is H3’s: it reads the model’s snapshot, sends its commands and tells you what answered each one.

The session. reactor.create({ model: ViduS2Avatar.modelName, tokens }), as for any model. Reactor bills the whole session, time between calls included, so close it once the caller is done. On October 2, 2026 Reactor’s pricing API stated 70 credits a second for Vidu S2-Avatar, $0.007 a second: a session capped at two minutes costs at most $0.84.

The provider. ViduS2Avatar.make(session) asks the model for its snapshot and returns once it has one. state is the latest snapshot and changes streams each one; events() streams snapshots, transcripts, the model’s refusals and Diagnostics. Its options are deadlines: replyTimeout (10 seconds), uploadTimeout, avatarTimeout and callTimeout (60 seconds each).

The avatar. createAvatar(image) makes an avatar from a photo of one person, full or half body, and binds it to the session. Give it { bytes, type } (PNG, JPEG, WebP or HEIC), which the session uploads first, or { url }, which the model fetches. It returns once the model reports the avatar ready. Keep its avatar_id: attachAvatar(avatarId) binds the same avatar in a later session.

The call. startCall(call) returns once the call is live. A Call has a persona and, optionally, a voice from listVoices, a greeting, a language, callMode, transcripts, personaEnhance, vad (turn-taking) and llm (reply generation). As the call goes live, the provider resumes the character’s main_video and main_audio tracks on the connection, as Reactor’s tutorial does at every live; without that, the first paid run got the character’s voice and none of its picture.

During the call. say(text) is text the character answers as if the caller had said it. interrupt stops the character mid-sentence. updateCall changes the voice, persona, vad or llm together and returns the settings the model applied. setReferenceImages and clearReferenceImages give the character up to three things to hold or wear, or a background.

The end. endCall returns the call’s end_reason and duration_seconds once the model has released the call. The avatar stays bound, so the next startCall needs no new avatar.

Tracks. ViduS2Avatar.tracks names them: mic and webcam go to the character, main_video and main_audio come from it. callMode: "audio", the model’s default, forwards the mic; "video" also forwards the webcam, so the character can see the caller. The character’s own picture comes in both modes.

The avatar example runs this offline with no key, and on hosted Reactor with REACTOR_API_KEY and AVATAR_PHOTO set:

  1. Watch the transcripts. Subscribe before the call, so the greeting is heard. Here the character’s finished lines go to a queue the program waits on:

    const lines = yield* avatar.events().pipe(
    Stream.filter((event) => event._tag === "Transcript"),
    Stream.map((event) => event.transcript),
    Stream.filter((line) => line.final && line.speaker === "character"),
    Stream.toQueue({ capacity: "unbounded" }),
    );
  2. Make the avatar and read the picture.

    const ready = yield* avatar.createAvatar({ bytes, type: "image/jpeg", name: "Tina" });
    const media = yield* session.decoded;
    yield* media.video(ViduS2Avatar.tracks.video).pipe(
    Stream.runForEach((frame) => Console.log(`${frame.width}x${frame.height}`)),
    Effect.forkScoped,
    );
  3. Call, greet, ask, hang up.

    yield* avatar.startCall({ persona, greeting: "Say hello and introduce yourself." });
    yield* Queue.take(lines); // the greeting
    yield* avatar.say("What lives in the deepest tank?");
    yield* Queue.take(lines); // the answer
    const ended = yield* avatar.endCall;
    yield* session.close;

On Node the caller speaks only through say. The native host decodes what it receives and can’t publish a track, so it can’t send a microphone.

A browser can send the caller’s microphone: publish it on mic with BrowserMedia.tracks, before the call, as Reactor’s tutorial does.

const stream = yield* Effect.promise(() =>
navigator.mediaDevices.getUserMedia({
audio: { echoCancellation: true, noiseSuppression: true, channelCount: 1 },
}),
);
const tracks = yield* BrowserMedia.tracks(session);
yield* tracks.publish(ViduS2Avatar.tracks.mic, stream.getAudioTracks()[0]);
yield* avatar.startCall({ persona });

The model refuses a command with command_error, which names the command but not the request. So the provider sends commands one at a time, and fails a refused one with a CommandFailure whose reason is Refused: the model’s code (NOT_LIVE or INVALID_INPUT, for example), origin and retryable, and the outcome replied. Another client of the same session sending a command of the same name at that moment can be mistaken for it.

Input outside the model’s documented ranges fails with InvalidInput before anything is sent, with the outcome not-submitted. The provider never sends an explicit null: hosted Vidu answered one with an invalid_command error frame.

ReactorTest simulates Vidu S2-Avatar beside H3, from the same layer: avatars, calls, a synthetic picture once the call’s tracks are resumed, placeholder lines (Greeting 1., Answer 2 to: ...), and refusals as hosted answered them, clone_voice’s CLONING_DISABLED included. Timing.hosted uses the first paid run’s timings: an avatar in 25–28 s, a call live in 2.7–4.3 s and end_call answered after 13–13.5 s. Timing.fixed takes avatar, call, answer, speech and hangup for a test. A rehearsal on it is never evidence of what hosted Reactor does.

Two paid runs of the avatar probe, on 2026-10-01 and 2026-10-02, drove the model’s commands through the raw Session under Bun on Linux x64. The probe’s second run passed every criterion:

  • The picture came 0.20 s after both tracks were resumed at live, at 24.9 fps, in frames of 928×1088 and of 640×360. On the same connection, the second call’s picture came 0.11 s after live with nothing done. The first run, which resumed no track at live, got no picture.
  • The voice came as 48 kHz mono PCM. The character’s first transcript came 2.5 s after live, and its answer’s sound about 3.1–3.4 s after a say.
  • The avatar was ready 2.1 s after create_avatar, against 26.7 s on the first run, from the same photo. A call was live 2.7–4.5 s after start_call.
  • end_call was answered 6.9 s and 7.4 s after it was sent, and 13.2 s on the first run, past the 10-second reply deadline; endCall waits callTimeout for it.
  • A refusal was acknowledged, with its command_error arriving first; an empty say and a command carrying a null got an invalid_command error frame instead.
  • call_max_seconds read 7200, and update_call to another voice answered in 0.24 s.
  • list_voices listed 56 voices. clone_voice is declared but was refused with CLONING_DISABLED, and the provider has no operation for it.

The provider itself ran in two paid runs of the character check on 2026-10-02, on Effect 4.0.0 under Bun. One passed every criterion: make in 0.04 s, the avatar in 3.3 s, the call live 3.2 s after startCall with the picture through the provider’s own resume, an answer to say, and endCall in 8.7 s. In the other, make’s first command went out 6 ms after the connection was ready, and 21 ms later the native addon failed the connection with a Protocol failure, so the command’s outcome was unknown. Its cause is not known yet: the addon raises that failure for a data channel message that is not binary or a remote track nobody declared, and the run’s evidence kept neither text. The example has not run on hosted Reactor itself.

  • One command at a time. A command waiting for its answer holds the next one, so interrupt sent during an endCall waits for it.
  • No microphone from Node. On Node and Bun the caller speaks through say only.
  • Reconnect media has varied on hosted Reactor. On 2026-10-03, one paid rejoin run of the 0.10.0 SDK recorded a 1.814 s reconnect interval during a live call. Generation 2 delivered its first decoded video frame 76 ms and its first audio block 53 ms after reconnect; 246 frames and 804 blocks arrived in a 9.994 s observation window. The runner’s greatest timer lateness was 0.3 ms, and no provider diagnostic or Protocol failure was recorded (the record). The 2026-10-01 probe reconnected because its picture was absent and resumed tracks differently: one reconnect took 82 s, and a replacing connection carried state and transcripts without picture or voice. This one successful run neither explains that failure nor establishes reconnect reliability.
  • Not yet qualified on hosted Reactor: a caller’s microphone or webcam, callMode: "video", reference images, persona and vad updates, personaEnhance, and whether Reactor ends a Vidu session at its cap.