GET https://lxapi.lexiangla.com/cgi-bin/v1/ai-trains?limit=100&status=published&page=1
Content-Type: application/json
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
limit | 是 | 无 | 每页个数限制为1 ~ 200 |
status | 是 | 无 | 陪练状态;draft 草稿状态、published 发布状态 |
page | 否 | 无 | 分页页码 |
title_like | 否 | 无 | 支持场景名称模糊匹配过滤 |
{
"data": [
{
"type": "ai_train",
"id": "525b258cad4048b3917xxxxxxxxxxx",
"attributes": {
"created_from": "team",
"is_from_roadmap": true,
"title": "k吧AI陪练",
"status": "published",
"source": "manual",
"created_at": "2025-06-04 17:25:52"
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "LX001"
}
},
"category": {
"data": {
"type": "category",
"id": "089faf08354211f0xxxxxxxxxxx"
}
}
}
}
],
"links": {
"first": "https://lxapi.lexiangla.net/cgi-bin/v1/ai-trains?lxxxxxxxxxxxxxxxx",
"last": "https://lxapi.lexiangla.net/cgi-bin/v1/ai-trains?lxxxxxxxxxxxxxxxx",
"prev": "https://lxapi.lexiangla.net/cgi-bin/v1/ai-trains?lxxxxxxxxxxxxxxxx",
"next": "https://lxapi.lexiangla.net/cgi-bin/v1/ai-trains?lxxxxxxxxxxxxxxxx"
},
"meta": {
"current_page": 2,
"from": 2,
"last_page": 356,
"path": "https://lxapi.lexiangla.net/cgi-bin/v1/xxxxxxxxx",
"per_page": 1,
"to": 2,
"total": 356
}
}
{
"errors": [
{
"detail": "{\"status\":[\"不能为空\"],\"status\":[\"选定的 status 是无效的.\"]}"
}
]
}
{
"errors": [
{
"detail": "{\"limit\":[\"不能为空\"],\"limit\":[\"limit 必须在 1 和 200 之间.\"]}"
}
]
}
参数说明:
参数 | 说明 |
---|---|
id | 场景ID |
attributes.created_from | 创建入口,platform 表示平台,team 表示k吧 |
attributes.is_from_roadmap | 是否来源项目, |
attributes.title | 场景名称 |
attributes.status | 状态,draft表示草稿状态、published表示发布状态 |
attributes.source | manual 表示通用场景,medicine_recommend 表示探需推介场景,prompt 表示提示词模式 |
attributes.created_at | 创建时间 |
relationships.owner.data.id | 创建人账号id |
relationships.category.data.id | 陪练所属分类id |
GET https://lxapi.lexiangla.com/cgi-bin/v1/ai-trains/{id}
Content-Type: application/json
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
id | 是 | 无 | 场景id |
{
"data": {
"type": "ai_train",
"id": "737aa5423f4f473e9c6c5d462xxxxxxx",
"attributes": {
"created_from": "platform",
"is_from_roadmap": true,
"title": " 标题测试 123",
"status": "published",
"source": "manual",
"created_at": "2025-06-16 11:11:26"
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "LX001"
}
}
}
}
}
参数说明:
参数 | 说明 |
---|---|
attributes.created_from | 创建入口,platform 表示平台,team 表示k吧 |
attributes.is_from_roadmap | 是否来源项目, |
attributes.title | 场景名称 |
attributes.status | 状态,draft表示草稿状态、published表示发布状态 |
attributes.source | manual 表示通用场景,medicine_recommend 表示探需推介场景,prompt 表示提示词模式 |
attributes.created_at | 创建时间 |
relationships.owner.data.id | 创建人账号id |