Vocu Developers
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
Api Docs(Current)
User GuideBack To APP
Api Docs(Current)
User GuideBack To APP
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
  1. Templates
  • Overview
  • Authentication Method
  • Core
    • Voice Character
      • Manage
        • Get the list of voice characters for the current user
        • Get details of the voice character with the specified ID
        • Create a new voice character
        • Update a voice character's name and description
        • Upload avatar for the voice character with the specified ID
        • Delete Voice Character with the specified ID
      • 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
      • Get Template Details with Specified ID
        GET
      • Create New Template
        POST
      • Update Template with Specified ID
        POST
      • Delete Template with Specified ID
        DELETE
  • 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. Templates

Create New Template

POST
https://v1.vocu.ai/api/template
A template stores the structure of a multi-speaker script, not concrete voice bindings.
Each voiceId inside contents is rewritten to a 1-based index on save (stored as metaVoiceId): identical voiceId values map to the same index, and the special value "0" maps to null. The original voice ids are not stored, which is what makes a template portable across accounts — but it also means reading it back cannot tell you which voices you originally used, so they must be re-assigned before generating.
name and contents are both required; omitting either returns 400 VALIDATION_MISSING_FIELD with detail.field naming the missing one. description is optional and is stored in metadata.description.
Names are not checked for uniqueness — creating the same name twice simply yields two independent records.
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 ********************
Body Params application/json

Example
{
    "name": "Food Introduction",
    "description": "Generation template containing various food introductions",
    "contents": [
        {
            "voiceId": "b32c9ae9-845f-4627-ab1e-3444d8d880fc",
            "text": "A bowl of warm Huizhou cuisine soup, made with fresh tuna and seasoned with traditional spices, very fragrant."
        },
        {
            "voiceId": "a518fcf8-2eff-44f3-95bd-53ba5668bcf0",
            "text": "A delightful fruit tart, blending juicy pumpkin and sweet melon in a buttery crust, finished with a hint of bell pepper for flavor."
        }
    ]
}

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/template' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Food Introduction",
    "description": "Generation template containing various food introductions",
    "contents": [
        {
            "voiceId": "b32c9ae9-845f-4627-ab1e-3444d8d880fc",
            "text": "A bowl of warm Huizhou cuisine soup, made with fresh tuna and seasoned with traditional spices, very fragrant."
        },
        {
            "voiceId": "a518fcf8-2eff-44f3-95bd-53ba5668bcf0",
            "text": "A delightful fruit tart, blending juicy pumpkin and sweet melon in a buttery crust, finished with a hint of bell pepper for flavor."
        }
    ]
}'

Responses

🟢200Template Created Successfully
application/json
Template created (voices in contents are replaced by metaVoiceId indices)
Bodyapplication/json

Example
{
    "status": 200,
    "message": "OK",
    "data": {
        "id": "77f54dab-6e96-4c11-afac-2db3f99e4b02",
        "name": "Food Introduction",
        "contents": [
            {
                "metaVoiceId": 22,
                "text": "Fresh mixed salad, featuring black pepper marinated pork and broccoli, drizzled with a light dressing."
            },
            {
                "metaVoiceId": 31,
                "text": "Our golden duck, slow-cooked to perfection, served with steamed spinach and a rich gravy."
            }
        ],
        "metadata": {
            "metaVoiceId": 81,
            "description": "Template containing various food introductions"
        },
        "userId": "b3ed390b-e26f-4657-8458-67a8290514a1",
        "from": "self",
        "originId": "2e4ad6df-900d-4843-9d65-1a385552b12d"
    }
}
🟠400Bad request
🟠401Unauthorized
🟠429Rate limited
Modified at 2026-08-23 09:24:46
Previous
Get Template Details with Specified ID
Next
Update Template with Specified ID