# 作品生成

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/design/v2/save:
    post:
      summary: 作品生成
      deprecated: false
      description: |
        此接口通过任务id，与用户选择或动态匹配的模版数据的模版id生成PPT画布数据并保存作品。
      tags:
        - 作品
      parameters:
        - name: x-api-key
          in: header
          description: ''
          required: true
          example: '{{apiKey}}'
          schema:
            type: string
        - name: x-channel
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: x-token
          in: header
          description: ''
          required: true
          example: '{{token}}'
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  description: |
                    作品名称 （不传默认: 大纲标题）
                  example: 毕业季
                  type: string
                task_id:
                  description: |
                    任务ID
                  example: '{{taskID}}'
                  type: string
                template_id:
                  description: |
                    模版套装id
                  example: '{{templateID}}'
                  type: string
              required:
                - task_id
                - template_id
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: 返回码，0表示成功，非0表示异常
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: 主键ID，后续接口传参用到的 user_design_id
                      name:
                        type: string
                        description: 作品名称
                      cover_url:
                        type: string
                        description: 封面图文件地址
                      size:
                        type: string
                        description: 画布大小
                    required:
                      - id
                      - name
                      - cover_url
                      - size
                    x-apifox-orders:
                      - id
                      - name
                      - cover_url
                      - size
                  msg:
                    type: string
                    description: 返回提示信息
                required:
                  - code
                  - data
                  - msg
                x-apifox-orders:
                  - code
                  - data
                  - msg
              example:
                code: 0
                data:
                  id: 5634
                  name: 毕业季
                  cover_url: >-
                    https://aippt-domestic.aippt.com/aippt-api-server/personal/image/0/4/20231027163605yopnatz.jpeg
                  size: 960x540
                msg: ok
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 作品
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/4285308/apis/api-165850356-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://co.aippt.cn
    description: 正式环境
security: []

```
