# 创建任务:[非AI]通过JSON结构生成PPT[支持图片/高级单页模版..]

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/job/ppt_create_by_json:
    post:
      summary: 创建任务:[非AI]通过JSON结构生成PPT[支持图片/高级单页模版..]
      deprecated: false
      description: |+


        :::caution

        生成PPT是 **异步任务**

        该请求会生成异步任务, 并返回任务id ,此时的 `ppt_url` 为空


        生成时间预计: **10-20秒**

        需要 后续轮询调用 **获取单个任务数据** `/v1/job/get` 协议获取任务的最新状态 (推荐每隔5秒请求一次,直到任务成功)

        :::

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

        :::caution
        插入高级模版相关文档： [PPT插入单页高级模版流程](https://api-doc.mindshow.vip/doc-6854797.md)
        :::

        JSON格式如下:
        ```typescript

        //封面页
        type ppt_page_data_cover_t = {
            type: 'cover'
            title: string  //标题
            sub_title: string //副标题
            speaker: string //演讲者
            date: string //日期
            remark: string //备注
        }


        //目录页
        type ppt_page_data_menu_t = {
            type: 'menu'
            list: { title: string }[] //目录标题列表
            remark: string //备注

        }

        //章节页
        type ppt_page_data_sub_menu_t = {
            type: 'sub_menu'
            title: string //标题
            list: {
                title: string  //小标题
            }[]
            remark: string //备注

        }
        //内容页
        type ppt_page_data_content_t = {
            type: 'content'
            title: string //标题
            list: {
                title: string  //小标题
                description: string //小标题描述
                image_url_list: string[] //图片地址列表, http:// 或https://
            }[]
           remark: string //备注
        }

        //高级模版页
        type ppt_page_data_advance_t = {
            type: 'advance'
            id: string //高级模版ID
            data: {
               //每个高级模版 私有的数据列表
            }
           remark: string //备注
        }




        //结束页
        type ppt_page_data_finish_t = {
            type: 'finish'
            title: string //标题,一般没有
            speaker: string //
            speaker: string //演讲者
            date: string //日期
            remark: string //备注
        }

        //JSON内容为以上内容的列表
        type ppt_page_data_t = (
            | ppt_page_data_cover_t
            | ppt_page_data_finish_t
            | ppt_page_data_content_t
            | ppt_page_data_advance_t
            | ppt_page_data_menu_t
            | ppt_page_data_sub_menu_t
        )[]



        ```
        案例如下:
        ```json
         [
            {
                "type": "cover",
                "title": "中国传统文化艺术之美",
                "sub_title": "",
                "speaker": "你的姓名",
                "date": "2025-07-17",
                "remark": "中国传统文化艺术之美，承载着中华民族几千年的智慧与精神。今天，我将带大家一起走进这一片瑰丽的世界，感受传统艺术的独特魅力。接下来，让我们先来看一下今天的演讲目录。"
            },
            {
                "type": "menu",
                "list": [
                    {
                        "title": "介绍中国传统文化艺术的丰富内涵和影响"
                    },
                    {
                        "title": "中国传统绘画艺术的魅力"
                    }
                ]
            },
            {
                "type": "sub_menu",
                "title": "介绍中国传统文化艺术的丰富内涵和影响",
                "remark": "中国传统文化艺术是中华民族悠久历史的重要组成部分，蕴含着丰富的思想、情感和智慧。它不仅塑造了中华民族独特的审美观和价值观，也在世界文化舞台上占据着重要地位。这一页我们将聚焦于中国传统文化艺术的丰富内涵，以及它如何影响着我们的生活和社会。接下来，我们将进一步探讨这些文化传统的重要性和现实价值。"
            },
            {
                "type": "content",
                "title": "传统文化的重要性和价值",
                "list": [
                    {
                        "title": "传承千年的文化宝藏",
                        "description": "中国传统文化是一座千年的宝藏，蕴含着丰富的哲学思想、价值观念和审美情趣。这些传统元素是中华民族独特的文化基因，凝聚了历史的智慧和精髓。",
                        "image_url_list": ["https://www.baidu.com/img/flexible/logo/pc/result@2.png"]
                    },
                    {
                        "title": "对现代社会的启示和影响",
                        "description": "　"
                    }
                ]
            },
            {
                "type": "sub_menu",
                "title": "中国传统绘画艺术的魅力"
            },
            {
                "type": "content",
                "title": "国画的独特韵味",
                "list": [
                    {
                        "title": "水墨意境的表达",
                        "description": "水墨意境是国画的灵魂，通过线条、墨色、留白等表现情感与意境。画家在作品中运用“有形无形”的艺术手法，勾勒出深远的意境，引导观者自由想象。"
                    },
                    {
                        "title": "山水、花鸟、人物画的特点",
                        "description": "国传统绘画包括山水、花鸟、人物等多种题材。山水画以“山呼万壑赴碧空”表现大自然壮美，花鸟画以“梅兰竹菊”传递深意，人物画以“以形写神”展现人物性格。"
                    }
                ]
            },
            {
                "type": "content",
                "title": "工笔与写意的艺术表现",
                "list": [
                    {
                        "title": "工笔画的精细技法",
                        "description": "工笔画追求精细写实，要求线条准确、细腻，色彩鲜艳。画家通过层层叠加的颜色和细节描绘，创造出生动逼真的画面，令人陶醉其中。"
                    },
                    {
                        "title": "写意画的意境与自由",
                        "description": "写意画强调意境与表现力，画家以自由的笔墨表现内心情感。通过墨点、墨痕、笔法的变化，创造出富有情感和个性的艺术效果，令人感受到画家的创作情趣。"
                    }
                ]
            },
            {
                "type": "content",
                "title": "画家与作品赏析",
                "list": [
                    {
                        "title": "吴道子的人物风貌",
                        "description": "吴道子以深刻的人物刻画而著称。他通过精湛的线条和丰富的神态表现，勾勒出生动立体的人物形象，展现了人物的性格和情感。"
                    },
                    {
                        "title": "张大千的山水传奇",
                        "description": "张大千是一位跨界艺术家，他的山水画作品充满浪漫主义气息。他通过丰富的色彩和大胆的构图，创造出独特的山水意境，赋予作品深厚的情感内涵。"
                    }
                ]
            },
            {
                "type": "finish",
                "title": "谢谢观看",
                "speaker": "你的姓名",
                "date": "2025-07-17"
            }
        ]


        ```

      tags:
        - PPT生成
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                template_id:
                  description: '模板id, 默认使用智能匹配的模版   '
                  default: ''
                  examples:
                    - 1xxxxxxxxx
                  type: string
                page_list:
                  type: array
                  description: 页面 json 内容
                  items:
                    description: ''
                    type: object
                    properties:
                      type:
                        description: >-
                          页面类型: `cover`,  `menu`,  `sub_menu`,  `content`
                          ,`finish` ，其它参数请看文档说明
                        type: string
                    required:
                      - type
                    x-apifox-orders:
                      - type
                create_ppt_flag:
                  description: '是否生成ppt,  '
                  default: false
                  type: boolean
                aigc_implicit_label:
                  description: '合规性要求( 互联网安全-人工智能合成内容表示的 JSON) 内容:    '
                  default: >-
                    {"Label":"Mindshow","ContentProducer":"Mindshow
                    API","ProduceID":"Mindshow","ReservedCode1":"0","ContentPropagator":"0","PropagateID":"0","ReservedCode2":"1"}
                  type: string
              required:
                - page_list
              x-apifox-orders:
                - template_id
                - page_list
                - create_ppt_flag
                - aigc_implicit_label
      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:
                      job:
                        description: 任务消息
                        type: object
                        properties:
                          id:
                            description: '任务id  '
                            examples:
                              - 1dk13k3hgfk
                            type: string
                          title:
                            description: '标题 '
                            examples:
                              - 标题
                            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
                          ppt_url:
                            description: >-
                              生成ppt 对应的url, 注意：该链接带签名需要完整的链接才能下载,
                              `有效时间为一周,请及时下载到本地`
                            type: string
                          template_id:
                            description: (任务：生成模版才有值) 生成的模版ID, 可用用于后续生成PPT
                            type: string
                          preview_img_list:
                            type: array
                            description: PPT前3张预览图的图片列表, `有效时间为一周,请及时下载到本地`
                            items:
                              description: ''
                              type: string
                          error:
                            description: 任务错误情况下的报错信息
                            type: string
                        required:
                          - id
                          - title
                          - status
                          - queue_wait_count
                          - progress_percent
                          - created_at
                          - finished_at
                          - ppt_url
                          - template_id
                          - preview_img_list
                          - error
                        x-apifox-orders:
                          - id
                          - title
                          - status
                          - queue_wait_count
                          - progress_percent
                          - created_at
                          - finished_at
                          - ppt_url
                          - template_id
                          - preview_img_list
                          - error
                    required:
                      - job
                    description: 数据区
                    x-apifox-orders:
                      - job
                required:
                  - code
                  - info
                  - request_id
                x-apifox-orders:
                  - code
                  - info
                  - request_id
                  - data
          headers: {}
          x-apifox-name: 成功
      security:
        - bearer: []
      x-apifox-folder: PPT生成
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/3930068/apis/api-327732246-run
components:
  schemas: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.mindshow.vip
    description: 正式环境
security:
  - bearer: []

```
