Characters
Update a character
Change a character's name, appearance, biography and other names — all at once.
PUT
https://api.sangtao.ai/v2/characters/{id}Authorization
X-Api-Keystring · headerrequiredYour API key, from the API keys page of your account.
Path parameters
idstringrequiredThe ID in the path.
Replaces everything: a field you leave out becomes null. To keep a value, send it again. Reference images are not changed.
Body
namestringrequiredUp to 100 characters
appearanceDescriptionstringUp to 1,000 characters
biographystringUp to 2,000 characters
aliasesstringUp to 200 characters
Response
The Character after the change.
Errors
| Status | errorCode | When |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid data — name missing, or a field over its limit |
| 404 | CHARACTER_NOT_FOUND | No such character, or it is not yours |
An error has success: false, errorCode as above, and error is a sentence saying what went wrong.
PUT
/characters/{id}curl -X PUT "https://api.sangtao.ai/v2/characters/ch_3kT9qPz0B" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Mèo Mướp",
"appearanceDescription": "orange tabby cat, chubby body, green eyes",
"biography": null,
"aliases": "Mướp"
}'{
"success": true,
"data": {
"id": "ch_3kT9qPz0B",
"name": "Mèo Mướp",
"appearanceDescription": "orange tabby cat, chubby body, green eyes",
"biography": null,
"aliases": "Mướp",
"publishStatus": null,
"createdAt": "2026-11-08T09:12:44Z",
"updatedAt": "2026-11-08T09:20:01Z",
"refImages": [
{
"id": "ci_8hQ2mZr4K",
"imageUrl": "https://…/a.png",
"thumbnailUrl": "https://…/a_thumb.webp",
"sortOrder": 0
}
]
}
}PUT
/characters/{id}curl -X PUT "https://api.sangtao.ai/v2/characters/ch_3kT9qPz0B" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Mèo Mướp",
"appearanceDescription": "orange tabby cat, chubby body, green eyes",
"biography": null,
"aliases": "Mướp"
}'{
"success": true,
"data": {
"id": "ch_3kT9qPz0B",
"name": "Mèo Mướp",
"appearanceDescription": "orange tabby cat, chubby body, green eyes",
"biography": null,
"aliases": "Mướp",
"publishStatus": null,
"createdAt": "2026-11-08T09:12:44Z",
"updatedAt": "2026-11-08T09:20:01Z",
"refImages": [
{
"id": "ci_8hQ2mZr4K",
"imageUrl": "https://…/a.png",
"thumbnailUrl": "https://…/a_thumb.webp",
"sortOrder": 0
}
]
}
}