Video Recordings

Generate a pre-recorded video of your Omniagent speaking — video greetings, training clips, onboarding, and announcements

Recordings must be enabled for your organization before you can create them. Until then, creating a recording fails with a RecordingsApiNotEnabled error. To request access, contact us with your organization ID.

A recording is a pre-recorded video of your Omniagent's avatar speaking text you provide — a video greeting, a training or onboarding clip, or an announcement. Use it anywhere a fixed, pre-recorded clip works better than a live session, so you get the same polished delivery every time.

You supply either text and a voice, or an audio track; the API renders a lip-synced video of the companion that you can preview, download, and reuse. Recordings are generated asynchronously: each one starts as a job that moves through a few states before the video is ready.

Generating a recording

Call POST /public/companions/{companionId}/recordings with a voice and the text for the avatar to speak.

curl -X POST https://companion-api.napster.com/public/companions/comp_abc123/recordings \
  -H "X-Api-Key: $NAPSTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "voiceId": "alloy",
    "text": "Welcome to Acme. In this short clip, I will walk you through everything you need to get started."
  }'

The response returns the recording with a status of pending — the video is rendered in the background.

{
  "id": "rec_xyz789",
  "provider": "openAi",
  "voiceId": "alloy",
  "text": "Welcome to Acme. In this short clip, I will walk you through everything you need to get started.",
  "audioUrl": null,
  "fromFile": false,
  "previewUrl": null,
  "status": "pending",
  "createdAt": 1721433600,
  "updatedAt": 1721433600,
  "tags": null,
  "companion": {
    "id": "comp_abc123",
    "firstName": "Ava",
    "lastName": "Reed"
  }
}

Request parameters

ParameterTypeRequiredDescription
textstringConditionalThe text for the avatar to speak, 84–30,000 characters. Required unless you pass audioUrl.
voiceIdstringConditionalThe voice to speak with — for example alloy, echo, or shimmer. Required with text, except for digital twins, which use their cloned voice when you omit it.
providerstringNoThe voice provider: openAi (default) or elevenLabs. Use elevenLabs to pick a digital twin's cloned voice explicitly, passing its externalId from the companion's customVoices as voiceId.
audioUrlstringConditionalAn http or https URL of an audio file for the avatar to lip-sync to. Use instead of text — see Generating from audio.
tagsobjectNoArbitrary key–value metadata to attach to the recording. Useful for filtering later.

Pass exactly one of text or audioUrl.

Generating from audio

Instead of text, the avatar can lip-sync to audio you provide — a voice-over or a recorded message. The recording uses the audio as is, so voiceId and provider don't apply.

Pass a link to the file as audioUrl:

curl -X POST https://companion-api.napster.com/public/companions/comp_abc123/recordings \
  -H "X-Api-Key: $NAPSTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audioUrl": "https://assets.acme.com/audio/welcome.mp3"
  }'

Or upload the file directly with POST /public/companions/{companionId}/recordings/from-file as multipart/form-data:

curl -X POST https://companion-api.napster.com/public/companions/comp_abc123/recordings/from-file \
  -H "X-Api-Key: $NAPSTER_API_KEY" \
  -F "[email protected]" \
  -F "Tags[campaign]=onboarding"

Both return the recording with a status of pending. Uploaded recordings have fromFile set to true.

audioUrlUpload (from-file)
Maximum size50 MB2 MB
FormatsMP3, WAV, M4A, FLAC, OGG, WebM, MP4MP3, WAV, M4A, FLAC, OGG, WebM, MP4

Recording lifecycle

A recording moves through these status values:

StatusMeaning
pendingThe job is queued.
processingThe avatar video is being rendered.
uploadingRendering finished; the video is being stored.
completedThe video is ready. previewUrl is populated and the download URL is available.
failedRendering did not succeed.

Poll the recording (see below) until status is completed, then use previewUrl to play it inline or request a download URL for the video file.

Retrieving a recording

Fetch a single recording by ID to check its status or read back its details.

curl https://companion-api.napster.com/public/companions/comp_abc123/recordings/rec_xyz789 \
  -H "X-Api-Key: $NAPSTER_API_KEY"
{
  "id": "rec_xyz789",
  "provider": "openAi",
  "voiceId": "alloy",
  "text": "Welcome to Acme. In this short clip, I will walk you through everything you need to get started.",
  "audioUrl": null,
  "fromFile": false,
  "previewUrl": "https://cdn.napster.com/recordings/rec_xyz789.mp4",
  "status": "completed",
  "createdAt": 1721433600,
  "updatedAt": 1721433742,
  "tags": null,
  "companion": {
    "id": "comp_abc123",
    "firstName": "Ava",
    "lastName": "Reed"
  }
}

Listing recordings

List the recordings for a companion. The response is paginated and supports several filters.

curl "https://companion-api.napster.com/public/companions/comp_abc123/recordings?pageSize=20" \
  -H "X-Api-Key: $NAPSTER_API_KEY"
{
  "items": [
    {
      "id": "rec_xyz789",
      "provider": "openAi",
      "voiceId": "alloy",
      "previewUrl": "https://cdn.napster.com/recordings/rec_xyz789.mp4",
      "status": "completed",
      "createdAt": 1721433600,
      "updatedAt": 1721433742,
      "tags": null,
      "companion": {
        "id": "comp_abc123",
        "firstName": "Ava",
        "lastName": "Reed"
      }
    }
  ],
  "filteredCount": 1,
  "totalCount": 1,
  "pageIndex": 0,
  "pageSize": 20,
  "search": null
}

To list recordings across every companion in your project, call GET /public/recordings. It returns the same shape and accepts the same filters, plus companionId:

curl "https://companion-api.napster.com/public/recordings?companionId=comp_abc123&pageSize=20" \
  -H "X-Api-Key: $NAPSTER_API_KEY"

Query parameters

ParameterTypeDescription
companionIdstringGET /public/recordings only. Filter to one companion's recordings.
providerstringFilter by voice provider: openAi or elevenLabs.
voiceIdstringFilter to recordings made with a specific voice.
searchstringFree-text search across the recording text.
tagsobjectFilter by tag values — a map of tag name to a list of matching values, e.g. tags[campaign]=onboarding.
pageIndexintegerZero-based page number.
pageSizeintegerNumber of results per page.

Downloading a recording

Once a recording is completed, request a download URL for the video file. The URL is time-limited, so fetch it when you need it rather than storing it.

curl https://companion-api.napster.com/public/companions/comp_abc123/recordings/rec_xyz789/download-url \
  -H "X-Api-Key: $NAPSTER_API_KEY"
{
  "url": "https://cdn.napster.com/recordings/rec_xyz789.mp4?token=..."
}

Deleting a recording

Remove a recording you no longer need.

curl -X DELETE https://companion-api.napster.com/public/companions/comp_abc123/recordings/rec_xyz789 \
  -H "X-Api-Key: $NAPSTER_API_KEY"

Deleting a recording is permanent. Any content referencing its video URL stops resolving.

Errors

A rejected request returns 400 with one of these codes:

CodeWhen
InvalidRecordingTextLengthtext is shorter than 84 or longer than 30,000 characters.
VoiceIdRequiredYou sent text without a voiceId for a companion that isn't a digital twin.
ClonedVoiceNotAvailableThe digital twin's cloned voice isn't ready yet.
AudioUnsupportedFormatThe audio isn't in one of the supported formats.
AudioTooLargeThe audio is over 50 MB (audioUrl) or 2 MB (upload).
AudioValidationFailedThe audio couldn't be read, or has no audio track.
NoAvailableConnectionsNo rendering capacity is free right now. Retry later.

Sending both text and audioUrl, neither of them, or an audioUrl that isn't an http or https URL returns a 400 validation error.

Next steps

On this page