v1

latestOpenAPI 3.0.02026-07-26355125.0 KB
Music Generation

Generate Persona

post/api/v1/generate/generate-persona

Request body

taskIdstring required

Unique identifier of the original music generation task. This can be a taskId returned from any of the following endpoints:

  • Generate Music (/api/v1/generate)
  • Extend Music (/api/v1/generate/extend)
audioIdstring required

Audio ID of the music track to create Persona for.

namestring required

Name for the Persona. A descriptive name that captures the essence of the musical style or character.

descriptionstring required

Detailed description of the Persona's musical characteristics, style, and personality. Be specific about genre, mood, instrumentation, and vocal qualities.

vocalStartnumber

Start time (in seconds) of the audio segment to analyze for Persona generation. Optional. Default value is 0.0. Must be between 0 and the audio duration. The segment length (vocalEnd - vocalStart) must be between 10-30 seconds.

vocalEndnumber

End time (in seconds) of the audio segment to analyze for Persona generation. Optional. Default value is 30.0. Must be between 0 and the audio duration. The segment length (vocalEnd - vocalStart) must be between 10-30 seconds.

stylestring

Music style label to help categorize the Persona. Optional.

Example request

{
  "taskId": "5c79****be8e",
  "audioId": "e231****-****-****-****-****8cadc7dc",
  "name": "Electronic Pop Singer",
  "description": "A modern electronic music style pop singer, skilled in dynamic rhythms and synthesizer tones",
  "vocalEnd": 30,
  "style": "Electronic Pop"
}

Response

Request successful

code200 | 401 | 402 | 404 | 409 | 422 | 429 | 451 | 455 | 500

Response Status Codes

  • 200: Success - Request has been processed successfully
  • 401: Unauthorized - Authentication credentials are missing or invalid
  • 402: Insufficient Credits - Account does not have enough credits to perform the operation
  • 404: Not Found - The requested resource or endpoint does not exist
  • 409: Conflict - Persona already exists for this music
  • 422: Validation Error - The request parameters failed validation checks
  • 429: Rate Limited - Request limit has been exceeded for this resource
  • 451: Unauthorized - Failed to fetch the music data. Kindly verify any access limits set by you or your service provider
  • 455: Service Unavailable - System is currently undergoing maintenance
  • 500: Server Error - An unexpected error occurred while processing the request
msgstring

Error message when code != 200

Example response

{
  "msg": "success",
  "data": {
    "personaId": "a1b2****c3d4",
    "name": "Electronic Pop Singer",
    "description": "A modern electronic music style pop singer, skilled in dynamic rhythms and synthesizer tones"
  }
}