{"uid":"cap_-hatr_uO_vozSCOalFSIw","slug":"stablevoice-dev-ed73d701","name":"StableVoice Recording Token Mint","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 upload.","url":"https://stablevoice.dev/api/recording-tokens","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"postUrl":{"type":"string","format":"uri","description":"Presigned POST URL from StableUpload. Pair with postFields."},"expiresAt":{"type":"string","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))$","description":"Required StableUpload uploadUrlExpiresAt value. We clamp the recording-token TTL to this value. Do not pass StableUpload's public-file retention expiresAt."},"publicUrl":{"type":"string","format":"uri","description":"StableUpload public URL where the resulting MP3 will live. Must end with .mp3."},"uploadUrl":{"type":"string","format":"uri","description":"Presigned PUT URL from StableUpload. Provide either uploadUrl or postUrl+postFields."},"postFields":{"type":"object","description":"Required form fields when posting to postUrl.","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"speakerLabel":{"type":"string","maxLength":80,"minLength":1,"description":"Optional name shown on the recording page (\"Recording for: …\")."},"suggestedText":{"type":"string","maxLength":500,"minLength":1,"description":"Optional script the recordee will see on the recording page (max 500 chars). Improves clone quality with consistent prosody."},"requestedExpiresAt":{"anyOf":[{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},{"type":"string","pattern":"^\\d+$"}],"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."}}},"responseSchema":{"type":"json","example":{"token":"rec_clxabcdef123","expiresAt":"2026-05-22T14:44:32.613Z","publicUrl":"https://f.stableupload.dev/abc123/voice.mp3","recordUrl":"https://stablevoice.dev/record/rec_clxabcdef123"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mVVNnncJxLunAepNk2a2_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Mints a one-hour browser-based recording URL that captures a speaker's voice, transcodes it to MP3, and stores it in a pre-reserved StableUpload slot for use as a voice reference in speech synthesis.","exampleAgentPrompt":"Create a StableVoice recording token for my speaker — suggest they read 'The quick brown fox jumps over the lazy dog' — and upload the MP3 into my pre-reserved StableUpload slot when they're done.","exampleUseCases":[{"title":"Clone customer voice for chatbot responses","prompt":"I need to record my customer service manager's voice so our chatbot can respond in her actual voice. Generate a recording link, have her read a short script, and save the audio so we can use it for our AI agent's speech synthesis."},{"title":"Capture audiobook narrator for AI production","prompt":"We're producing an audiobook and want to use our narrator's voice with AI text-to-speech for consistency. Create a recording session where they can record a voice sample, then store it so we can generate the rest of the chapters in their voice."},{"title":"Preserve executive's voice for automated messages","prompt":"Our CEO wants to record a brief message that our AI can use as a voice reference for company-wide announcements. Get a recording URL for them, capture their audio, and set it up so we can synthesize their voice for future messages."}],"resultDescription":"Returns a one-hour browser-accessible recording URL the speaker opens to record their voice. After they speak, the audio is transcoded to MP3 and PUT into the caller's reserved StableUpload slot. The slot's publicUrl can then be passed as referenceAudioUrl to /api/speech for voice cloning or TTS.","failureModes":["StableUpload slot not reserved or expired before recording token is used","uploadUrl mismatch — requestedExpiresAt passed without a matching longer StableUpload upload URL","Recording token expires (1 hour) before the speaker completes their recording","Speaker's browser does not support audio recording APIs","MP3 transcoding failure if audio input is corrupt or too short","Payment of $0.01 USDC not fulfilled, resulting in 402 response"],"whenToPreferThis":"Use this endpoint when you need to collect a real human voice sample via browser for use as a reference audio in StableVoice's /api/speech TTS or voice cloning endpoint. Ideal when the target speaker is remote and you want a frictionless browser-based capture flow without requiring them to install software or send files manually.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T17:51:03.595Z","isFirstParty":false}