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

> 获取文档的分段或者分块信息

# Query Document Segment or Chunk Content



## OpenAPI

````yaml post /v1/documents/query-content
openapi: 3.0.2
info:
  title: Duplik Backend
  description: The API for Duplik Backend.
  version: 0.1.0
servers:
  - url: https://api.duplik.cn
security: []
paths:
  /v1/documents/query-content:
    post:
      tags:
        - openapi-document
      summary: Query Document Segment or Chunk Content
      operationId: query_document_content_v1_documents_query_content_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentContentRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentContentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    DocumentContentRequest:
      title: DocumentContentRequest
      type: object
      properties:
        segment_id:
          title: Segment Id
          type: string
        chunk_id:
          title: Chunk Id
          type: string
        document_id:
          title: Document Id
          type: string
        chunk_index:
          title: Chunk Index
          type: integer
    DocumentContentResponse:
      title: DocumentContentResponse
      type: object
      properties:
        content:
          title: Content
          type: string
          default: ''
        metadata:
          title: Metadata
          type: object
    ErrorResponse:
      title: ErrorResponse
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: integer
        message:
          title: Message
          type: string
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````