博客
撰写博客
信息
- URL:
/third-part/blog/v2
- 方法:
POST
请求
-
授权:API 密钥
在头部添加参数
X-LP-TOKEN
示例:
X-LP-TOKEN: 2f68dbbf-519d-4f01-9636-e2421b68f379
-
请求体参数
site_id
: 字符串 | 必需- 站点 ID
is_publish
: 布尔值 | 可选 | 默认值: false- 是否发布
author_id
: 字符串 | 可选- 作者 id
version
: 字符串 | 可选 | 默认值: 2- 博客写作引擎版本. 建议使用
latest
- 支持 :
2
,3
,4
,5
,latest
- 博客写作引擎版本. 建议使用
config
: object | 必需- 配置选项
- 内参数:
sitemap
: 字符串 | 可选- 如果您填写sitemap,QuickCreator 将找到 1-5 个相关文章的链接并将其添加到文章末尾。
is_start_external_hyperlink
: 布尔值 | 可选 | 默认值: true- 是否在文章中自动添加外链
is_start_internal_hyperlink
: 布尔值 | 可选 | 默认值: true- W是否在文章中自动添加内链
internal_hyperlink_domain
: 字符串 | 可选- 文章内链来自指定的domain域名下
- 支持链接或域名. 举例:
https://quickcreator.io/blog
orquickcreator.io
is_add_main_image
: 布尔值 | 可选 | 默认值: true- 是否自动添加博客的封面图
is_add_h2_images
: 布尔值 | 可选 | 默认值: true- 是否自动在文章内容中添加图片,开启后,AI会在1到2个合适的H2标题下插入图片
params
: object | 必需- 博客参数
- 内参数:
input_type
: 字符串 | 必需- 表示
p_input
的类型 - 支持
Keyword
: 根据目标主要关键词撰写博客文章Topic
: 根据目标主题撰写博客文章Title
: 用目标标题撰写一篇的博客文章
- 表示
p_input
: 字符串 | 必需- 与 input_type 的类型相对于
- 例子:
input_type
=Keyword
时,p_input
是关键词
target_blog_word_count
: 字符串 | 可选- 设定文章大概生成字数范围
- 支持 :
800-1000
,1000-2000
,2000-3000
language_id
: 字符串 | 可选 | 默认值: en- 设定文章生成语言,采用i18n码代表
- 支持 : 详情请参阅以下列表
is_add_keyword_frequency
: 布尔值 | 可选 | 默认值: false- 是否除主关键词外添加更多相关关键词
is_add_evidence
: 布尔值 | 可选 | 默认值: true- 是否自动添加实时证据和事实来支持写作
additional_knowledge
: 字符串 | 可选- 额外的补充知识,例如您的品牌或产品介绍。
additional_title_prompt
: 字符串 | 可选- 可以指定生成标题时的额外要求
additional_outline_prompt
: 字符串 | 可选- 可以指定生成大纲时的额外要求
additional_section_prompt
: 字符串 | 可选- 可以指定生成文章内容时的额外要求
语言 ID | 语言 |
---|---|
en | 英语 |
zh-CN | 中文(简体) |
zh-TW | 中文(繁体) |
de | 德语 |
es | 西班牙语 |
fr | 法语 |
it | 意大利语 |
pt-PT | 葡萄牙语(葡萄牙) |
pt-BR | 葡萄牙语(巴西) |
nl | 荷兰语 |
pl | 波兰语 |
vi | 越南语 |
hi | 印地语 |
id | 印度尼西亚语 |
ar | 阿拉伯语 |
ru | 俄语 |
ja | 日语 |
tr | 土耳其语 |
th | 泰语 |
el | 希腊语 |
da | 丹麦语 |
cs | 捷克语 |
bg | 保加利亚语 |
ko | 韩语 |
hu | 匈牙利语 |
lt | 立陶宛语 |
ms | 马来语 |
no | 挪威语 |
ro | 罗马尼亚语 |
sv | 瑞典语 |
bo | 藏语 |
示例
{
"site_id": "xxxxxxxxxxxx",
"is_publish": true,
"config": {
"sitemap": "https://quickcreator.io/quthor_blog/sitemap.xml",
"is_start_external_hyperlink": true,
"is_start_internal_hyperlink": true,
"internal_hyperlink_domain": "quickcreator.io",
"is_add_main_image": true,
"is_add_h2_images": true
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": true
}
}
- 示例代码
- Shell
- Java
- Golang
- Python
- HTTP
curl --location --request POST '/third-part/blog/v2' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--data-raw '{
"site_id": "xxxxxxxxxxxx",
"is_publish": true,
"config": {
"sitemap": "https://quickcreator.io/quthor_blog/sitemap.xml",
"is_start_external_hyperlink": true,
"is_start_internal_hyperlink": true,
"internal_hyperlink_domain": "quickcreator.io",
"is_add_main_image": true,
"is_add_h2_images": true
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": true
}
}'
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("/third-part/blog/v2")
.header("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
.header("Content-Type", "application/json")
.body("{\n \"site_id\": \"xxxxxxxxxxxx\",\n \"is_publish\": true,\n \"config\": {\n \"sitemap\": \"https://quickcreator.io/quthor_blog/sitemap.xml\",\n \"is_start_external_hyperlink\": true,\n \"is_start_internal_hyperlink\": true,\n \"internal_hyperlink_domain\": \"quickcreator.io\",\n \"is_add_main_image\": true,\n \"is_add_h2_images\": true\n },\n \"params\": {\n \"input_type\": \"Keyword\",\n \"p_input\": \"best ai writing tools\",\n \"language_id\": \"en\",\n \"target_blog_word_count\": \"800-1000\",\n \"is_add_evidence\": true\n }\n}")
.asString();
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "/third-part/blog/v2"
method := "POST"
payload := strings.NewReader(`{
"site_id": "xxxxxxxxxxxx",
"is_publish": true,
"config": {
"sitemap": "https://quickcreator.io/quthor_blog/sitemap.xml",
"is_start_external_hyperlink": true,
"is_start_internal_hyperlink": true,
"internal_hyperlink_domain": "quickcreator.io",
"is_add_main_image": true,
"is_add_h2_images": true
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": true
}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import http.client
import json
conn = http.client.HTTPSConnection("")
payload = json.dumps({
"site_id": "xxxxxxxxxxxx",
"is_publish": True,
"config": {
"sitemap": "https://quickcreator.io/quthor_blog/sitemap.xml",
"is_start_external_hyperlink": True,
"is_start_internal_hyperlink": True,
"internal_hyperlink_domain": "quickcreator.io",
"is_add_main_image": True,
"is_add_h2_images": True
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": True
}
})
headers = {
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
'Content-Type': 'application/json'
}
conn.request("POST", "/third-part/blog/v2", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
POST /third-part/blog/v2 HTTP/1.1
Host:
User-Agent: Apifox/1.0.0 (https://apifox.com)
Content-Type: application/json
Content-Length: 613
{
"site_id": "xxxxxxxxxxxx",
"is_publish": true,
"config": {
"sitemap": "https://quickcreator.io/quthor_blog/sitemap.xml",
"is_start_external_hyperlink": true,
"is_start_internal_hyperlink": true,
"internal_hyperlink_domain": "quickcreator.io",
"is_add_main_image": true,
"is_add_h2_images": true
},
"params": {
"input_type": "Keyword",
"p_input": "best ai writing tools",
"language_id": "en",
"target_blog_word_count": "800-1000",
"is_add_evidence": true
}
}
响应
- 状态
HTTP 状态码 | 内容类型 |
---|---|
200 | JSON |
- 示例
{
"code": "200",
"body": {
"blogId": "xxdoewreo",
"jobId": "xxx230203200"
}
}
获取博客
信息
- URL:
/third-part/blog/v2/{blogId}
- 方法:
GET
请求
-
授权:API 密钥
在头部添加参数
X-LP-TOKEN
示例:
X-LP-TOKEN: 2f68dbbf-519d-4f01-9636-e2421b68f379
-
路径参数
名称 位置 类型 必需 描述 blogId 路径 string 是 博客接口返回的博客唯一标识符 -
示例代码
- Shell
- Java
- Golang
- Python
- HTTP
curl --location --request GET '/third-part/blog/v2/' --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/third-part/blog/v2/")
.method("GET", body)
.addHeader("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
.build();
Response response = client.newCall(request).execute();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "/third-part/blog/v2/"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("User-Agent", "Apifox/1.0.0 (https://apifox.com)")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import http.client
conn = http.client.HTTPSConnection("")
payload = ''
headers = {
'User-Agent': 'Apifox/1.0.0 (https://apifox.com)'
}
conn.request("GET", "/third-part/blog/v2/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
GET /third-part/blog/v2/ HTTP/1.1
Host:
User-Agent: Apifox/1.0.0 (https://apifox.com)
响应
- 状态
HTTP 状态码 | 内容类型 |
---|---|
200 | JSON |
- 示例
{
"status": "string",
"content": {
"markdown": "string",
"slug": "string",
"seo": {
"title": "string",
"description": "string",
"keywords": "string",
"feature_image": "string"
}
}
}