---
title: "Invoke"
description: "Low-level command invocation for advanced API usage."
source: https://liatir.com/plugins/api/invoke
---

# Invoke

`Liatir.invoke()` calls a low-level bridge command directly.

Use it only when:

- the API has no typed wrapper for what you need;
- you know the command name and payload contract;
- you can handle app-version changes.

Prefer typed namespaces for public plugin code.

## Signature

### Node

```ts
invoke<T = unknown>(cmd: string, payload?: Record<string, unknown>): Promise<T>
```


### Python

```python
invoke(cmd, payload=None) -> any
```


## Example

### Node

```ts
const result = await Liatir.invoke('some_command', {
  some_input: 42
});

console.log('Result:', result);
```


### Python

```python
result = ctx.liatir.invoke('some_command', {
    'some_input': 42
})

print('Result:', result)
```


## Notes

Typed namespaces are more stable and easier to understand and should be preferred. Treat `invoke()` as
an **escape hatch for advanced integrations**.
