> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supernote.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getFileMachineType

> Get the device type that created this note/annotation file.

```ts wrap theme={null}
static getFileMachineType(notePath: string): Promise<APIResponse<number>>;
```

**Parameters**

| Parameter  | Type     | Description               |
| ---------- | -------- | ------------------------- |
| `notePath` | `string` | Note/annotation file path |

**Returns**

* [`APIResponse<number>`](/en/api-reference/supernote-plugin/types/api-response):
  `result` is the device type: `0=A5`, `1=A6`, `2=A6X`, `3=A5X`, `4=Nomad`, `5=Manta`

## Example

```ts wrap theme={null}
import { PluginFileAPI } from 'sn-plugin-lib';

/**
 * Example: get the device type that created this note/annotation file.
 */
export async function exampleGetFileMachineType() {
  const notePath = '/storage/emulated/0/Note/demo.note';

  const res = await PluginFileAPI.getFileMachineType(notePath);
  if (!res.success) {
    throw new Error(res.error?.message ?? 'getFileMachineType call failed');
  }
  return res.result;
}
```
