Skip to content

Reference Script Functions Vtubestudio

Kristopher Barrantes edited this page Nov 5, 2026 · 2 revisions

VTube Studio script functions

Also on the Cuebot Docs site.

Functions for C# (Cb.Call) and Python (a cb method each, or cb.call). See Script functions for how to use them.

A Run Python code step in the action editor

vtubestudio.getCurrentModel

Tells you which model VTube Studio has loaded and where it is on screen. Fails with an error when VTube Studio is not connected.

Gives back: loaded (true/false), name, id, positionX, positionY, rotation and size.

C#

var answer = await Cb.Call("vtubestudio.getCurrentModel");

Python

answer = cb.vtubestudio_get_current_model()

vtubestudio.getExpressions

Lists the face expressions of the model that is loaded now, and which ones are on. Fails with an error when VTube Studio is not connected.

Gives back: A list of expressions. Each has name, file and active (true when it is on).

C#

var answer = await Cb.Call("vtubestudio.getExpressions");

Python

answer = cb.vtubestudio_get_expressions()

vtubestudio.getHotkeys

Lists the hotkeys of the model that is loaded now. Fails with an error when VTube Studio is not connected.

Gives back: A list of hotkeys. Each has id, name, type (what it does) and file.

C#

var answer = await Cb.Call("vtubestudio.getHotkeys");

Python

answer = cb.vtubestudio_get_hotkeys()

vtubestudio.injectParameters

Sets tracking values on your model for a while, like tilting the head or opening the mouth. Your script waits until the time is over.

Value In Python What to put in
parameters parameters The values as text, like "FaceAngleX=20, MouthOpen=1". You can also give an object, like {"FaceAngleX": 20}.
holdSeconds hold_seconds Optional. How many seconds to keep the values, 0 to 3600. Default 1.
mode mode Optional. "add" adds the values to the tracking. Anything else (the default) replaces the tracking values.
faceFound face_found Optional. true tells VTube Studio to act as if it sees your face while the values are sent. Starts as false.

Gives back: true when done.

C#

var answer = await Cb.Call("vtubestudio.injectParameters", new { parameters = "FaceAngleX=20, MouthOpen=1", holdSeconds = 3 });

Python

answer = cb.vtubestudio_inject_parameters(parameters="FaceAngleX=20, MouthOpen=1", hold_seconds=3)

vtubestudio.isConnected

Checks whether Cuebot is connected to VTube Studio and allowed in as a plugin.

Gives back: true while connected and allowed, otherwise false.

C#

var answer = await Cb.Call("vtubestudio.isConnected");

Python

answer = cb.vtubestudio_is_connected()

vtubestudio.loadModel

Switches VTube Studio to another model. Fails with an error when no model has that name or VTube Studio is not connected.

Value In Python What to put in
model model The model's name as VTube Studio shows it, like "Akari", or its id.

Gives back: The id of the model that was loaded.

C#

var answer = await Cb.Call("vtubestudio.loadModel", new { model = "Akari" });

Python

answer = cb.vtubestudio_load_model(model="Akari")

vtubestudio.moveModel

Moves, turns or resizes your model on screen. Values you leave out stay as they are. Fails with an error when VTube Studio is not connected.

Value In Python What to put in
time time Optional. How long the move takes, 0 to 2 seconds. Default 0.5.
relative relative Optional. true moves the model by these amounts from where it is now. false (default) moves it to these exact values.
positionX position_x Optional. Left/right position: -1 is the left edge, 1 is the right edge.
positionY position_y Optional. Up/down position: -1 is the bottom edge, 1 is the top edge.
rotation rotation Optional. How far to turn the model, in degrees, like 15.
size size Optional. The model's size, from -100 (small) to 100 (big).

Gives back: true when done.

C#

var answer = await Cb.Call("vtubestudio.moveModel", new { time = 1, positionX = 0.5, positionY = -0.2 });

Python

answer = cb.vtubestudio_move_model(time=1, position_x=0.5, position_y=-0.2)

vtubestudio.request

Sends any VTube Studio API request and gives back its answer. For advanced users who know VTube Studio's request names.

Value In Python What to put in
messageType message_type The request name, like "StatisticsRequest". Needed.
data data Optional. The request's settings as an object, like {"hotkeyID": "Wave"}.

Gives back: VTube Studio's answer data, or null when it sent none.

C#

var answer = await Cb.Call("vtubestudio.request", new { messageType = "StatisticsRequest" });

Python

answer = cb.vtubestudio_request(message_type="StatisticsRequest")

vtubestudio.setExpression

Turns a face expression on your model on or off, like blush or angry eyes. Fails with an error when VTube Studio is not connected.

Value In Python What to put in
expression expression The expression's name or file, like "Blush" or "Blush.exp3.json".
state state Optional. "On", "Off" or "Toggle" (switch). Default "On".
fadeTime fade_time Optional. How many seconds the change takes to fade in or out. Leave it out for 0.25 seconds.

Gives back: The new state: true for on, false for off.

C#

var answer = await Cb.Call("vtubestudio.setExpression", new { expression = "Blush", state = "On" });

Python

answer = cb.vtubestudio_set_expression(expression="Blush", state="On")

vtubestudio.triggerHotkey

Runs one of your VTube Studio hotkeys, like a wave or an outfit change. Fails with an error when VTube Studio is not connected.

Value In Python What to put in
hotkey hotkey The hotkey's name as VTube Studio shows it, like "Wave", or its id.
itemInstanceId item_instance_id Optional. The id of a Live2D item, to press that item's hotkey instead of the model's. Most people leave it out.

Gives back: The id of the hotkey that ran.

C#

var answer = await Cb.Call("vtubestudio.triggerHotkey", new { hotkey = "Wave" });

Python

answer = cb.vtubestudio_trigger_hotkey(hotkey="Wave")

Clone this wiki locally