# 获取任务的pdf文件

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/job/get_pdf:
    post:
      summary: 获取任务的pdf文件
      deprecated: false
      description: |2+

          :::caution
          异步请求: 每隔5秒请求接口一次，直到生成成功
          首次请求需要10-20秒钟时间
          :::


          :::caution
          消耗积分规则： 每次扣除10个积分
          :::



      tags:
        - 任务相关
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  description: '任务id '
                  examples:
                    - 1b3dkf13Ac80
                  type: string
                async_flag:
                  description: 是否异步模式
                  type: boolean
              required:
                - id
                - async_flag
              x-apifox-orders:
                - id
                - async_flag
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                type: object
                title: ResponseModel
                properties:
                  code:
                    type: integer
                    description: 错误码( 0:成功. 其它值:失败[无data数据区])
                  info:
                    type: string
                    description: 错误信息
                    examples:
                      - succ
                  request_id:
                    type: string
                    description: 请求id,用于定位请求
                    examples:
                      - 21al1389334aal4f
                  data:
                    type: object
                    properties:
                      pdf_url:
                        description: pdf 文件地址，请及时保存到本地
                        type: string
                      status:
                        description: >-
                          状态 [ `queued`:排队中, `running`:进行中 ,  `succeeded`:完成,
                          `failed`:失败  ]  
                        examples:
                          - succeeded
                        type: string
                      queue_wait_count:
                        description: 队列等待个数.
                        type: integer
                      progress_percent:
                        description: '进度: 0-100 , status=`running` 有效 '
                        examples:
                          - 0
                        type: integer
                      created_at:
                        description: '任务创建时间 '
                        examples:
                          - '2020-01-01T00:00:00+08:00'
                        type: string
                      finished_at:
                        description: '任务完成时间 '
                        examples:
                          - '2020-01-01T00:00:00+08:00'
                        type: string
                    required:
                      - pdf_url
                      - status
                      - queue_wait_count
                      - progress_percent
                      - created_at
                      - finished_at
                    description: 数据区
                    x-apifox-orders:
                      - pdf_url
                      - status
                      - queue_wait_count
                      - progress_percent
                      - created_at
                      - finished_at
                required:
                  - code
                  - info
                  - request_id
                x-apifox-orders:
                  - code
                  - info
                  - request_id
                  - data
          headers: {}
          x-apifox-name: 成功
      security:
        - bearer: []
      x-apifox-folder: 任务相关
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/3930068/apis/api-287044925-run
components:
  schemas: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.mindshow.vip
    description: 正式环境
security:
  - bearer: []

```
