---
title: "对话结果查询接口"
method: GET
path: "/chat/{id}"
tags: ["ChatResponse"]
---

# 对话结果查询接口

`GET /chat/{id}`

根据请求ID查询对话完成任务的状态和结果，仅后台模式支持

## Path parameters

- `id` string, uuid, required

## Response `200`

成功响应

- object
  - `id` string — 请求ID
  - `status` 'pending' | 'running' | 'succeed' — 请求状态，只有后台模式才会返回
  - `created` integer — 请求创建Unix时间戳
  - `model` string — 对话使用的模型
  - `object` string — 响应对象类型
  - `choices` object[] — 生成的对话列表
    - `index` integer — 对话索引
    - `message` object — 生成的消息
      - `role` 'assistant' — 角色
      - `content` string — 响应内容
      - `reasoning_content` string — 推理内容
      - `audio` object — 音频数据
        - `id` string — 音频唯一识别码
        - `data` string — Base64编码的音频数据
        - `expires_at` integer — 过期Unix时间戳
        - `transcript` string — 音频转录文本
      - `tool_calls` object[] — 工具函数调用列表
        - `id` string — 工具ID
        - `type` 'function' — 工具类型
        - `function` object — 工具函数
          - `name` string — 函数名称
          - `arguments` string — 函数参数
    - `finish_reason` 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'stop_sequence' | 'error' — 结束原因
    - `logprobs` object — 日志概率
      - `content` object[] — 消息内容标记列表
        - `token` string — 令牌
        - `logprob` number — 对数概率
        - `bytes` integer[] — 表示 UTF-8 字节编码的整数列表，代表该标记
        - `top_logprobs` object[] — 最有可能的标记及其在此位置的对数概率列表
          - `token` string — 令牌
          - `logprob` number — 对数概率
          - `bytes` integer[] — 表示 UTF-8 字节编码的整数列表，代表该标记
  - `usage` object — tokens消耗统计
    - `prompt_tokens` integer — 输入文本token数
    - `completion_tokens` integer — 生成文本token数
    - `total_tokens` integer — 总token数
    - `billed_units` integer — 计费次数（搜索）
    - `prompt_tokens_details` object — 输入文本消耗明细
      - `text_tokens` integer — 文本token数
      - `audio_tokens` integer — 音频token数
      - `cached_tokens` integer — 缓存token数
      - `image_tokens` integer — 图片token数
      - `video_tokens` integer — 视频token数
      - `citation_tokens` integer — 引用token数
    - `completion_tokens_details` object — 生成文本消耗明细
      - `text_tokens` integer — 文本token数
      - `audio_tokens` integer — 音频token数
      - `reasoning_tokens` integer — 推理token数
      - `accepted_prediction_tokens` integer — 接受的预测token数
      - `rejected_prediction_tokens` integer — 拒绝的预测token数
  - `citations` string[] — 引用的文献/链接列表
  - `system_fingerprint` string — 系统指纹

## Other responses

- `400` — 参数验证错误
- `401` — 未授权
- `500` — 标准错误响应

---

[API](https://skmtc.dev/geekai/apis/api.md) · [All operations](https://skmtc.dev/geekai/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/geekai/api/revisions/2bf0c8f70a39/schema)
