# StableVoice Recording Token Mint

> StableVoice Recording Token Mint is a paid API for AI agents from stablevoice.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

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.

## Facts

- Endpoint: POST https://stablevoice.dev/api/recording-tokens
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stablevoice-dev-ed73d701
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-hatr_uO_vozSCOalFSIw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability stablevoice-dev-ed73d701 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stablevoice-dev-ed73d701/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stablevoice.dev](https://www.zero.xyz/host/stablevoice.dev/llms.txt)
