---
name: "getAiFilterTemplates"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.6.27" }
title: "getAiFilterTemplates - 获取宠物写真 AI 模版列表"
---

## getAiFilterTemplates

> [VERSION] @ray-js/ray >= 1.6.27

### 描述

获取宠物写真 AI 模版列表

### 参数

无


### 返回值

类型: `Promise<Object[]>`

Promise，resolve 值为模版数组（templates、type、style 等字段）
| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `templates` | `any` | 模版列表 |
| `type` | `string` | 模版分类类型 |
| `style` | `string` | 模版风格标识 |

### 示例代码

#### 请求示例

```typescript
import { getAiFilterTemplates } from '@ray-js/ray';

getAiFilterTemplates();
```

#### 返回示例

```json
[
  {
    "name": "Ai特效",
    "sort": 2,
    "style": "smartEffects",
    "templates": [
      {
        "code": "pipe",
        "from": "APP",
        "image": "",
        "media_type": "PIC",
        "name": "Pipe",
        "ouput_duration": 5,
        "resource": "",
        "sort": 1
      }
    ]
  }
]
```
