---
name: "analyzePetFeature"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.6.27" }
title: "analyzePetFeature - 提交宠物特征分析任务"
---

## analyzePetFeature

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

### 描述

提交宠物特征分析任务

### 参数

`Params`

| 参数 | 类型 | 必填 | 描述 |
| --- | --- | --- | --- |
| `data` | `PetFeatureAnalyze` | 是 | 请求参数：miniAppId、agentId、ownerId 及待分析图片 images（objectKey 列表） |

### 返回值

类型: `Promise<string>`

Promise，resolve 值为异步任务 id（string），用于轮询 getAnalyzePetFeatureResult

### 引用对象

##### `type` PetFeatureAnalyze

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `miniAppId` | `string` | 涂鸦小程序id |
| `agentId` | `string` | 智能体id |
| `ownerId` | `string` | 家庭id |
| `images` | `Object[]` | 图片信息 |

##### `type` PetFeatureAnalyze.images

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `objectKey` | `string` | 图片objectKey |


### 示例代码

#### 请求示例

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

analyzePetFeature({
  miniAppId: 'xxxx',
  agentId: 'xxxx',
  ownerId: 'xxxx',
  images: [
    {
      objectKey: 'xxxx',
    },
  ],
});
```

#### 返回示例

```json
"xxxxxxx"
```
