REST API · v1
Standalone speech
Generate reusable audio from exact text with a prebuilt voice and optional delivery direction. Check capability availability first. A zero spending ceiling returns a free quote without a job or credit hold. Reuse the same idempotencyKey across quote, approval and lost-response retries.
https://polished-turtle-977.convex.siteGet an API key/api/v1/media-generation/capabilities
Read current speech and music availability, model, input limits and pricing version.
- Response shape
- { scopeKey, speech: { available, model, priceVersion, voices[], maxWeightedCharacters: 6000, maxStyleCharacters: 500, activeLimit: 3 }, music: { available, model, priceVersion, maxPromptCharacters: 8000, activeLimit: 3 } }
curl --request GET 'https://polished-turtle-977.convex.site/api/v1/media-generation/capabilities' \
--header "Authorization: Bearer $AUTOCLIP_API_KEY"/api/v1/speech-jobs
Quote with maxCredits: 0. A sufficient positive ceiling reserves the fixed quote once. Requires an active credit plan; workspace editors use the owner's balance. Han, kana and Hangul characters count as three. Voice cloning and multi-speaker fields are unsupported.
- Input
- { "text": "Hello from AutoClip.", "voice": "Charon", "style": "Calm and clear.", "idempotencyKey": "speech-take-001", "maxCredits": 0 }
- Response shape
- Quote: { status: needs_approval, scopeKey, estimatedCredits, canStart, reason?, billingScope, model, priceVersion }. Admitted: 202 { jobId, status, reservedCredits, chargedCredits: null, estimatedCredits, billingScope }
curl --request POST 'https://polished-turtle-977.convex.site/api/v1/speech-jobs' \
--header "Authorization: Bearer $AUTOCLIP_API_KEY" \
--header "Content-Type: application/json" \
--data @request.jsonSave the input fields as request.json before running a write request. Replace path placeholders with your own IDs.
/api/v1/media-generation-jobs/{jobId}
Poll with waitSeconds from 0 to 20. Success creates a reusable media asset and refreshes audio download URLs for 24 hours. A definite failure releases the reservation. An uncertain submission keeps its hold; never automatically create a replacement key.
- Input
- ?waitSeconds=0
- Response shape
- { jobId, kind: speech|music, status: queued|running|submission_unknown|succeeded|failed, estimatedCredits, reservedCredits, chargedCredits: number|null, assetId?, outputAvailable?, outputs: [{ mimeType, durationSeconds, url, expiresAt, lyrics?: provider-supplied music text; not an independent transcription }], errorCode?: output_limit_reached|provider_rejected|provider_receipt_pending|…; speech output token ceiling: 600–16384, immutable and proportional to quoted input; new paid request requires expectedScopeKey: quote.scopeKey; original-scope membership rechecked on replay }
curl --request GET 'https://polished-turtle-977.convex.site/api/v1/media-generation-jobs/{jobId}' \
--header "Authorization: Bearer $AUTOCLIP_API_KEY"/api/v1/media-assets/{assetId}/music-track
Create a reusable background track reference for owned library audio. Applying the track is a separate paid music edit that loops it under the original audio. The source file stays in R2.
- Input
- {}; sizeBytes ≤ 52428800; durationSec ≤ 1800
- Response shape
- { trackId }; use POST /api/v1/clips/{id}/music separately
curl --request POST 'https://polished-turtle-977.convex.site/api/v1/media-assets/{assetId}/music-track' \
--header "Authorization: Bearer $AUTOCLIP_API_KEY" \
--header "Content-Type: application/json" \
--data @request.jsonSave the input fields as request.json before running a write request. Replace path placeholders with your own IDs.