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

# 文档详情

> 根据文档`ID`获取文档详情。点击 **Try it** 按钮可快速试用。



## OpenAPI

````yaml /openapi/openapi.json get /llm-application/open/document/{id}
openapi: 3.0.1
info:
  title: ZHIPU AI API
  description: ZHIPU AI 接口提供强大的 AI 能力，包括聊天对话、工具调用和视频生成。
  license:
    name: ZHIPU AI 开发者协议和政策
    url: https://chat.z.ai/legal-agreement/terms-of-service
  version: 1.0.0
  contact:
    name: Z.AI 开发者
    url: https://chat.z.ai/legal-agreement/privacy-policy
    email: user_feedback@z.ai
servers:
  - url: https://open.bigmodel.cn/api/
    description: 开放平台服务
security:
  - bearerAuth: []
tags:
  - name: 模型 API
    description: Chat API
  - name: 工具 API
    description: Web Search API
  - name: Agent API
    description: Agent API
  - name: 文件 API
    description: File API
  - name: 知识库 API
    description: Knowledge API
  - name: 实时 API
    description: Realtime API
  - name: 批处理 API
    description: Batch API
  - name: 助理 API
    description: Assistant API
  - name: 智能体 API（旧）
    description: QingLiu Agent API
paths:
  /llm-application/open/document/{id}:
    get:
      tags:
        - 知识库 API
      summary: 文档详情
      description: 根据文档`ID`获取文档详情。点击 **Try it** 按钮可快速试用。
      parameters:
        - name: id
          in: path
          required: true
          description: 文档id
          schema:
            type: string
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeDocumentDetailResponse'
              example:
                data:
                  id: '12121212121212'
                  knowledge_type: 1
                  custom_separator:
                    - |+

                  sentence_size: 300
                  length: 0
                  word_num: 100
                  name: ''
                  url: ''
                  embedding_stat: 0
                  failInfo:
                    embedding_code: 10002
                    embedding_msg: 字数超出限制
                code: 200
                message: 请求成功
                timestamp: 1689649504996
        default:
          description: 请求失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LlmApplicationError'
components:
  schemas:
    KnowledgeDocumentDetailResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/KnowledgeDocumentItem'
        code:
          type: integer
          description: 状态码
        message:
          type: string
          description: 返回信息
        timestamp:
          type: integer
          description: 时间戳
    LlmApplicationError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    KnowledgeDocumentItem:
      type: object
      properties:
        id:
          type: string
          description: 文档id
        knowledge_type:
          type: integer
          description: 文档切片类型
        custom_separator:
          type: array
          items:
            type: string
          description: 自定义分隔符
        sentence_size:
          type: integer
          description: 切片字数
        length:
          type: integer
          description: 文档长度
        word_num:
          type: integer
          description: 字数
        name:
          type: string
          description: 文档名称
        url:
          type: string
          description: 文档URL
        embedding_stat:
          type: integer
          description: 向量化状态
        failInfo:
          $ref: '#/components/schemas/KnowledgeDocumentFailInfo'
    KnowledgeDocumentFailInfo:
      type: object
      properties:
        embedding_code:
          type: integer
          description: 向量化失败状态码
        embedding_msg:
          type: string
          description: 向量化失败信息
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        标准的 HTTP Bearer 认证方式，在 [API
        Keys](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) 页面获取密钥。

````