---
title: GetRequestId接口
description: "获取请求ID。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0068.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0068.html
indexId: 87da8d4a81bb77049b0f3f48b21d2e38645e533ba48475cc941a7a9b7531239258
---
# GetRequestId接口

#### 接口功能

获取请求ID。


#### 接口格式

```
InferRequestId GetRequestId() const
```


#### 接口参数

无。


#### 使用样例

构造一个请求对象，从请求对象中获取请求ID。

```
mindie_llm::InferRequestId runtimeReqId(0);
std::shared_ptr<mindie_llm::InferRequest> runtimeRequest(runtimeReqId);
mindie_llm::InferRequestId RequestId = runtimeRequest->GetRequestId();
```


#### 返回值

InferRequestId对象。
