XRToken API 文档

生成独立摘要

API Configuration
After saving, the Try It panel below sends real requests with this key.
Base: api.xrtoken.ai

直接提交文本、转写分段,或同区已有妙记任务 ID,同步返回完整结构化报告。三个输入必须且只能选择一个。无需上传音频,不触发语音识别,也不收取识别时长费用。

model 可省略,当前固定使用 deepseek-v4-flash,按账号可见渠道及实际输入、输出、缓存 token 计费。提交前预冻,完成后结算;格式失败或输出截断仍结算已报告的用量,不自动重试。未取得可用用量时释放预冻;usage.available=false 表示用量未知。billing_status=pending 时用 request_id 核对账务,不要自动重复生成。

task_id 必须是当前账号有权读取且转写已完成的妙记任务:支持 status=succeeded,或 status=failed 且 report v2 保留非空转写、quality.status=unavailable 的摘要失败任务。支持 report v2 或历史标准转写数组;其他原始提供方格式返回 400。重新提炼摘要不重跑识别、不修改原任务。处理中、已取消或转写失败任务返回 409,越权或不存在返回 404。

返回 report.version=2,包含核心速览、分层总结、章节、待办、决策、金句、核对项、图形语义、说话人及原文。原文 ID 和人物引用保持稳定;未知时间不编造。markdown 仅是核心摘要导出。

这是同步接口,不创建可轮询的摘要任务。模型调用上限为 30 分钟,建议客户端超时至少 1920 秒(32 分钟),保存返回结果。 长请求在第 45 秒开始发送合法 JSON 前导空白,此后每 15 秒保活;模型等待超时返回 error.code=summary_timeout。一旦已发出 HTTP 200,后续失败通过 status=failed、error 和 report.quality.status=unavailable 表示,因此始终检查响应体。客户端断开后服务仍完成本次调用并结算观测用量。

请求体最多 2 MiB;原文合计最多 524288 UTF-8 字节、10000 段、1000 位说话人。上传请求体及生成前准备合计最多 30 秒,上传超时返回 HTTP 408。 超出上游上下文能力时明确失败,不截断或分块重试。

POST
/v1/summaries

Authorization

AuthorizationBearer <token>

API 密钥认证(OpenAI 格式)。在 Authorization 请求头中传入:

Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X post "https://api.xrtoken.net/v1/summaries" \  -H "Content-Type: application/json" \  -d '{    "text": "先整理资料,再提交审核。\n我负责尽快准备服务清单。"  }'
{
  "object": "summary",
  "request_id": "string",
  "model": "deepseek-v4-flash",
  "status": "succeeded",
  "created_at": "2019-08-24T14:15:22Z",
  "source_task_id": "b35bfd1f-7440-4b82-b05a-344d469d1482",
  "report": {
    "version": 2,
    "metadata": {
      "title": "string",
      "recordedAt": "string",
      "timezone": "string",
      "durationMs": 0
    },
    "overview": {
      "content": [
        {
          "type": "text",
          "text": "string"
        }
      ],
      "sourceSegmentIds": [
        "string"
      ],
      "verification": "sourced"
    },
    "keyPoints": [
      {
        "content": [
          {
            "type": "text",
            "text": "string"
          }
        ],
        "sourceSegmentIds": [
          "string"
        ],
        "verification": "sourced"
      }
    ],
    "sections": [
      {
        "id": "string",
        "heading": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "paragraphs": [
          {
            "content": [
              {
                "type": "text",
                "text": "string"
              }
            ],
            "sourceSegmentIds": [
              "string"
            ],
            "verification": "sourced"
          }
        ],
        "bullets": [
          {
            "content": [
              {
                "type": "text",
                "text": "string"
              }
            ],
            "sourceSegmentIds": [
              "string"
            ],
            "verification": "sourced"
          }
        ],
        "children": [
          {
            "id": "string",
            "heading": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "paragraphs": [
              {
                "content": [
                  {
                    "type": "text",
                    "text": "string"
                  }
                ],
                "sourceSegmentIds": [
                  "string"
                ],
                "verification": "sourced"
              }
            ],
            "bullets": [
              {
                "content": [
                  {
                    "type": "text",
                    "text": "string"
                  }
                ],
                "sourceSegmentIds": [
                  "string"
                ],
                "verification": "sourced"
              }
            ],
            "children": []
          }
        ]
      }
    ],
    "chapters": [
      {
        "id": "string",
        "heading": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "summary": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "startSegmentId": "string",
        "endSegmentId": "string",
        "startMs": 0,
        "endMs": 0,
        "children": [
          {
            "id": "string",
            "heading": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "summary": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "startSegmentId": "string",
            "endSegmentId": "string",
            "startMs": 0,
            "endMs": 0,
            "children": []
          }
        ]
      }
    ],
    "todos": [
      {
        "id": "string",
        "action": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "assigneeSpeakerId": "string",
        "assignmentQuote": "string",
        "deadline": "string",
        "status": "pending"
      }
    ],
    "decisions": [
      {
        "id": "string",
        "question": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "options": [
          {
            "proposal": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "proposerSpeakerId": "string"
          }
        ],
        "conclusion": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "basis": [
          {
            "content": [
              {
                "type": "text",
                "text": "string"
              }
            ],
            "sourceSegmentIds": [
              "string"
            ],
            "verification": "sourced"
          }
        ],
        "status": "proposed",
        "confirmationQuote": "string"
      }
    ],
    "quotes": [
      {
        "id": "string",
        "text": "string",
        "speakerId": "string",
        "startMs": 0,
        "endMs": 0,
        "reason": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "sourceSegmentIds": [
          "string"
        ]
      }
    ],
    "reviewItems": [
      {
        "id": "string",
        "kind": "proper_noun",
        "originalText": "string",
        "candidates": [
          "string"
        ],
        "sourceSegmentIds": [
          "string"
        ],
        "status": "pending"
      }
    ],
    "visuals": [
      {
        "id": "string",
        "type": "hierarchy",
        "origin": "summary_structure",
        "heading": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "nodes": [
          {
            "id": "string",
            "label": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "children": [
              {
                "id": "string",
                "label": {
                  "content": [
                    {
                      "type": "text",
                      "text": "string"
                    }
                  ],
                  "sourceSegmentIds": [
                    "string"
                  ],
                  "verification": "sourced"
                },
                "children": []
              }
            ]
          }
        ],
        "edges": [
          {
            "id": "string",
            "from": "string",
            "to": "string",
            "relation": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            }
          }
        ],
        "columns": [
          {
            "id": "string",
            "label": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            }
          }
        ],
        "rows": [
          {
            "id": "string",
            "cells": [
              {
                "content": [
                  {
                    "type": "text",
                    "text": "string"
                  }
                ],
                "sourceSegmentIds": [
                  "string"
                ],
                "verification": "sourced"
              }
            ]
          }
        ]
      }
    ],
    "speakers": [
      {
        "id": "string",
        "displayName": "string"
      }
    ],
    "segments": [
      {
        "id": "string",
        "text": "string",
        "startMs": 0,
        "endMs": 0,
        "speakerId": "string"
      }
    ],
    "quality": {
      "status": "complete",
      "issues": [
        {
          "code": "string",
          "path": "string"
        }
      ]
    }
  },
  "markdown": "string",
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "cached_tokens": 0,
    "total_tokens": 0,
    "available": true,
    "billing_status": "settled"
  },
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": "model field is required",
  "type": "invalid_request_error"
}
{
  "error": "invalid or missing API key",
  "type": "auth_error"
}
{
  "error": "insufficient balance -- please top up or upgrade your plan",
  "type": "billing_error"
}
{
  "error": "string",
  "type": "invalid_request_error"
}
{
  "error": "string",
  "type": "invalid_request_error"
}
{
  "error": "string",
  "type": "invalid_request_error"
}
{
  "error": "string",
  "type": "invalid_request_error"
}
{
  "error": "rate limit exceeded",
  "type": "rate_limit_error"
}
{
  "object": "summary",
  "request_id": "string",
  "model": "deepseek-v4-flash",
  "status": "succeeded",
  "created_at": "2019-08-24T14:15:22Z",
  "source_task_id": "b35bfd1f-7440-4b82-b05a-344d469d1482",
  "report": {
    "version": 2,
    "metadata": {
      "title": "string",
      "recordedAt": "string",
      "timezone": "string",
      "durationMs": 0
    },
    "overview": {
      "content": [
        {
          "type": "text",
          "text": "string"
        }
      ],
      "sourceSegmentIds": [
        "string"
      ],
      "verification": "sourced"
    },
    "keyPoints": [
      {
        "content": [
          {
            "type": "text",
            "text": "string"
          }
        ],
        "sourceSegmentIds": [
          "string"
        ],
        "verification": "sourced"
      }
    ],
    "sections": [
      {
        "id": "string",
        "heading": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "paragraphs": [
          {
            "content": [
              {
                "type": "text",
                "text": "string"
              }
            ],
            "sourceSegmentIds": [
              "string"
            ],
            "verification": "sourced"
          }
        ],
        "bullets": [
          {
            "content": [
              {
                "type": "text",
                "text": "string"
              }
            ],
            "sourceSegmentIds": [
              "string"
            ],
            "verification": "sourced"
          }
        ],
        "children": [
          {
            "id": "string",
            "heading": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "paragraphs": [
              {
                "content": [
                  {
                    "type": "text",
                    "text": "string"
                  }
                ],
                "sourceSegmentIds": [
                  "string"
                ],
                "verification": "sourced"
              }
            ],
            "bullets": [
              {
                "content": [
                  {
                    "type": "text",
                    "text": "string"
                  }
                ],
                "sourceSegmentIds": [
                  "string"
                ],
                "verification": "sourced"
              }
            ],
            "children": []
          }
        ]
      }
    ],
    "chapters": [
      {
        "id": "string",
        "heading": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "summary": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "startSegmentId": "string",
        "endSegmentId": "string",
        "startMs": 0,
        "endMs": 0,
        "children": [
          {
            "id": "string",
            "heading": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "summary": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "startSegmentId": "string",
            "endSegmentId": "string",
            "startMs": 0,
            "endMs": 0,
            "children": []
          }
        ]
      }
    ],
    "todos": [
      {
        "id": "string",
        "action": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "assigneeSpeakerId": "string",
        "assignmentQuote": "string",
        "deadline": "string",
        "status": "pending"
      }
    ],
    "decisions": [
      {
        "id": "string",
        "question": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "options": [
          {
            "proposal": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "proposerSpeakerId": "string"
          }
        ],
        "conclusion": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "basis": [
          {
            "content": [
              {
                "type": "text",
                "text": "string"
              }
            ],
            "sourceSegmentIds": [
              "string"
            ],
            "verification": "sourced"
          }
        ],
        "status": "proposed",
        "confirmationQuote": "string"
      }
    ],
    "quotes": [
      {
        "id": "string",
        "text": "string",
        "speakerId": "string",
        "startMs": 0,
        "endMs": 0,
        "reason": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "sourceSegmentIds": [
          "string"
        ]
      }
    ],
    "reviewItems": [
      {
        "id": "string",
        "kind": "proper_noun",
        "originalText": "string",
        "candidates": [
          "string"
        ],
        "sourceSegmentIds": [
          "string"
        ],
        "status": "pending"
      }
    ],
    "visuals": [
      {
        "id": "string",
        "type": "hierarchy",
        "origin": "summary_structure",
        "heading": {
          "content": [
            {
              "type": "text",
              "text": "string"
            }
          ],
          "sourceSegmentIds": [
            "string"
          ],
          "verification": "sourced"
        },
        "nodes": [
          {
            "id": "string",
            "label": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            },
            "children": [
              {
                "id": "string",
                "label": {
                  "content": [
                    {
                      "type": "text",
                      "text": "string"
                    }
                  ],
                  "sourceSegmentIds": [
                    "string"
                  ],
                  "verification": "sourced"
                },
                "children": []
              }
            ]
          }
        ],
        "edges": [
          {
            "id": "string",
            "from": "string",
            "to": "string",
            "relation": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            }
          }
        ],
        "columns": [
          {
            "id": "string",
            "label": {
              "content": [
                {
                  "type": "text",
                  "text": "string"
                }
              ],
              "sourceSegmentIds": [
                "string"
              ],
              "verification": "sourced"
            }
          }
        ],
        "rows": [
          {
            "id": "string",
            "cells": [
              {
                "content": [
                  {
                    "type": "text",
                    "text": "string"
                  }
                ],
                "sourceSegmentIds": [
                  "string"
                ],
                "verification": "sourced"
              }
            ]
          }
        ]
      }
    ],
    "speakers": [
      {
        "id": "string",
        "displayName": "string"
      }
    ],
    "segments": [
      {
        "id": "string",
        "text": "string",
        "startMs": 0,
        "endMs": 0,
        "speakerId": "string"
      }
    ],
    "quality": {
      "status": "complete",
      "issues": [
        {
          "code": "string",
          "path": "string"
        }
      ]
    }
  },
  "markdown": "string",
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "cached_tokens": 0,
    "total_tokens": 0,
    "available": true,
    "billing_status": "settled"
  },
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": "string",
  "type": "invalid_request_error"
}