Skip to content
VoiceMint Developers

Save To History

POST/text-to-speech/save-to-history

Save already generated audio to the user's history. This endpoint allows saving audio that was previously generated but not saved. Args: audio_data: The audio file to save text: The text that was converted to speech voice_id: The voice ID used for generation voice_name: Voice name (display name) format: Audio format (mp3, wav, etc.) duration: Audio duration in seconds current_user: Authenticated user from JWT cookie history_service: TTS history service Returns: Information about the saved entry

Authentication

Authorization: Bearer vm_sk_… with the media.write permission (or all.write). See Authentication.

Parameters

NameInTypeDescription
text*querystring
voice_id*querystring
voice_namequerystring
formatquerystring
durationquerynumber

Request body

multipart/form-data

FieldTypeDescription
audio_data*file

Response

200 application/json

FieldTypeDescription
audio_url*string
created_atstring
duration*number
format*string
textstring
voicestring
{
  "audio_url": "string",
  "created_at": "2026-12-05T10:00:00Z",
  "duration": 0,
  "format": "string",
  "text": "string",
  "voice": "string"
}

Errors

401Missing, wrong, revoked or expired key.
403The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client.
402Not enough credits, or the key reached its spending cap.
422The request failed validation; `detail` lists the fields.
429Over a rate limit; retry after `Retry-After` seconds.

All statuses: Errors.

Example

curl -X POST "https://api.voicemint.io/api/v1/text-to-speech/save-to-history?text=TEXT&voice_id=VOICE_ID" \
  -H "Authorization: Bearer $VOICEMINT_API_KEY" \
  -F "audio_data=@./file"