Skip to content

Engine.Invoke

Invoke Model Engine of target feature.

HTTP request

POST https://api.trinity.sosono.ai/v1/engines/{engine_id}

Path parameters

Parameters Description
engine_id string
Required. Lyrics Swap Voice Model Engine Id, it's unique to different singer and language

Authorization

Authorization: Bearer <JWT/ST>

Request Header

Content-Type: application/json

Request body

Please refer to the specific model engine for the request body fields.

Example

curl --location 'https://api.trinity.sosono.ai/v1/engines/5A22C6DFE641404096876E9928EA1294.hikari' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT/ST>' \
--data '{
    "lyrics": [
        "something like you",
        "all about you"
    ],
    "bgm_index": 0,
    "model_version": "v1"
}'

Response body

The response structure is based on Engine Response.

Fields Description
usages EngineUsages
the usage of engine execution
refs object
the references of engine execution, exist when show_refs is true
result object
contain the result of engine execution

The result of each engine execution would be wrapped into result field.

Please refer to the specific model engine for the response result fields.

Example

Lyrics Swap
{
  "usage": {
    "energy": {
      "request": 0,
      "response": 23,
      "service": 0,
      "total": 23
    }
  },
  "result": {
    "code": "0000",
    "duration": 23.33,
    "lyrics": [
      "SP a shi ta he n o mi chi SP",
      "SP a ru ki tsu zu ke ta shi n go u SP",
      "SP ga ku shu u su ru chi n o u SP",
      "SP chi ha tsu zu ku ha te ma de mo SP",
      "SP byo u ki ga ko wa i ga SP",
      "SP cha n su n a shi ka SP",
      "SP cha ra cha ra shi ta ya tsu cha n to shi te cha i n a ga do ko ka SP",
      "SP cha ri n o to shi ta ra SP"
    ],
    "message": "SUCCESS",
    "mix_data_url": "data:audio/wav;base64,UklGRhClQQBXQVZFSlV...",
    "uuid": "9e413155-1a1c-44aa-868e-767ab44f430e"
  }
}

Error Response Body

Refer to Error Response