创建任务:[AI]通过GPT生成PPT
POST
/v1/job/ppt_create_by_gpt
注意
ppt_url
为空/v1/job/get
协议获取任务的最新状态 (推荐每隔5秒请求一次,直到任务成功)请求参数
Header 参数
Authorization
string
认证 key
示例值:
Bearer {{token}}
Body 参数application/json
template_id
string
模板id
示例值:
xxxxxxxxx
speaker
string
演讲者
示例值:
演讲者名称
type
string
必需
model
string
可选
ali
:阿里,deepseek
: "Deepseek" ,默认值:
ali
示例值:
ali
content
string
必需
desc_info
string
可选
默认值:
示例值:
resource_id_list
array[string]
可选
create_preview_image_type
string
可选
null
:无需生成,title
: "标题页" , top3
:"前3张" ,默认值:
null
示例值:
null
示例
{
"template_id": "xxxxxxxxx",
"speaker": "演讲者名称",
"type": "string",
"model": "ali",
"content": "string",
"desc_info": "",
"resource_id_list": [
"xxxx"
],
"create_preview_image_type": "null"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.mindshow.vip/v1/job/ppt_create_by_gpt' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"template_id": "xxxxxxxxx",
"speaker": "演讲者名称",
"type": "string",
"model": "ali",
"content": "string",
"desc_info": "",
"resource_id_list": [
"xxxx"
],
"create_preview_image_type": "null"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
info
string
错误信息
示例值:
succ
data
object
数据区
job
object
任务消息
示例
{
"code": 0,
"info": "succ",
"data": {
"job": {
"id": "1dk13k3hgfk",
"title": "标题",
"status": "succeeded",
"queue_wait_count": 0,
"progress_percent": 0,
"created_at": "2020-01-01T00:00:00+08:00",
"finished_at": "2020-01-01T00:00:00+08:00",
"ppt_url": "string",
"preview_img_list": [
"string"
],
"md_content": "string",
"error": "string"
}
}
}
修改于 2025-04-23 02:56:09