AVSPro API
Resell realtime AI face-swap and voice-changer streaming sessions under your own product. One API key, a prepaid USD balance, and two endpoints — the underlying provider is never exposed, so it can change without breaking your integration.
https://avspro.tech60 requests / minute / key
Prepaid USD, charged on success
Authentication
Every request needs your API key as a bearer token. Keys look like avsp_live_... and are issued when your AVSPro API account is created — see the client portal to check your balance and usage, or contact us to get a key.
Authorization: Bearer avsp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxRate limits
Each API key is limited to 60 requests per minute, shared across every endpoint. A request over the limit gets a 429 with X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After headers telling you exactly when to retry. Need a higher ceiling? Get in touch.
Endpoints
/api/v1/realtime/face-swap$2.8000 / minuteRealtime Face/Body Swap Session
Mints a realtime face/body-swap streaming session. You get back a stream URL and session token to connect to directly over WebSocket/LiveKit — your integration never talks to the underlying model provider.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
durationMinutes | number | Yes | Length of the session, in minutes. Max 60. |
idempotencyKey | string | No | Optional — pass the same value on a retry to avoid double-charging. |
Response
| Field | Type | Notes |
|---|---|---|
sessionId | string | Unique ID for this session. |
streamUrl | string | WebSocket/LiveKit URL to connect to. |
sessionToken | string | Token to authenticate the stream connection. |
maxDurationSec | number | Hard cutoff for the session, in seconds. |
priceUsd | number | What this call was charged. |
balanceUsd | number | Your account balance after this charge. |
curl -X POST https://avspro.tech/api/v1/realtime/face-swap \
-H "Authorization: Bearer avsp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"durationMinutes": 5,
"idempotencyKey": "order-12345"
}'const res = await fetch("https://avspro.tech/api/v1/realtime/face-swap", {
method: "POST",
headers: {
Authorization: "Bearer avsp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
},
body: JSON.stringify({ durationMinutes: 5, idempotencyKey: "order-12345" }),
});
const session = await res.json();
// session.streamUrl, session.sessionToken/api/v1/realtime/voice-swap$2.0000 / minuteRealtime Voice Changer Session
Mints a realtime speech-to-speech voice-changer session, same shape and transport as the face-swap endpoint above. Cold starts can take up to 1-2 minutes on the first call after idle time — that's upstream warm-up, not a broken request.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
durationMinutes | number | Yes | Length of the session, in minutes. Max 60. |
idempotencyKey | string | No | Optional — pass the same value on a retry to avoid double-charging. |
Response
| Field | Type | Notes |
|---|---|---|
sessionId | string | Unique ID for this session. |
streamUrl | string | WebSocket/LiveKit URL to connect to. |
sessionToken | string | Token to authenticate the stream connection. |
maxDurationSec | number | Hard cutoff for the session, in seconds. |
priceUsd | number | What this call was charged. |
balanceUsd | number | Your account balance after this charge. |
curl -X POST https://avspro.tech/api/v1/realtime/voice-swap \
-H "Authorization: Bearer avsp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"durationMinutes": 5
}'const res = await fetch("https://avspro.tech/api/v1/realtime/voice-swap", {
method: "POST",
headers: {
Authorization: "Bearer avsp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
},
body: JSON.stringify({ durationMinutes: 5 }),
});
const session = await res.json();Errors
Errors are returned as { "error": "message" } with a matching HTTP status code.
| Status | Meaning |
|---|---|
400 | Bad request — missing/invalid field (e.g. durationMinutes out of range). |
401 | Missing, malformed, or invalid API key. |
402 | Insufficient balance for this call's cost. |
429 | Rate limit exceeded — see Rate limits below. |
502 | The upstream session provider failed to start the session. |
503 | This endpoint is temporarily disabled by AVSPro. |
Track your balance, usage, and top up your account in the client portal.
Go to portal