Skip to content

MaaS AIPPT

Public Information

Parameter Description Example
basePath The base path for calling the mass API, including the fixed path of /v1/ai https://genaiapi.cloudsway.net/v1/ai
endpointPath A randomly generated path for calling the mass API HHNTfinSnyMwnUjs
AccessKey Access key for calling the mass API RWxxxxxxxx0Gd

Step 1: Create PPT Task

Request Method

POST

Request Path

{basePath}/v1/ai/{endpointPath}/ppt/task

Request Header

Parameter Description Example
Authorization AccessKey
Bearer ${AccessKey}
Bearer ${AccessKey}

Request Body

Field Name Type Required Description Example Value
type string Yes Task type 1 - Intelligent Generation 1
title string Yes type=1: User input title (mandatory) Shanghai Modern History

Return Value

Field Name Type Description Example Value
message String Return message success
taskId String Task ID

Request Example

curl --location --request POST 'https://genaiapi.cloudsway.net/v1/ai/HHNTfMwnUjs/ppt/task' \
--header 'Authorization: Bearer ${AccessKey}' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Accept: */*' \
--header 'Connection: keep-alive' \
--header 'Content-Type: multipart/form-data; boundary=--------------------------687797548226127803760511' \
--form 'type="1"' \
--form 'title="上海近代史"'

Return Value

{
  "message": "success",
  "taskId": "8924627"
}

Step 2: Retrieve Template List

Request Method

GET

Request Path

{basePath}/v1/ai/{endpointPath}/ppt/export/templates

Request Parameters

Parameter Name Type Required Description Example Value
pageNo int Yes Page number 1
pageSize int Yes Number of tasks displayed per page 5

Request Header

Parameter Description Example
Authorization AccessKey
Bearer ${AccessKey}
Bearer ${AccessKey}

Request Body

None

Return Value

Field Name Type Description Example Value
pagination Object Page information { "total": 7779, "current_page": 1, "page_size": 5 }
pagination.total int Total records 7779
pagination.current_page int Current page 1
pagination.page_size int Records per page 5
list Array Template list [ { "id": 9087, "cover_img": "https://genaiapitool.cloudsway.net/aippt/ppt-sop/0/79/styles/20241225183752993065.jpeg" }, ... ]
list.id int Template ID 9087
list.cover_img String Cover image URL https://genaiapitool.cloudsway.net/aippt/ppt-sop/0/79/styles/20241225183752993065.jpeg

Example

Request

curl --location --request GET 'https://genaiapi.cloudsway.net/v1/ai/uBbDleYzdK/ppt/export/templates?pageNo=1&pageSize=5' \
--header 'Authorization: Bearer ${AccessKey}' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Accept: */*' \
--header 'Connection: keep-alive'

Return Value

{
    "pagination": {
        "total": 7779,
        "current_page": 1,
        "page_size": 5
    },
    "list": [
        {
            "id": 9087,
            "cover_img": "https://genaiapitool.cloudsway.net/aippt/ppt-sop/0/79/styles/20241225183752993065.jpeg"
        },
        {
            "id": 9086,
            "cover_img": "https://genaiapitool.cloudsway.net/aippt/ppt-sop/0/79/styles/20241225183443842579.jpeg"
        },
        {
            "id": 9085,
            "cover_img": "https://genaiapitool.cloudsway.net/aippt/ppt-sop/0/79/styles/20241225183240908222.jpeg"
        },
        {
            "id": 9084,
            "cover_img": "https://genaiapitool.cloudsway.net/aippt/ppt-sop/0/94/styles/20241225185249105916.jpeg"
        },
        {
            "id": 9083,
            "cover_img": "https://genaiapitool.cloudsway.net/aippt/ppt-sop/0/79/styles/20241225182959925460.jpeg"
        }
    ]
}

Step 3: Generate Work and Create Export Task

Request Method

GET

Request Path

{basePath}/v1/ai/{endpointPath}/ppt/export/{taskId}/{templateId}

Request Header

Parameter Description Example
Authorization AccessKey
Bearer ${AccessKey}
Bearer ${AccessKey}

Request Parameters

Field Name Type Required Description Example Value
taskId string Yes Task ID
templateId string Yes Template ID

Return Value

Field Name Type Description Example Value
exportId String Export task ID 7396a510-a277-4b6c-b589-069a674508eb

Example

Request

curl --location --request GET 'https://genaiapi.cloudsway.net/v1/ai/HHNTfwnUjs/ppt/export/8928913/9085' \
--header 'Authorization: Bearer ${AccessKey}' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'content-type: application/json' \
--header 'Accept: */*' \
--header 'Connection: keep-alive' \
--data-raw ''

Successful Return Value

{
  "exportId": "7396a510-a277-4b6c-b589-069a674508eb"
}

Failed Return Value

{
  "error": {
    "code": "1223",
    "message": "Current task is in progress, please try again later"
  }
}

Step 4: Query Export Results

Request Method

GET

Request Path

{basePath}/v1/ai/{endpointPath}/ppt/export/result/{exportId}

Request Parameters

None

Request Header

Parameter Description Example
Authorization AccessKey
Bearer ${AccessKey}
Bearer ${AccessKey}

Request Parameters

Field Name Type Required Description Example Value
exportId string Yes Export task ID

Return Value

Field Name Type Description Example Value
urls Array List of PPT file download links [ "https://genaiapitool.cloudsway.net/aippt/node-server/aippt/2024-12-26/5203808000l0bg0iz0.pptx?Expires=1735207489&OSSAccessKeyId=LTAI5tEC4LwH9eYcd5ANuTnS&Signature=SCgkfBlXq2fMw8n%2BIkY1%2FyjVcak%3D&response-content-disposition=attachment%3Bfilename%2A%3DUTF-8%27%27temp2591233177458140627AuzreOpenAI%25E8%25BF%2590%25E8%2590%25A5%25E5%25B9%25B3%25E5%258F%25B0.pptx" ]

Example

Request

curl --location --request GET 'https://genaiapitool.cloudsway.net/v1/ai/HHNTfinSnyMwnUjs/ppt/export/result/7396a510-a277-4b6c-b589-069a674508eb' \
--header 'Authorization: Bearer ${AccessKey}' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'content-type: application/json' \
--header 'Accept: */*' \
--header 'Connection: keep-alive' \
--data-raw ''

Successful Return Value

{
    "urls": [
        "https://genaiapitool.cloudsway.net/aippt/node-server/aippt/2024-12-26/5203808000l0bg0iz0.pptx?Expires=1735207489&OSSAccessKeyId=LTAI5tEC4LwH9eYcd5ANuTnS&Signature=SCgkfBlXq2fMw8n%2BIkY1%2FyjVcak%3D&response-content-disposition=attachment%3Bfilename%2A%3DUTF-8%27%27temp2591233177458140627AuzreOpenAI%25E8%25BF%2590%25E8%2590%25A5%25E5%25B9%25B3%25E5%258F%25B0.pptx"
    ]
}

Failed Return Value

{
  "error": {
    "code": "1223",
    "message": "Current task is in progress, please try again later"
  }
}