Skip to main content
Version: 2.0.0

Create Identity

Create a new voice identity profile based on an audio sample.

HTTP Request

POST https://app.resemble.ai/api/v2/identity

Request

ParameterTypeDescription
nameRequiredA name or identifier for the voice identity. This should be a unique string to identify the voice profile.
urlRequiredThe URL of the audio file to create the identity from. Provide a valid HTTPS URL pointing to the audio file.

HTTP Response

{
"success": true,
"item": {
"id": "<string>",
"name": "<string>",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
}

Response Fields

FieldTypeDescription
successbooleanIndicates whether the operation was successful
itemobjectContains details about the created identity
idstringUnique identifier for the created identity
namestringThe name provided for the identity
created_atstringTimestamp of when the identity was created
updated_atstringTimestamp of when the identity was last updated

Example

curl --request POST \
--url https://app.resemble.ai/api/v2/identity \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-type: application/json' \
--data '{
"name": "John Doe",
"url": "https://example.com/audio/john_doe_sample.wav"
}'

Replace YOUR_API_KEY with your actual Resemble AI API key.

Error Handling

If the request is unsuccessful, you will receive an error response. For example:

{
"success": false,
"error": "Invalid audio file format. Please provide a WAV file."
}

Ensure that you provide a valid name and URL, and that the audio file is in a supported format (WAV is recommended).