# 通过文件上传添加 PDF

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/sources/add-file:
    post:
      summary: 通过文件上传添加 PDF
      deprecated: false
      description: ''
      tags: []
      parameters:
        - name: x-api-key
          in: header
          description: ''
          required: true
          example: sec_xxxxxx
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  example: /path/to/file.pdf
                  type: string
              required:
                - file
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  sourceId:
                    type: string
                required:
                  - sourceId
                x-apifox-orders:
                  - sourceId
              example:
                sourceId: src_xxxxxx
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: ''
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/3750699/apis/api-133094004-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: http://dev-cn.your-api-server.com
    description: 开发环境
  - url: http://test-cn.your-api-server.com
    description: 测试环境
  - url: https://api.chatpdf.com
    description: 正式环境
security: []

```
