---
title: "断点续播"
method: GET
path: "/api/ai/agent/sessions/{sessionId}/resume"
tags: ["AI 服务/Agent"]
---

# 断点续播

`GET /api/ai/agent/sessions/{sessionId}/resume`

## Request

- Base URL: `https://aitoearn.cn`
- URL: `https://aitoearn.cn/api/ai/agent/sessions/{sessionId}/resume`
- Auth: API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/aitoearn/apis/aitoearn-api/docs/api/ai/agent/sessions/:sessionId/resume/get.ts> (a function with typed inputs; its response is checked against the schema)

重放进行中的 Agent 会话流。使用 `X-Api-Key` 鉴权。

`Last-Event-ID` 请求头优先于查询参数 `lastEventId`，两者都是与本次运行绑定的 SSE 事件 ID。已完成会话只在流仍保留时可以重放；已中止或流已过期时返回 HTTP 204。响应是 SSE，不使用 `{ code, data }` 包裹。

## Path parameters

- `sessionId` string, required: 会话 ID。

## Query parameters

- `lastEventId` string: 断点续播游标。请求头 Last-Event-ID 优先于本参数。

## Headers

- `Last-Event-ID` string: SSE 断点续播游标，优先于查询参数 lastEventId。

## Response `200`

第三方协议原生响应或 SSE 数据。不使用 AiToEarn 通用响应包裹。

- object: 第三方协议原生响应，不使用 AiToEarn 通用响应包裹。

## Changes

- **2026-11-03** `7cc8f21c4c96`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/aitoearn/apis/aitoearn-api/changes/api/ai/agent/sessions/:sessionId/resume/get.md)

---

[API](https://skmtc.dev/aitoearn/apis/aitoearn-api.md) - [All operations](https://skmtc.dev/aitoearn/apis/aitoearn-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aitoearn/apis/aitoearn-api/revisions/7cc8f21c4c96?raw)
