Resources
Create Resource
http
POST /api/model-resources| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Resource name |
description | string | No | Resource description |
resourceType | int | 否 | Resource type, 1:Image,2:Video,3:Audio, default: 1 |
group_id | int | No | Resource group ID |
url | string | Yes | Resource URL |
bash
curl --location 'https://neolink.com/api/api/model-resources' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "product-demo.png",
"description": "Zhang San",
"group_id": 8,
"url": "https://example.com/product-demo.png"
}'Response:
json
{
"success": true,
"message": "",
"data": {
"uuid": "tkres_b6b6fbfcd79940ecb4d24afee99a4ca9",
"group_id": 8,
"name": "product-demo.png",
"description": "Zhang San",
"busi_type": 1,
"url": "https://example.com/product-demo.png",
"status": 2,
"message": "",
"created_at": 1779332818,
"updated_at": 1779332818,
"deleted_at": null
}
}Status Notes:
- Initial status after creation is
2Processing. - After successful sync, status changes to
1Available. - After sync failure, status changes to
3Failed, with the failure reason inmessage.
Query Resource List
http
GET /api/model-resources| Field | Type | Required | Description |
|---|---|---|---|
p | int | No | Page number, default 1 |
page_size | int | No | Items per page |
group_id | int | No | Filter by resource group |
status | int | No | Filter by resource status |
keyword | string | No | Search by name, description, or UUID |
created_start | int64 | No | Creation start timestamp |
created_end | int64 | No | Creation end timestamp |
bash
curl --location 'https://neolink.com/api/api/model-resources?p=1&page_size=20&group_id=8' \
--header 'Authorization: Bearer <api-key>'Response:
json
{
"success": true,
"message": "",
"data": {
"page": 1,
"page_size": 20,
"total": 1,
"items": [
{
"uuid": "tkres_b6b6fbfcd79940ecb4d24afee99a4ca9",
"group_id": 8,
"name": "product-demo.png",
"description": "Zhang San",
"busi_type": 1,
"url": "https://example.com/product-demo.png",
"status": 1,
"message": "",
"created_at": 1779332818,
"updated_at": 1779332818,
"deleted_at": null
}
]
}
}Query Resource Details
http
GET /api/model-resources/{uuid}bash
curl --location 'https://neolink.com/api/api/model-resources/tkres_b6b6fbfcd79940ecb4d24afee99a4ca9' \
--header 'Authorization: Bearer <api-key>'Response fields are the same as a single resource in the resource list.
Update Resource
http
PATCH /api/model-resources/{uuid}
PUT /api/model-resources/{uuid}Only name, description, and group can be updated.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | New resource name |
description | string | No | New description |
group_id | int | No | New group ID |
bash
curl --location --request PATCH 'https://neolink.com/api/api/model-resources/tkres_b6b6fbfcd79940ecb4d24afee99a4ca9' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "product-demo-v2.png",
"description": "New description"
}'