> ## 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.

# 知识库列表

> 获取个人知识库列表，支持分页。点击 **Try it** 按钮可快速试用。



## OpenAPI

````yaml /openapi/openapi.json get /llm-application/open/knowledge
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/knowledge:
    get:
      tags:
        - 知识库 API
      summary: 知识库列表
      description: 获取个人知识库列表，支持分页。点击 **Try it** 按钮可快速试用。
      parameters:
        - name: page
          in: query
          description: 页码，默认1
          schema:
            type: integer
            default: 1
        - name: size
          in: query
          description: 每页数量，默认10
          schema:
            type: integer
            default: 10
      responses:
        '200':
          description: 业务处理成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeListResponse'
        default:
          description: 请求失败。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LlmApplicationError'
components:
  schemas:
    KnowledgeListResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            list:
              type: array
              items:
                $ref: '#/components/schemas/KnowledgeListItem'
              description: 知识库列表
            total:
              type: integer
              description: 知识库总数量
        code:
          type: integer
          description: 响应码，200为成功
        message:
          type: string
          description: 响应信息
        timestamp:
          type: integer
          description: 响应时间戳
    LlmApplicationError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    KnowledgeListItem:
      type: object
      properties:
        id:
          type: string
          description: 知识库id
        embedding_id:
          type: integer
          description: 向量化模型id
        name:
          type: string
          description: 知识库名称
        description:
          type: string
          description: 知识库描述
        contextual:
          type: integer
          description: 是否开启上下文增强
        background:
          type: string
          description: 背景颜色
        icon:
          type: string
          description: 知识库图标
        document_size:
          type: integer
          description: 文档数量
        length:
          type: integer
          description: 分词后总长度
        word_num:
          type: integer
          description: 总字数
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        标准的 HTTP Bearer 认证方式，在 [API
        Keys](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) 页面获取密钥。

````