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

# lookup 反查暂存响应

```bash curl theme={"theme":{"light":"min-light","dark":"min-dark"}}
curl https://api.poixe.com/v1/recoveries/lookup \
  -H "Authorization: Bearer $POIXE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      { "role": "user", "content": "Prove Fermat'\''s Last Theorem." }
    ],
    "stream": false
  }'
```

```json response theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  "items": [
    {
      "request_id": "2026012919295614181153",
      "created_at": 1769686206,
      "interrupted_reason": "context canceled",
      "request_body_hash": "6ded87ad1c72779a"
    },
    {
      "request_id": "2026012919284634345521",
      "created_at": 1769686134,
      "interrupted_reason": "context canceled",
      "request_body_hash": "6ded87ad1c72779a"
    }
  ]
}
```

POST
`https://api.poixe.com/v1/recoveries/lookup`

当你无法确定 `request_id` 时，可以将当时的 **原始请求 JSON**（不包任何额外字段）提交给本接口，系统会返回可能匹配的暂存记录候选列表。

拿到候选列表中的 `request_id` 后，可以使用 [**获取详情**](https://docs.poixe.com/cn/api-reference/extension-api/recoveries/get.md) 获取完整的暂存内容。

## 鉴权与请求头

所有 API 请求都必须在 HTTP Header 中包含您的 API 密钥。

**Authorization** `string` *required*

Bearer Token。格式为 `Bearer YOUR_API_KEY`。

**Content-Type** `string` *required*

必须设置为 `application/json`。

## 请求体

请求体必须是 **合法 JSON**，并尽量与当时发起上游请求的 JSON 保持一致（字段顺序不要求一致）。

**(raw JSON)** `object` *required*

原始请求 JSON。例如：`{"model":"gpt-4o-mini","messages":[...],"stream":false}`。

## 响应结构

**items** `object[]`

候选暂存记录列表（不返回响应体）。

**items\[] 字段**

**request\_id** `string`

请求 ID，Poixe AI 系统内部使用的唯一标识

**created\_at** `integer`

创建时间（Unix 秒级时间戳）

**interrupted\_reason** `string`

中断原因（如 context canceled）

**request\_body\_hash** `string`

请求体 hash（用于说明匹配依据）

lookup 会对你提交的请求体生成 `request_body_hash` 并进行匹配：系统会将请求体解析为 JSON 对象后，对 **object key 排序**输出稳定 JSON，再做 `sha256`，最后取 **前 8 bytes（16 位 hex）** 作为 hash。

因此它对这些变化不敏感：JSON 格式化差异（空格/缩进/换行）、object 字段顺序不同。

但对这些变化非常敏感（会导致 hash 改变）：任意字段值变化、字段新增/缺失、数组顺序变化（数组是有序的，不会被排序），例如 `messages` 里多一个空格或 `content` 有细微不同也会改变 hash。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.