{"slug":"stablevoice-dev-api-recording-tokens-de6a80","title":"Mint a browser recording URL for a StableUpload slot","host":"stablevoice.dev","method":"POST","resource":"https://stablevoice.dev/api/recording-tokens","category":"image","description":"Mint a browser recording URL for a StableUpload slot. The recordee speaks optional suggestedText; StableVoice transcodes the audio to MP3 and uploads it to the slot. Use the slot publicUrl as /api/speech referenceAudioUrl. Pass uploadUrlExpiresAt as expiresAt so the recording URL cannot outlive the ","price_listed":0.01,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":2,"reported_payers_30d":2,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"expiresAt":"2026-11-25T05:36:01.508Z","publicUrl":"https://f.stableupload.dev/abc123/voice.mp3","speakerLabel":"Mason","suggestedText":"Hi, I'm leaving you this voice clip so you can clone my voice. The quick brown fox jumps over the lazy dog. Cellar door.","uploadUrl":"https://x402-upload-prod.s3.us-east-1.amazonaws.com/uploads/abc123/voice.mp3?X-Amz-Algorithm=..."},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"expiresAt":{"description":"Required StableUpload uploadUrlExpiresAt value. We clamp the recording-token TTL to this value. Do not pass StableUpload's public-file retention expiresAt.","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","type":"string"},"postFields":{"additionalProperties":{"type":"string"},"description":"Required form fields when posting to postUrl.","propertyNames":{"type":"string"},"type":"object"},"postUrl":{"description":"Presigned POST URL from StableUpload. Pair with postFields.","format":"uri","type":"string"},"publicUrl":{"description":"StableUpload public URL where the resulting MP3 will live. Must end with .mp3.","format":"uri","type":"string"},"requestedExpiresAt":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"pattern":"^\\d+$","type":"string"}],"description":"Advanced optional epoch timestamp, seconds or milliseconds, for an explicit recording-link expiry. Default is 1 hour; max is 24 hours and still clamped to StableUpload uploadUrlExpiresAt."},"speakerLabel":{"description":"Optional name shown on the recording page (\"Recording for: …\").","maxLength":80,"minLength":1,"type":"string"},"suggestedText":{"description":"Optional script the recordee will see on the recording page (max 500 chars). Improves clone quality with consistent prosody.","maxLength":500,"minLength":1,"type":"string"},"uploadUrl":{"description":"Presigned PUT URL from StableUpload. Provide either uploadUrl or postUrl+postFields.","format":"uri","type":"string"}},"required":["publicUrl","expiresAt"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"expiresAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","type":"string"},"publicUrl":{"format":"uri","type":"string"},"recordUrl":{"format":"uri","type":"string"},"token":{"type":"string"}},"required":["token","recordUrl","expiresAt","publicUrl"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Mint a browser recording URL for a StableUpload slot. The recordee speaks optional suggestedText; StableVoice transcodes the audio to MP3 and uploads it to the slot. Use the slot publicUrl as /api/speech referenceAudioUrl. Pass uploadUrlExpiresAt as expiresAt so the recording URL cannot outlive the upload.","last_updated":"2026-11-25T05:18:09.614Z","schemes":["exact"]}