# 创建任务

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/ai/chat/v2/task:
    post:
      summary: 创建任务
      deprecated: false
      description: ''
      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:
          multipart/form-data:
            schema:
              type: object
              properties:
                content:
                  description: |-
                    type=1、3、4、5、6、8: 不传
                    type=7: 粘贴Markdown内容 （必填）必传）
                  example: ''
                  type: string
                id:
                  description: |-
                    预置词id
                    type=1、3、4、5、6、7: 不传
                    type=8: 预置词列表接口返回的 id字段 （必填）
                  example: ''
                  type: string
                title:
                  description: "\t\ntype=1: 用户输入标题(必填)\ntype=7: 粘贴Markdown的标题（不传默认为: Markdown粘贴文案）\ntype=3、4、5、6、8: 不传"
                  example: 毕业季
                  type: string
                type:
                  description: "\t\n1.智能生成\n3.导入word\n4.XMind导入\n5.FreeMind导入\n6.Markdown导入\n7.Markdown粘贴\n8.预置词"
                  example: '1'
                  type: string
              required:
                - type
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      type:
                        type: integer
                      api_key:
                        type: string
                      created_at:
                        type: string
                    required:
                      - id
                      - title
                      - type
                      - api_key
                      - created_at
                    x-apifox-orders:
                      - id
                      - title
                      - type
                      - api_key
                      - created_at
                  msg:
                    type: string
                required:
                  - code
                  - data
                  - msg
                x-apifox-orders:
                  - code
                  - data
                  - msg
              example:
                code: 0
                data:
                  id: 1
                  title: 毕业季
                  type: 1
                  api_key: 645e1231d1ba5
                  created_at: '2023-10-26T11:05:54.079+08:00'
                msg: success
          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-165832612-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: []

```
