realtime-avatar 0.30.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +106 -0
- package/dist/{chunk-GLIEEJMW.js → chunk-NDCZABOK.js} +1 -1
- package/dist/{chunk-WXVBPMDN.js → chunk-NKS5ZIWN.js} +159 -19
- package/dist/express.d.ts +2 -2
- package/dist/express.js +2 -2
- package/dist/hono.d.ts +2 -2
- package/dist/hono.js +2 -2
- package/dist/index.d.ts +182 -12
- package/dist/index.js +1 -1
- package/dist/nextjs.d.ts +2 -2
- package/dist/nextjs.js +2 -2
- package/dist/react-native.d.ts +9 -2
- package/dist/react-native.js +49 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1 -1
- package/dist/tanstack-start.d.ts +2 -2
- package/dist/tanstack-start.js +2 -2
- package/dist/{types-Bv29uEAs.d.ts → types-BSSqsu_Z.d.ts} +549 -6
- package/dist/{types-CgAEmIVE.d.ts → types-su27kEw0.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -90,6 +90,11 @@ interface components {
|
|
|
90
90
|
speed?: number | null;
|
|
91
91
|
emotion?: string | null;
|
|
92
92
|
language?: string | null;
|
|
93
|
+
whisper?: {
|
|
94
|
+
/** @enum {string} */
|
|
95
|
+
model: "s2-pro" | "s2.1-pro" | "drama-3";
|
|
96
|
+
gain_db?: number;
|
|
97
|
+
} | null;
|
|
93
98
|
}) | null;
|
|
94
99
|
voice_id?: string | null;
|
|
95
100
|
/** @description The session's motion-state map. Normally omitted: the avatar's PLATFORM-GENERATED library (idle / listen / gesture clips rendered from the portrait at creation) is injected automatically. An explicit [] opts the call out of clips. Supplying custom clip URLs is a legacy channel for existing integrations — custom video is not part of the public contract. */
|
|
@@ -207,7 +212,7 @@ interface components {
|
|
|
207
212
|
/** @description DEPRECATED, no-op. Accepted and ignored. The faster hesitation ceiling this requested is now the default for every session, so sending it changes nothing. Safe to stop sending; the field is retained only so existing callers do not break. */
|
|
208
213
|
fast_endpointing?: boolean;
|
|
209
214
|
require_ready_clip_library?: boolean;
|
|
210
|
-
/** @description Preview, enabled per workspace. A prepared scene from POST /v1/scenes, played forward over its full length in place of the avatar's source video; the avatar keeps the voice and persona. Cannot be combined with mode voice, render_backend generative, source_video_url, video_cache_id or a non-empty clip_library. */
|
|
215
|
+
/** @description Preview, enabled per workspace. A prepared scene from POST /v1/scenes, played forward over its full length in place of the avatar's source video; the avatar keeps the voice and persona. Cannot be combined with mode voice, render_backend generative, source_video_url, video_cache_id or a non-empty clip_library (unless scene.clips is library, whose clips are scenes this workspace prepared). */
|
|
211
216
|
scene?: {
|
|
212
217
|
/** @description The prepared scene's artifact id, as returned by POST /v1/scenes when status is ready. */
|
|
213
218
|
video_cache_id: string;
|
|
@@ -217,6 +222,28 @@ interface components {
|
|
|
217
222
|
total_frames?: number;
|
|
218
223
|
/** @description Preview. Set when this scene is a first clip alone: the joined scene (the same first clip plus its continuation) that this workspace prepares after the mint may then be attached to the live call. Linking needs the first clip's md5 and bytes declared on both prepares. Absent or false plays this scene for the whole call. */
|
|
219
224
|
attach_continuation?: boolean;
|
|
225
|
+
/** @description Preview, opt-in. Lets the minting server switch this scene session to another ready scene it owns mid-call, without a new session. Requires extend_secret to sign replace_scene commands. Absent or false plays this scene for the whole call. */
|
|
226
|
+
replaceable?: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* @description Preview, opt-in. How the speaking render is fitted onto the filmed scene: frame keeps the lips on each filmed frame's face (its own position and mouth). Absent renders as before.
|
|
229
|
+
* @enum {string}
|
|
230
|
+
*/
|
|
231
|
+
speech_fit?: "frame";
|
|
232
|
+
/**
|
|
233
|
+
* @description Preview, opt-in. Which part of the face the speaking render replaces on the filmed scene: full re-renders the whole face, as a video call does. Absent re-renders the mouth and jaw only, as before.
|
|
234
|
+
* @enum {string}
|
|
235
|
+
*/
|
|
236
|
+
speech_mask?: "full";
|
|
237
|
+
/**
|
|
238
|
+
* @description Preview, opt-in. library lets this scene session carry clip_library and clip_behavior: gesture clips that are scenes this workspace prepared, each starting on this scene's first frame and ending on its last. The character picks them as reactions and gestures; they play at the scene's loop boundary. A clip that cannot be admitted is left out, never refused. Absent plays this scene alone.
|
|
239
|
+
* @enum {string}
|
|
240
|
+
*/
|
|
241
|
+
clips?: "library";
|
|
242
|
+
/**
|
|
243
|
+
* @description Preview, opt-in, needs clips. hurry plays the scene at twice its speed to its last frame while a gesture waits, so the gesture starts sooner; hurry_silent does so only while she is silent. Absent waits for the scene's natural end.
|
|
244
|
+
* @enum {string}
|
|
245
|
+
*/
|
|
246
|
+
clip_lead?: "hurry" | "hurry_silent";
|
|
220
247
|
};
|
|
221
248
|
};
|
|
222
249
|
LiveKitSessionGrant: {
|
|
@@ -836,7 +863,7 @@ interface components {
|
|
|
836
863
|
* "avatars:read"
|
|
837
864
|
* ]
|
|
838
865
|
*/
|
|
839
|
-
scopes: ("*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write")[];
|
|
866
|
+
scopes: ("*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write" | "renders:read" | "renders:write")[];
|
|
840
867
|
spendLimitCreditMicros?: number | null;
|
|
841
868
|
expiresAt?: string | null;
|
|
842
869
|
};
|
|
@@ -848,7 +875,7 @@ interface components {
|
|
|
848
875
|
redactedKey: string;
|
|
849
876
|
/** @default false */
|
|
850
877
|
canReveal: boolean;
|
|
851
|
-
scopes: ("*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write")[];
|
|
878
|
+
scopes: ("*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write" | "renders:read" | "renders:write")[];
|
|
852
879
|
/** @enum {string} */
|
|
853
880
|
status: "active" | "revoked" | "expired";
|
|
854
881
|
spendLimitCreditMicros: number | null;
|
|
@@ -1230,6 +1257,163 @@ interface components {
|
|
|
1230
1257
|
/** Format: date-time */
|
|
1231
1258
|
expiresAt: string;
|
|
1232
1259
|
};
|
|
1260
|
+
CreateRenderRequest: {
|
|
1261
|
+
avatarId: string;
|
|
1262
|
+
/** @description A voice from your workspace's voice library. Omit voice and voiceId to use the avatar's own voice. */
|
|
1263
|
+
voiceId?: string;
|
|
1264
|
+
/** @description An inline Fish voice, the same object a live call takes as voice. Only a Fish voice can render; any other provider is refused with 422 voice_unavailable. Send voice or voiceId, not both. */
|
|
1265
|
+
voice?: {
|
|
1266
|
+
/** @constant */
|
|
1267
|
+
provider: "cartesia";
|
|
1268
|
+
/**
|
|
1269
|
+
* @default cartesia/sonic-3
|
|
1270
|
+
* @enum {string}
|
|
1271
|
+
*/
|
|
1272
|
+
model: "cartesia/sonic-2" | "cartesia/sonic-2-latest" | "cartesia/sonic-3" | "cartesia/sonic-3-latest" | "cartesia/sonic-turbo" | "cartesia/sonic-turbo-latest";
|
|
1273
|
+
voice_id: string;
|
|
1274
|
+
speed?: number | null;
|
|
1275
|
+
emotion?: string | null;
|
|
1276
|
+
language?: string | null;
|
|
1277
|
+
} | {
|
|
1278
|
+
/** @constant */
|
|
1279
|
+
provider: "breezeblue";
|
|
1280
|
+
/** @default bluebell-v1-en */
|
|
1281
|
+
model: string;
|
|
1282
|
+
voice_id: string;
|
|
1283
|
+
guidance_scale?: number | null;
|
|
1284
|
+
instructions?: string | null;
|
|
1285
|
+
language?: string | null;
|
|
1286
|
+
} | {
|
|
1287
|
+
/** @constant */
|
|
1288
|
+
provider: "fish";
|
|
1289
|
+
/** @default s2.1-pro */
|
|
1290
|
+
model: ("s1" | "s2-pro" | "s2.1-pro" | "drama-3") | ("speech-1.6" | "speech-1.5" | "s1-mini");
|
|
1291
|
+
voice_id: string;
|
|
1292
|
+
speed?: number | null;
|
|
1293
|
+
emotion?: string | null;
|
|
1294
|
+
language?: string | null;
|
|
1295
|
+
whisper?: {
|
|
1296
|
+
/** @enum {string} */
|
|
1297
|
+
model: "s2-pro" | "s2.1-pro" | "drama-3";
|
|
1298
|
+
gain_db?: number;
|
|
1299
|
+
} | null;
|
|
1300
|
+
};
|
|
1301
|
+
/** @description Mouth-motion amplitude, as on a live call (lip_gain). Omit it for the platform default. */
|
|
1302
|
+
lipGain?: number;
|
|
1303
|
+
/** @description The script: 1 to 50 shots, played one after another. At least one shot says something; at most 4,000 characters of say in total and 16 different clips besides "primary". */
|
|
1304
|
+
shots: {
|
|
1305
|
+
/** @description What she does: a ready clip from the avatar's clip library, or "primary" for the avatar's own video. Omit it to keep the current loop clip. A clip loops if it is "primary" or in the avatar's idle pool (behavior.idle.clips in the avatar's clip list); every other clip plays once. */
|
|
1306
|
+
clipId?: string;
|
|
1307
|
+
/** @description What she says, 1 to 1,000 characters. Speech starts when the shot starts. */
|
|
1308
|
+
say?: string;
|
|
1309
|
+
/** @description How long she stays silent after speaking, 0 to 10,000 ms. Default 0. */
|
|
1310
|
+
pauseAfterMs?: number;
|
|
1311
|
+
}[];
|
|
1312
|
+
};
|
|
1313
|
+
Render: {
|
|
1314
|
+
id: string;
|
|
1315
|
+
/** @constant */
|
|
1316
|
+
object: "render";
|
|
1317
|
+
/** @enum {string} */
|
|
1318
|
+
status: "queued" | "rendering" | "ready" | "failed";
|
|
1319
|
+
avatarId: string;
|
|
1320
|
+
/** @description The library voice the render speaks with: the voiceId you sent, else the avatar's own voice. Null when it speaks with the inline voice you sent. */
|
|
1321
|
+
voiceId: string | null;
|
|
1322
|
+
/** @description Length of the rendered video. Set once status is ready. */
|
|
1323
|
+
durationMs: number | null;
|
|
1324
|
+
width: number | null;
|
|
1325
|
+
height: number | null;
|
|
1326
|
+
/** @description One entry per shot, in order. Set once status is ready. */
|
|
1327
|
+
timeline: {
|
|
1328
|
+
/** @description The shot's position in your shots list, from 0. */
|
|
1329
|
+
index: number;
|
|
1330
|
+
/** @description When the shot starts. */
|
|
1331
|
+
startMs: number;
|
|
1332
|
+
/** @description When the shot ends; the next shot starts here. */
|
|
1333
|
+
endMs: number;
|
|
1334
|
+
/** @description The clip the shot played: the one you named, else the loop clip it kept, else "primary". */
|
|
1335
|
+
clipId: string;
|
|
1336
|
+
/**
|
|
1337
|
+
* @description once: the clip's action played one time. loop: the clip filled the shot.
|
|
1338
|
+
* @enum {string}
|
|
1339
|
+
*/
|
|
1340
|
+
playback: "once" | "loop";
|
|
1341
|
+
/** @description When she starts speaking. Null when the shot has no say. */
|
|
1342
|
+
speechStartMs: number | null;
|
|
1343
|
+
/** @description When she stops speaking. Null when the shot has no say. */
|
|
1344
|
+
speechEndMs: number | null;
|
|
1345
|
+
/** @description When the action finished. Once clips only; null for a loop clip. */
|
|
1346
|
+
clipEndMs: number | null;
|
|
1347
|
+
/** @description The loop clip shown after the action finished, when the shot outlasts it. Once clips only; otherwise null. */
|
|
1348
|
+
afterClipId: string | null;
|
|
1349
|
+
}[] | null;
|
|
1350
|
+
/** @description Set only when status is failed. */
|
|
1351
|
+
error: {
|
|
1352
|
+
/** @enum {string} */
|
|
1353
|
+
code: "asset_unavailable" | "tts_failed" | "too_long" | "render_failed";
|
|
1354
|
+
message: string;
|
|
1355
|
+
} | null;
|
|
1356
|
+
/** Format: date-time */
|
|
1357
|
+
createdAt: string;
|
|
1358
|
+
completedAt: string | null;
|
|
1359
|
+
};
|
|
1360
|
+
ListRendersResponse: {
|
|
1361
|
+
data: {
|
|
1362
|
+
id: string;
|
|
1363
|
+
/** @constant */
|
|
1364
|
+
object: "render";
|
|
1365
|
+
/** @enum {string} */
|
|
1366
|
+
status: "queued" | "rendering" | "ready" | "failed";
|
|
1367
|
+
avatarId: string;
|
|
1368
|
+
/** @description The library voice the render speaks with: the voiceId you sent, else the avatar's own voice. Null when it speaks with the inline voice you sent. */
|
|
1369
|
+
voiceId: string | null;
|
|
1370
|
+
/** @description Length of the rendered video. Set once status is ready. */
|
|
1371
|
+
durationMs: number | null;
|
|
1372
|
+
width: number | null;
|
|
1373
|
+
height: number | null;
|
|
1374
|
+
/** @description One entry per shot, in order. Set once status is ready. */
|
|
1375
|
+
timeline: {
|
|
1376
|
+
/** @description The shot's position in your shots list, from 0. */
|
|
1377
|
+
index: number;
|
|
1378
|
+
/** @description When the shot starts. */
|
|
1379
|
+
startMs: number;
|
|
1380
|
+
/** @description When the shot ends; the next shot starts here. */
|
|
1381
|
+
endMs: number;
|
|
1382
|
+
/** @description The clip the shot played: the one you named, else the loop clip it kept, else "primary". */
|
|
1383
|
+
clipId: string;
|
|
1384
|
+
/**
|
|
1385
|
+
* @description once: the clip's action played one time. loop: the clip filled the shot.
|
|
1386
|
+
* @enum {string}
|
|
1387
|
+
*/
|
|
1388
|
+
playback: "once" | "loop";
|
|
1389
|
+
/** @description When she starts speaking. Null when the shot has no say. */
|
|
1390
|
+
speechStartMs: number | null;
|
|
1391
|
+
/** @description When she stops speaking. Null when the shot has no say. */
|
|
1392
|
+
speechEndMs: number | null;
|
|
1393
|
+
/** @description When the action finished. Once clips only; null for a loop clip. */
|
|
1394
|
+
clipEndMs: number | null;
|
|
1395
|
+
/** @description The loop clip shown after the action finished, when the shot outlasts it. Once clips only; otherwise null. */
|
|
1396
|
+
afterClipId: string | null;
|
|
1397
|
+
}[] | null;
|
|
1398
|
+
/** @description Set only when status is failed. */
|
|
1399
|
+
error: {
|
|
1400
|
+
/** @enum {string} */
|
|
1401
|
+
code: "asset_unavailable" | "tts_failed" | "too_long" | "render_failed";
|
|
1402
|
+
message: string;
|
|
1403
|
+
} | null;
|
|
1404
|
+
/** Format: date-time */
|
|
1405
|
+
createdAt: string;
|
|
1406
|
+
completedAt: string | null;
|
|
1407
|
+
}[];
|
|
1408
|
+
nextCursor: string | null;
|
|
1409
|
+
};
|
|
1410
|
+
RenderAccessResponse: {
|
|
1411
|
+
id: string;
|
|
1412
|
+
/** Format: uri */
|
|
1413
|
+
url: string;
|
|
1414
|
+
/** Format: date-time */
|
|
1415
|
+
expiresAt: string;
|
|
1416
|
+
};
|
|
1233
1417
|
ConnectionHistoryResponse: {
|
|
1234
1418
|
sessionId: string;
|
|
1235
1419
|
observations: {
|
|
@@ -1476,9 +1660,9 @@ interface components {
|
|
|
1476
1660
|
* @description Present on `403 insufficient_scope` — the one scope this operation needed and the key did not carry. Repeated in the `WWW-Authenticate` challenge as `scope=`.
|
|
1477
1661
|
* @enum {string}
|
|
1478
1662
|
*/
|
|
1479
|
-
requiredScope?: "*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write";
|
|
1663
|
+
requiredScope?: "*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write" | "renders:read" | "renders:write";
|
|
1480
1664
|
/** @description Present alongside `requiredScope` — the scopes the presented key does carry. */
|
|
1481
|
-
grantedScopes?: ("*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write")[];
|
|
1665
|
+
grantedScopes?: ("*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write" | "renders:read" | "renders:write")[];
|
|
1482
1666
|
/** @description Present on 402 — where to send the user to top up. */
|
|
1483
1667
|
billingUrl?: string;
|
|
1484
1668
|
/** @description On concurrency_limit_reached: the workspace's concurrent session limit. */
|
|
@@ -2861,6 +3045,336 @@ interface operations {
|
|
|
2861
3045
|
};
|
|
2862
3046
|
};
|
|
2863
3047
|
};
|
|
3048
|
+
listRenders: {
|
|
3049
|
+
parameters: {
|
|
3050
|
+
query?: {
|
|
3051
|
+
limit?: number;
|
|
3052
|
+
/** @description The previous response's nextCursor. */
|
|
3053
|
+
cursor?: string;
|
|
3054
|
+
};
|
|
3055
|
+
header?: never;
|
|
3056
|
+
path?: never;
|
|
3057
|
+
cookie?: never;
|
|
3058
|
+
};
|
|
3059
|
+
requestBody?: never;
|
|
3060
|
+
responses: {
|
|
3061
|
+
/** @description Renders */
|
|
3062
|
+
200: {
|
|
3063
|
+
headers: {
|
|
3064
|
+
[name: string]: unknown;
|
|
3065
|
+
};
|
|
3066
|
+
content: {
|
|
3067
|
+
"application/json": components["schemas"]["ListRendersResponse"];
|
|
3068
|
+
};
|
|
3069
|
+
};
|
|
3070
|
+
/** @description Invalid query */
|
|
3071
|
+
400: {
|
|
3072
|
+
headers: {
|
|
3073
|
+
[name: string]: unknown;
|
|
3074
|
+
};
|
|
3075
|
+
content: {
|
|
3076
|
+
"application/json": components["schemas"]["Error"];
|
|
3077
|
+
};
|
|
3078
|
+
};
|
|
3079
|
+
/** @description Missing, malformed, revoked, or expired key. */
|
|
3080
|
+
401: {
|
|
3081
|
+
headers: {
|
|
3082
|
+
[name: string]: unknown;
|
|
3083
|
+
};
|
|
3084
|
+
content: {
|
|
3085
|
+
"application/json": components["schemas"]["Error"];
|
|
3086
|
+
};
|
|
3087
|
+
};
|
|
3088
|
+
/** @description The key lacks the scope for this operation, or the tenant is not active. */
|
|
3089
|
+
403: {
|
|
3090
|
+
headers: {
|
|
3091
|
+
[name: string]: unknown;
|
|
3092
|
+
};
|
|
3093
|
+
content: {
|
|
3094
|
+
"application/json": components["schemas"]["Error"];
|
|
3095
|
+
};
|
|
3096
|
+
};
|
|
3097
|
+
/** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
|
|
3098
|
+
default: {
|
|
3099
|
+
headers: {
|
|
3100
|
+
[name: string]: unknown;
|
|
3101
|
+
};
|
|
3102
|
+
content: {
|
|
3103
|
+
"application/json": components["schemas"]["Error"];
|
|
3104
|
+
};
|
|
3105
|
+
};
|
|
3106
|
+
};
|
|
3107
|
+
};
|
|
3108
|
+
createRender: {
|
|
3109
|
+
parameters: {
|
|
3110
|
+
query?: never;
|
|
3111
|
+
header?: {
|
|
3112
|
+
/** @description Replays the original response byte-for-byte instead of performing the write again. Recommended on retries: a re-render is billed. Keys longer than 180 characters are IGNORED — the write proceeds without replay protection rather than failing — so keep it short. */
|
|
3113
|
+
"Idempotency-Key"?: string;
|
|
3114
|
+
};
|
|
3115
|
+
path?: never;
|
|
3116
|
+
cookie?: never;
|
|
3117
|
+
};
|
|
3118
|
+
requestBody: {
|
|
3119
|
+
content: {
|
|
3120
|
+
/**
|
|
3121
|
+
* @example {
|
|
3122
|
+
* "avatarId": "ava_0123456789abcdef0123456789abcdef",
|
|
3123
|
+
* "shots": [
|
|
3124
|
+
* {
|
|
3125
|
+
* "clipId": "gesture_send_flower",
|
|
3126
|
+
* "say": "你终于来了。今天……我有话想对你说。"
|
|
3127
|
+
* },
|
|
3128
|
+
* {
|
|
3129
|
+
* "clipId": "idle_touch_collar",
|
|
3130
|
+
* "say": "别笑,我是认真的。",
|
|
3131
|
+
* "pauseAfterMs": 800
|
|
3132
|
+
* },
|
|
3133
|
+
* {
|
|
3134
|
+
* "say": "所以,今晚留下来。"
|
|
3135
|
+
* }
|
|
3136
|
+
* ]
|
|
3137
|
+
* }
|
|
3138
|
+
*/
|
|
3139
|
+
"application/json": components["schemas"]["CreateRenderRequest"];
|
|
3140
|
+
};
|
|
3141
|
+
};
|
|
3142
|
+
responses: {
|
|
3143
|
+
/** @description Queued */
|
|
3144
|
+
202: {
|
|
3145
|
+
headers: {
|
|
3146
|
+
[name: string]: unknown;
|
|
3147
|
+
};
|
|
3148
|
+
content: {
|
|
3149
|
+
"application/json": components["schemas"]["Render"];
|
|
3150
|
+
};
|
|
3151
|
+
};
|
|
3152
|
+
/** @description The body is not JSON, or the shots' estimated video is longer than 180 seconds (render_too_long, refused before any credits are held) */
|
|
3153
|
+
400: {
|
|
3154
|
+
headers: {
|
|
3155
|
+
[name: string]: unknown;
|
|
3156
|
+
};
|
|
3157
|
+
content: {
|
|
3158
|
+
"application/json": components["schemas"]["Error"];
|
|
3159
|
+
};
|
|
3160
|
+
};
|
|
3161
|
+
/** @description Missing, malformed, revoked, or expired key. */
|
|
3162
|
+
401: {
|
|
3163
|
+
headers: {
|
|
3164
|
+
[name: string]: unknown;
|
|
3165
|
+
};
|
|
3166
|
+
content: {
|
|
3167
|
+
"application/json": components["schemas"]["Error"];
|
|
3168
|
+
};
|
|
3169
|
+
};
|
|
3170
|
+
/** @description Not enough credits for the estimated length, or the key's spend limit is reached */
|
|
3171
|
+
402: {
|
|
3172
|
+
headers: {
|
|
3173
|
+
[name: string]: unknown;
|
|
3174
|
+
};
|
|
3175
|
+
content: {
|
|
3176
|
+
"application/json": components["schemas"]["Error"];
|
|
3177
|
+
};
|
|
3178
|
+
};
|
|
3179
|
+
/** @description The key lacks the scope for this operation, or the tenant is not active. */
|
|
3180
|
+
403: {
|
|
3181
|
+
headers: {
|
|
3182
|
+
[name: string]: unknown;
|
|
3183
|
+
};
|
|
3184
|
+
content: {
|
|
3185
|
+
"application/json": components["schemas"]["Error"];
|
|
3186
|
+
};
|
|
3187
|
+
};
|
|
3188
|
+
/** @description Avatar not found in this workspace, or a voiceId it cannot see (voice_not_found) */
|
|
3189
|
+
404: {
|
|
3190
|
+
headers: {
|
|
3191
|
+
[name: string]: unknown;
|
|
3192
|
+
};
|
|
3193
|
+
content: {
|
|
3194
|
+
"application/json": components["schemas"]["Error"];
|
|
3195
|
+
};
|
|
3196
|
+
};
|
|
3197
|
+
/** @description Invalid script (including voice and voiceId together), an unknown or unready clip (render_clip_unavailable), a voice that cannot be used for video, whether inline, named or the avatar's own (voice_unavailable), or an avatar with no source video */
|
|
3198
|
+
422: {
|
|
3199
|
+
headers: {
|
|
3200
|
+
[name: string]: unknown;
|
|
3201
|
+
};
|
|
3202
|
+
content: {
|
|
3203
|
+
"application/json": components["schemas"]["Error"];
|
|
3204
|
+
};
|
|
3205
|
+
};
|
|
3206
|
+
/** @description This workspace already has the maximum number of renders queued or rendering (concurrency_limit_reached) */
|
|
3207
|
+
429: {
|
|
3208
|
+
headers: {
|
|
3209
|
+
[name: string]: unknown;
|
|
3210
|
+
};
|
|
3211
|
+
content: {
|
|
3212
|
+
"application/json": components["schemas"]["Error"];
|
|
3213
|
+
};
|
|
3214
|
+
};
|
|
3215
|
+
/** @description Rendering is not available on this deployment (render_export_unavailable, not retryable), or this render could not be started (render_start_failed, retryable) */
|
|
3216
|
+
503: {
|
|
3217
|
+
headers: {
|
|
3218
|
+
[name: string]: unknown;
|
|
3219
|
+
};
|
|
3220
|
+
content: {
|
|
3221
|
+
"application/json": components["schemas"]["Error"];
|
|
3222
|
+
};
|
|
3223
|
+
};
|
|
3224
|
+
/** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
|
|
3225
|
+
default: {
|
|
3226
|
+
headers: {
|
|
3227
|
+
[name: string]: unknown;
|
|
3228
|
+
};
|
|
3229
|
+
content: {
|
|
3230
|
+
"application/json": components["schemas"]["Error"];
|
|
3231
|
+
};
|
|
3232
|
+
};
|
|
3233
|
+
};
|
|
3234
|
+
};
|
|
3235
|
+
getRender: {
|
|
3236
|
+
parameters: {
|
|
3237
|
+
query?: never;
|
|
3238
|
+
header?: never;
|
|
3239
|
+
path: {
|
|
3240
|
+
renderId: string;
|
|
3241
|
+
};
|
|
3242
|
+
cookie?: never;
|
|
3243
|
+
};
|
|
3244
|
+
requestBody?: never;
|
|
3245
|
+
responses: {
|
|
3246
|
+
/** @description Render */
|
|
3247
|
+
200: {
|
|
3248
|
+
headers: {
|
|
3249
|
+
[name: string]: unknown;
|
|
3250
|
+
};
|
|
3251
|
+
content: {
|
|
3252
|
+
"application/json": components["schemas"]["Render"];
|
|
3253
|
+
};
|
|
3254
|
+
};
|
|
3255
|
+
/** @description Missing, malformed, revoked, or expired key. */
|
|
3256
|
+
401: {
|
|
3257
|
+
headers: {
|
|
3258
|
+
[name: string]: unknown;
|
|
3259
|
+
};
|
|
3260
|
+
content: {
|
|
3261
|
+
"application/json": components["schemas"]["Error"];
|
|
3262
|
+
};
|
|
3263
|
+
};
|
|
3264
|
+
/** @description The key lacks the scope for this operation, or the tenant is not active. */
|
|
3265
|
+
403: {
|
|
3266
|
+
headers: {
|
|
3267
|
+
[name: string]: unknown;
|
|
3268
|
+
};
|
|
3269
|
+
content: {
|
|
3270
|
+
"application/json": components["schemas"]["Error"];
|
|
3271
|
+
};
|
|
3272
|
+
};
|
|
3273
|
+
/** @description No render with this id in this workspace (render_not_found) */
|
|
3274
|
+
404: {
|
|
3275
|
+
headers: {
|
|
3276
|
+
[name: string]: unknown;
|
|
3277
|
+
};
|
|
3278
|
+
content: {
|
|
3279
|
+
"application/json": components["schemas"]["Error"];
|
|
3280
|
+
};
|
|
3281
|
+
};
|
|
3282
|
+
/** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
|
|
3283
|
+
default: {
|
|
3284
|
+
headers: {
|
|
3285
|
+
[name: string]: unknown;
|
|
3286
|
+
};
|
|
3287
|
+
content: {
|
|
3288
|
+
"application/json": components["schemas"]["Error"];
|
|
3289
|
+
};
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
3292
|
+
};
|
|
3293
|
+
getRenderAccess: {
|
|
3294
|
+
parameters: {
|
|
3295
|
+
query?: never;
|
|
3296
|
+
header?: never;
|
|
3297
|
+
path: {
|
|
3298
|
+
renderId: string;
|
|
3299
|
+
};
|
|
3300
|
+
cookie?: never;
|
|
3301
|
+
};
|
|
3302
|
+
requestBody?: never;
|
|
3303
|
+
responses: {
|
|
3304
|
+
/** @description Temporary access */
|
|
3305
|
+
200: {
|
|
3306
|
+
headers: {
|
|
3307
|
+
[name: string]: unknown;
|
|
3308
|
+
};
|
|
3309
|
+
content: {
|
|
3310
|
+
"application/json": components["schemas"]["RenderAccessResponse"];
|
|
3311
|
+
};
|
|
3312
|
+
};
|
|
3313
|
+
/** @description Missing, malformed, revoked, or expired key. */
|
|
3314
|
+
401: {
|
|
3315
|
+
headers: {
|
|
3316
|
+
[name: string]: unknown;
|
|
3317
|
+
};
|
|
3318
|
+
content: {
|
|
3319
|
+
"application/json": components["schemas"]["Error"];
|
|
3320
|
+
};
|
|
3321
|
+
};
|
|
3322
|
+
/** @description The key lacks the scope for this operation, or the tenant is not active. */
|
|
3323
|
+
403: {
|
|
3324
|
+
headers: {
|
|
3325
|
+
[name: string]: unknown;
|
|
3326
|
+
};
|
|
3327
|
+
content: {
|
|
3328
|
+
"application/json": components["schemas"]["Error"];
|
|
3329
|
+
};
|
|
3330
|
+
};
|
|
3331
|
+
/** @description No render with this id in this workspace (render_not_found) */
|
|
3332
|
+
404: {
|
|
3333
|
+
headers: {
|
|
3334
|
+
[name: string]: unknown;
|
|
3335
|
+
};
|
|
3336
|
+
content: {
|
|
3337
|
+
"application/json": components["schemas"]["Error"];
|
|
3338
|
+
};
|
|
3339
|
+
};
|
|
3340
|
+
/** @description The render is not ready (render_not_ready) */
|
|
3341
|
+
409: {
|
|
3342
|
+
headers: {
|
|
3343
|
+
[name: string]: unknown;
|
|
3344
|
+
};
|
|
3345
|
+
content: {
|
|
3346
|
+
"application/json": components["schemas"]["Error"];
|
|
3347
|
+
};
|
|
3348
|
+
};
|
|
3349
|
+
/** @description The render's video is no longer stored (render_gone) */
|
|
3350
|
+
410: {
|
|
3351
|
+
headers: {
|
|
3352
|
+
[name: string]: unknown;
|
|
3353
|
+
};
|
|
3354
|
+
content: {
|
|
3355
|
+
"application/json": components["schemas"]["Error"];
|
|
3356
|
+
};
|
|
3357
|
+
};
|
|
3358
|
+
/** @description Render storage temporarily unavailable */
|
|
3359
|
+
503: {
|
|
3360
|
+
headers: {
|
|
3361
|
+
[name: string]: unknown;
|
|
3362
|
+
};
|
|
3363
|
+
content: {
|
|
3364
|
+
"application/json": components["schemas"]["Error"];
|
|
3365
|
+
};
|
|
3366
|
+
};
|
|
3367
|
+
/** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
|
|
3368
|
+
default: {
|
|
3369
|
+
headers: {
|
|
3370
|
+
[name: string]: unknown;
|
|
3371
|
+
};
|
|
3372
|
+
content: {
|
|
3373
|
+
"application/json": components["schemas"]["Error"];
|
|
3374
|
+
};
|
|
3375
|
+
};
|
|
3376
|
+
};
|
|
3377
|
+
};
|
|
2864
3378
|
listUsageSessions: {
|
|
2865
3379
|
parameters: {
|
|
2866
3380
|
query?: {
|
|
@@ -3748,6 +4262,35 @@ type UsageSessionPage = ReturnType<typeof toSessionsPage>;
|
|
|
3748
4262
|
type ListSessionsOptions = NonNullable<operations["listUsageSessions"]["parameters"]["query"]> & {
|
|
3749
4263
|
speechDiagnostics?: NonNullable<operations["listUsageSessions"]["parameters"]["header"]>["X-RTA-Speech-Diagnostics"] extends "1" | undefined ? boolean : never;
|
|
3750
4264
|
};
|
|
4265
|
+
type CreateRenderWire = Wire["CreateRenderRequest"];
|
|
4266
|
+
type OptionalModel<V> = V extends {
|
|
4267
|
+
model: unknown;
|
|
4268
|
+
} ? Omit<V, "model"> & Partial<Pick<V, "model">> : V;
|
|
4269
|
+
/**
|
|
4270
|
+
* A pre-rendered video request: the avatar, an optional voice, and the script as `shots`.
|
|
4271
|
+
* Everything in one shot happens at the same time; shots play one after another. The body is
|
|
4272
|
+
* camelCase on the wire too, so it is sent exactly as given, except the inline `voice`, which is
|
|
4273
|
+
* the live call's snake_case voice object (`voice_id`).
|
|
4274
|
+
*
|
|
4275
|
+
* The voice is `voiceId` (a voice from the workspace's voice library), or `voice` (an inline Fish
|
|
4276
|
+
* voice), or neither (the avatar's own). Only a Fish voice renders: an inline voice of another
|
|
4277
|
+
* provider, and an avatar whose own voice is not Fish when neither was sent, are
|
|
4278
|
+
* `422 voice_unavailable`.
|
|
4279
|
+
*
|
|
4280
|
+
* DERIVATION: every field indexes `CreateRenderRequest`; two rules the generator drops are
|
|
4281
|
+
* restated. The published `not: { required: ["voice", "voiceId"] }` (the platform refuses both
|
|
4282
|
+
* with 422) is the either/or union, so sending both fails to compile. And `voice.model` has a
|
|
4283
|
+
* published default that openapi-typescript renders as required; the wire accepts it omitted.
|
|
4284
|
+
*/
|
|
4285
|
+
type CreateRenderInput = Omit<CreateRenderWire, "voice" | "voiceId"> & ({
|
|
4286
|
+
voice?: OptionalModel<NonNullable<CreateRenderWire["voice"]>>;
|
|
4287
|
+
voiceId?: never;
|
|
4288
|
+
} | {
|
|
4289
|
+
voice?: never;
|
|
4290
|
+
voiceId?: CreateRenderWire["voiceId"];
|
|
4291
|
+
});
|
|
4292
|
+
/** One shot: `clipId` is what she does, `say` what she says, `pauseAfterMs` the silence after it. */
|
|
4293
|
+
type RenderShot = Wire["CreateRenderRequest"]["shots"][number];
|
|
3751
4294
|
type CreditBalance = Pick<Wire["CreditBalance"], "balanceCreditMicros" | "reservedCreditMicros">;
|
|
3752
4295
|
/**
|
|
3753
4296
|
* Complete desired sources and behavior; expectedRevision protects concurrent edits.
|
|
@@ -3833,4 +4376,4 @@ interface TranscriptPayload {
|
|
|
3833
4376
|
client_metadata: Record<string, string>;
|
|
3834
4377
|
}
|
|
3835
4378
|
|
|
3836
|
-
export { type Avatar as A, type
|
|
4379
|
+
export { type Avatar as A, type RenderShot as B, type CallMode as C, type VideoPolicy as D, type EndCallOptions as E, type VoiceWebhook as F, type VoiceWebhookErrorCode as G, isQueued as H, listRecordingsResponseSchema as I, recordingAccessResponseSchema as J, recordingArtifactSchema as K, type LoopRedirect as L, recordingModeSchema as M, type RecordingArtifact as R, type StartCallResult as S, type TranscriptPayload as T, type UsageSessionPage as U, type VoiceWebhookRequest as V, type CallPolicy as a, type AvatarUpdate as b, type AvatarSourceSwap as c, type ClipLibraryDeclaration as d, type ClipLibraryUpdate as e, type ClipLibrary as f, type AssetKind as g, type Asset as h, type ListSessionsOptions as i, type UsageSession as j, type ListRecordingsQuery as k, type ListRecordingsResponse as l, type RecordingAccessResponse as m, type CreateRenderInput as n, type CreditBalance as o, type AvatarClip as p, type CallConnection as q, type CallQueued as r, type ClipDeclaration as s, type ClipLibraryPlan as t, type ClipSource as u, type ContextMessage as v, type EndCallReason as w, type ExternalLlm as x, type RecordingArtifactStatus as y, type RecordingMode as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CallMode, a as CallPolicy } from './types-
|
|
1
|
+
import { C as CallMode, a as CallPolicy } from './types-BSSqsu_Z.js';
|
|
2
2
|
|
|
3
3
|
/** The three things a caller can ask the proxy to do. Gate on these, not on URLs. */
|
|
4
4
|
type ProxyOperation = "connect" | "end" | "avatars" | "credits";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "realtime-avatar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Realtime Avatar SDK. `realtime-avatar` and the route adapters hold your API key and are server-only; `realtime-avatar/react`, `/browser` and `/tools` never can — importing a server entry into a browser build throws at bundle time.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "The Influence Company",
|