**TiktokVoice.net API Overview**

The Voice Generation API provides endpoints for accessing and utilizing advanced voice synthesis models. This API allows users to convert text into high-quality audio using a variety of voice models. It supports multiple languages and offers flexibility in choosing different voice characteristics.

Key Features

Usage

The API is designed to be simple and intuitive, with endpoints for retrieving available models and generating audio. Users can specify the desired voice model and text input to create audio files, which are then accessible via a provided URI.This documentation provides detailed information on the available endpoints, request parameters, and response formats to help you integrate the Voice Generation API into your applications effectively.

Get Available Models

GET /eapi/getmodels

Returns a list of available voice models that can be used for audio generation.

Request Parameters

Parameter Type Required Description
email string Yes The email address associated with your account
api_key string Yes Your API key for authentication

Response Fields Description

Field Type Required Description
ret integer Yes Return code.
0 indicates success
other indicates failed
msg string Yes Response message.
"ok" indicates success
other indicates failed message
reqid string Yes Unique request identifier
common_models array Yes List of available model categories
» modelcat_name string Yes Internal identifier for the model category (e.g. "english", "china")
» modelcat_display string Yes Display name for the model category
» modelcat_data array Yes List of models within this category
»» model_name string Yes Internal identifier for the specific model name
»» model_display string Yes Display name for the specific model

Example Response:

{
  "ret": 0,
  "msg": "ok", 
  "common_models": [
    {
      "modelcat_name": "string",
      "modelcat_display": "string",
      "modelcat_data": [
        {
          "model_name": "string",
          "model_display": "string"
        }
      ]
    }
  ],
  "reqid": "string"
}

Generate Audio

POST /eapi/genaudio

Generates audio from text input using the specified voice model.

Request Parameters (form-data)

Parameter Type Required Description
email string Yes The email address associated with your account
api_key string Yes Your API key for authentication
text string Yes The text to generate audio for
modelcat string Yes The category of the voice model to use,from /eapi/getmodels response modelcat_name
modelname string Yes The specific voice model to use,from /eapi/getmodels response model_name

Response Fields Description

Field Type Description
ret integer Return code indicating the result of the request.
0 indicates success
1 indicates
other indicates failed
msg string Response message describing the result.
"ok" indicates success
other indicates failed message
reqid string Unique request identifier for tracking and debugging purposes
uri string URL path to access the generated audio file

Example Response:

{
  "ret": 0,
  "msg": "ok", 
  "reqid": "202403141234567",
  "uri": "<https://tiktokvoice.net/outimage/wavcl/user123/model1/output.mp3>"
}

Notes