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

> 创建一个文档

# Create Document



## OpenAPI

````yaml post /v1/documents/create
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/create:
    post:
      tags:
        - openapi-document
      summary: Create Document
      operationId: create_document_v1_documents_create_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentCreateOfAPI'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentDetailOfAPI'
        '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:
    DocumentCreateOfAPI:
      title: DocumentCreateOfAPI
      required:
        - dataset_id
        - url
        - document_title
      type: object
      properties:
        dataset_id:
          title: Dataset Id
          type: integer
        url:
          title: Url
          type: string
        document_title:
          title: Document Title
          type: string
        smart_indexing_enabled:
          title: Smart Indexing Enabled
          type: boolean
        split_media_enabled:
          title: Split Media Enabled
          type: boolean
        overall_summarize_enabled:
          title: Overall Summarize Enabled
          type: boolean
        meta_data:
          title: Meta Data
          allOf:
            - $ref: '#/components/schemas/DocumentMetaDataOfApi'
          description: document metadata
        pdf_parsing_mode:
          title: Pdf Parsing Mode
          type: integer
        audio_parsing_mode:
          title: Audio Parsing Mode
          type: integer
        priority:
          title: Priority
          type: integer
        read_pdf_pages:
          title: Read Pdf Pages
          type: string
    DocumentDetailOfAPI:
      title: DocumentDetailOfAPI
      required:
        - document_id
      type: object
      properties:
        document_id:
          title: Document Id
          type: integer
        name:
          title: Name
          type: string
        description:
          title: Description
          type: string
        summary:
          title: Summary
          type: string
        url:
          title: Url
          type: string
        process_status:
          title: Process Status
          type: integer
        segment_list:
          title: Segment List
          type: array
          items:
            $ref: '#/components/schemas/DocumentSegmentOfAPI'
        meta_data:
          title: Meta Data
          type: object
    ErrorResponse:
      title: ErrorResponse
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: integer
        message:
          title: Message
          type: string
    DocumentMetaDataOfApi:
      title: DocumentMetaDataOfApi
      type: object
      properties:
        content_at:
          title: Content At
          type: integer
          description: document content time
        entity_names:
          title: Entity Names
          type: array
          items:
            type: string
          description: document entity name
          default: []
        time_periods:
          title: Time Periods
          type: array
          items:
            type: string
          description: document time period
        external_user:
          title: External User
          type: string
          description: external user
        is_sec:
          title: Is Sec
          type: boolean
        document_language:
          title: Document Language
          type: string
        segment_size:
          title: Segment Size
          type: integer
        segment_overlap:
          title: Segment Overlap
          type: integer
        custom_data:
          title: Custom Data
          type: object
    DocumentSegmentOfAPI:
      title: DocumentSegmentOfAPI
      required:
        - segment_num
        - content
      type: object
      properties:
        name:
          title: Name
          type: string
        segment_num:
          title: Segment Num
          type: integer
        content:
          title: Content
          type: string
        start_s:
          title: Start S
          type: integer
        end_s:
          title: End S
          type: integer
        width:
          title: Width
          type: number
        height:
          title: Height
          type: number
        questions:
          title: Questions
          type: array
          items:
            type: string
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````