Vocu Developers
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
Api Docs(Current)
User GuideBack To APP
Api Docs(Current)
User GuideBack To APP
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
  1. Manage
  • Overview
  • Authentication Method
  • Core
    • Voice Character
      • Manage
        • Get the list of voice characters for the current user
          GET
        • Get details of the voice character with the specified ID
          GET
        • Create a new voice character
          POST
        • Update a voice character's name and description
          POST
        • Upload avatar for the voice character with the specified ID
          POST
        • Delete Voice Character with the specified ID
          DELETE
      • Styles
        • Get the transcription of a style's reference audio
        • Add a style to the voice character with the specified ID
        • Correct the transcription of a style's reference audio
        • Update a style's name and description
        • Set a style as the default style
        • Reset a style and reprocess its reference audio
        • Delete Style of the specified ID for the Voice Character with the specified ID
    • Voice Generation
      • Async jobs
        • Get the list of asynchronous generation tasks for the current user
        • Get the details of an asynchronous generation task by ID
        • Create Asynchronous Voice Generation Task
        • Upload audio for voice conversion
        • Delete an asynchronous generation task by ID
      • Synchronous
        • List synthesis parameter presets
        • One-shot synthesis returning an MP3 stream directly
        • Synchronous real-time voice generation
  • Creative
    • Templates
      • Get User's Template List
      • Get Template Details with Specified ID
      • Create New Template
      • Update Template with Specified ID
      • Delete Template with Specified ID
  • Account
    • User
      • Get current user account information
  • Advanced
    • Splitter
      • List splitter configurations
      • Get splitter configuration details
      • Create a splitter configuration
      • Update a splitter configuration (diff mode)
      • Delete a splitter configuration
  • Schemas
    • Generation Template
    • Generation Task
    • Voice Character
    • General Generation Parameters (New)
    • ErrorResponse
  1. Manage

Upload avatar for the voice character with the specified ID

POST
https://v1.vocu.ai/api/voice/{id}/avatar
avatar must be a base64 data-URL string, not a multipart file. The string length is capped at roughly 14 MB, which corresponds to about 10 MB of original image — the limit is applied to the base64 character count (10 MB × 1.37). Exceeding it returns UPLOAD_TOO_LARGE.
The image is checked for safety: a rejection returns SAFETY_* with a traceId in the body, while any decode or processing failure collapses into VALIDATION_INVALID_FORMAT.
On success the avatar URL is written to metadata.avatar — re-uploading for the same voice overwrites the previous image, so CDN caches may take a while to reflect the change.
INFO
Deprecated alias: /api/tts/voice/{id}/avatar. See the site document "Versions and migration".
INFO
See the Errors document for the full code reference. Always use the X-Vocu-App-Request-Id response header when troubleshooting.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Body Params application/json

Example
{
    "avatar": "data:image/png;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMzQ2IiBoZWlnaHQ9IjI3ODAiPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiNjY2E4NjgiLz48dGV4dCB4PSI2NzMiIHk9IjEzOTAiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MTM0NngyNzgwPC90ZXh0Pjwvc3ZnPg=="
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://v1.vocu.ai/api/voice//avatar' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "avatar": "data:image/png;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMzQ2IiBoZWlnaHQ9IjI3ODAiPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiNjY2E4NjgiLz48dGV4dCB4PSI2NzMiIHk9IjEzOTAiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MTM0NngyNzgwPC90ZXh0Pjwvc3ZnPg=="
}'

Responses

🟢200Successfully uploaded avatar
application/json
Avatar updated; returns the updated voice
Bodyapplication/json

Example
{
    "status": 200,
    "message": "OK",
    "data": {
        "id": "042391f5-5887-403f-a42c-1a67680625bc",
        "idForGenerate": "3c83796b-8cc8-4b8e-a3e2-61761d4d258e",
        "name": "Duan Yuhang",
        "status": "pending",
        "metadata": {
            "avatar": "https://picsum.photos/seed/RsqU7i/371/940",
            "description": "Entrepreneur, inventor, activist",
            "prompts": [
                {
                    "id": "31ef37b0-a4b7-4c87-b6d1-4abfe8725027",
                    "name": "Carefree",
                    "promptOriginAudioStorageUrl": "https://storage.vocu.ai/prompt/260913/535265-playback-xe595e.mp3"
                }
            ]
        }
    }
}
🟠400Bad request
🟠401Unauthorized
🟠404Not found
🟠413Payload too large
🟠429Rate limited
🔴500Server error
Modified at 2026-08-23 09:24:46
Previous
Update a voice character's name and description
Next
Delete Voice Character with the specified ID