realtime-avatar 0.29.0 → 0.31.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 +123 -1
- package/dist/{chunk-MMO5AQN4.js → chunk-LRGQKZFB.js} +178 -38
- package/dist/{chunk-HC7O44WE.js → chunk-TJM53JXR.js} +1 -1
- 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 +195 -12
- package/dist/index.js +1 -1
- package/dist/nextjs.d.ts +2 -2
- package/dist/nextjs.js +2 -2
- package/dist/{proxy-client-BJQxlVHz.d.ts → proxy-client-BlaFxR6S.d.ts} +4 -2
- package/dist/react-native.d.ts +2 -2
- package/dist/react-native.js +1 -1
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- 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-DOFXGl7G.d.ts} +518 -5
- package/dist/{types-CgAEmIVE.d.ts → types-Du6T6XQB.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -217,6 +217,8 @@ interface components {
|
|
|
217
217
|
total_frames?: number;
|
|
218
218
|
/** @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
219
|
attach_continuation?: boolean;
|
|
220
|
+
/** @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. */
|
|
221
|
+
replaceable?: boolean;
|
|
220
222
|
};
|
|
221
223
|
};
|
|
222
224
|
LiveKitSessionGrant: {
|
|
@@ -836,7 +838,7 @@ interface components {
|
|
|
836
838
|
* "avatars:read"
|
|
837
839
|
* ]
|
|
838
840
|
*/
|
|
839
|
-
scopes: ("*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write")[];
|
|
841
|
+
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
842
|
spendLimitCreditMicros?: number | null;
|
|
841
843
|
expiresAt?: string | null;
|
|
842
844
|
};
|
|
@@ -848,7 +850,7 @@ interface components {
|
|
|
848
850
|
redactedKey: string;
|
|
849
851
|
/** @default false */
|
|
850
852
|
canReveal: boolean;
|
|
851
|
-
scopes: ("*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write")[];
|
|
853
|
+
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
854
|
/** @enum {string} */
|
|
853
855
|
status: "active" | "revoked" | "expired";
|
|
854
856
|
spendLimitCreditMicros: number | null;
|
|
@@ -1230,6 +1232,158 @@ interface components {
|
|
|
1230
1232
|
/** Format: date-time */
|
|
1231
1233
|
expiresAt: string;
|
|
1232
1234
|
};
|
|
1235
|
+
CreateRenderRequest: {
|
|
1236
|
+
avatarId: string;
|
|
1237
|
+
/** @description A voice from your workspace's voice library. Omit voice and voiceId to use the avatar's own voice. */
|
|
1238
|
+
voiceId?: string;
|
|
1239
|
+
/** @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. */
|
|
1240
|
+
voice?: {
|
|
1241
|
+
/** @constant */
|
|
1242
|
+
provider: "cartesia";
|
|
1243
|
+
/**
|
|
1244
|
+
* @default cartesia/sonic-3
|
|
1245
|
+
* @enum {string}
|
|
1246
|
+
*/
|
|
1247
|
+
model: "cartesia/sonic-2" | "cartesia/sonic-2-latest" | "cartesia/sonic-3" | "cartesia/sonic-3-latest" | "cartesia/sonic-turbo" | "cartesia/sonic-turbo-latest";
|
|
1248
|
+
voice_id: string;
|
|
1249
|
+
speed?: number | null;
|
|
1250
|
+
emotion?: string | null;
|
|
1251
|
+
language?: string | null;
|
|
1252
|
+
} | {
|
|
1253
|
+
/** @constant */
|
|
1254
|
+
provider: "breezeblue";
|
|
1255
|
+
/** @default bluebell-v1-en */
|
|
1256
|
+
model: string;
|
|
1257
|
+
voice_id: string;
|
|
1258
|
+
guidance_scale?: number | null;
|
|
1259
|
+
instructions?: string | null;
|
|
1260
|
+
language?: string | null;
|
|
1261
|
+
} | {
|
|
1262
|
+
/** @constant */
|
|
1263
|
+
provider: "fish";
|
|
1264
|
+
/** @default s2.1-pro */
|
|
1265
|
+
model: ("s1" | "s2-pro" | "s2.1-pro" | "drama-3") | ("speech-1.6" | "speech-1.5" | "s1-mini");
|
|
1266
|
+
voice_id: string;
|
|
1267
|
+
speed?: number | null;
|
|
1268
|
+
emotion?: string | null;
|
|
1269
|
+
language?: string | null;
|
|
1270
|
+
};
|
|
1271
|
+
/** @description Mouth-motion amplitude, as on a live call (lip_gain). Omit it for the platform default. */
|
|
1272
|
+
lipGain?: number;
|
|
1273
|
+
/** @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". */
|
|
1274
|
+
shots: {
|
|
1275
|
+
/** @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. */
|
|
1276
|
+
clipId?: string;
|
|
1277
|
+
/** @description What she says, 1 to 1,000 characters. Speech starts when the shot starts. */
|
|
1278
|
+
say?: string;
|
|
1279
|
+
/** @description How long she stays silent after speaking, 0 to 10,000 ms. Default 0. */
|
|
1280
|
+
pauseAfterMs?: number;
|
|
1281
|
+
}[];
|
|
1282
|
+
};
|
|
1283
|
+
Render: {
|
|
1284
|
+
id: string;
|
|
1285
|
+
/** @constant */
|
|
1286
|
+
object: "render";
|
|
1287
|
+
/** @enum {string} */
|
|
1288
|
+
status: "queued" | "rendering" | "ready" | "failed";
|
|
1289
|
+
avatarId: string;
|
|
1290
|
+
/** @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. */
|
|
1291
|
+
voiceId: string | null;
|
|
1292
|
+
/** @description Length of the rendered video. Set once status is ready. */
|
|
1293
|
+
durationMs: number | null;
|
|
1294
|
+
width: number | null;
|
|
1295
|
+
height: number | null;
|
|
1296
|
+
/** @description One entry per shot, in order. Set once status is ready. */
|
|
1297
|
+
timeline: {
|
|
1298
|
+
/** @description The shot's position in your shots list, from 0. */
|
|
1299
|
+
index: number;
|
|
1300
|
+
/** @description When the shot starts. */
|
|
1301
|
+
startMs: number;
|
|
1302
|
+
/** @description When the shot ends; the next shot starts here. */
|
|
1303
|
+
endMs: number;
|
|
1304
|
+
/** @description The clip the shot played: the one you named, else the loop clip it kept, else "primary". */
|
|
1305
|
+
clipId: string;
|
|
1306
|
+
/**
|
|
1307
|
+
* @description once: the clip's action played one time. loop: the clip filled the shot.
|
|
1308
|
+
* @enum {string}
|
|
1309
|
+
*/
|
|
1310
|
+
playback: "once" | "loop";
|
|
1311
|
+
/** @description When she starts speaking. Null when the shot has no say. */
|
|
1312
|
+
speechStartMs: number | null;
|
|
1313
|
+
/** @description When she stops speaking. Null when the shot has no say. */
|
|
1314
|
+
speechEndMs: number | null;
|
|
1315
|
+
/** @description When the action finished. Once clips only; null for a loop clip. */
|
|
1316
|
+
clipEndMs: number | null;
|
|
1317
|
+
/** @description The loop clip shown after the action finished, when the shot outlasts it. Once clips only; otherwise null. */
|
|
1318
|
+
afterClipId: string | null;
|
|
1319
|
+
}[] | null;
|
|
1320
|
+
/** @description Set only when status is failed. */
|
|
1321
|
+
error: {
|
|
1322
|
+
/** @enum {string} */
|
|
1323
|
+
code: "asset_unavailable" | "tts_failed" | "too_long" | "render_failed";
|
|
1324
|
+
message: string;
|
|
1325
|
+
} | null;
|
|
1326
|
+
/** Format: date-time */
|
|
1327
|
+
createdAt: string;
|
|
1328
|
+
completedAt: string | null;
|
|
1329
|
+
};
|
|
1330
|
+
ListRendersResponse: {
|
|
1331
|
+
data: {
|
|
1332
|
+
id: string;
|
|
1333
|
+
/** @constant */
|
|
1334
|
+
object: "render";
|
|
1335
|
+
/** @enum {string} */
|
|
1336
|
+
status: "queued" | "rendering" | "ready" | "failed";
|
|
1337
|
+
avatarId: string;
|
|
1338
|
+
/** @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. */
|
|
1339
|
+
voiceId: string | null;
|
|
1340
|
+
/** @description Length of the rendered video. Set once status is ready. */
|
|
1341
|
+
durationMs: number | null;
|
|
1342
|
+
width: number | null;
|
|
1343
|
+
height: number | null;
|
|
1344
|
+
/** @description One entry per shot, in order. Set once status is ready. */
|
|
1345
|
+
timeline: {
|
|
1346
|
+
/** @description The shot's position in your shots list, from 0. */
|
|
1347
|
+
index: number;
|
|
1348
|
+
/** @description When the shot starts. */
|
|
1349
|
+
startMs: number;
|
|
1350
|
+
/** @description When the shot ends; the next shot starts here. */
|
|
1351
|
+
endMs: number;
|
|
1352
|
+
/** @description The clip the shot played: the one you named, else the loop clip it kept, else "primary". */
|
|
1353
|
+
clipId: string;
|
|
1354
|
+
/**
|
|
1355
|
+
* @description once: the clip's action played one time. loop: the clip filled the shot.
|
|
1356
|
+
* @enum {string}
|
|
1357
|
+
*/
|
|
1358
|
+
playback: "once" | "loop";
|
|
1359
|
+
/** @description When she starts speaking. Null when the shot has no say. */
|
|
1360
|
+
speechStartMs: number | null;
|
|
1361
|
+
/** @description When she stops speaking. Null when the shot has no say. */
|
|
1362
|
+
speechEndMs: number | null;
|
|
1363
|
+
/** @description When the action finished. Once clips only; null for a loop clip. */
|
|
1364
|
+
clipEndMs: number | null;
|
|
1365
|
+
/** @description The loop clip shown after the action finished, when the shot outlasts it. Once clips only; otherwise null. */
|
|
1366
|
+
afterClipId: string | null;
|
|
1367
|
+
}[] | null;
|
|
1368
|
+
/** @description Set only when status is failed. */
|
|
1369
|
+
error: {
|
|
1370
|
+
/** @enum {string} */
|
|
1371
|
+
code: "asset_unavailable" | "tts_failed" | "too_long" | "render_failed";
|
|
1372
|
+
message: string;
|
|
1373
|
+
} | null;
|
|
1374
|
+
/** Format: date-time */
|
|
1375
|
+
createdAt: string;
|
|
1376
|
+
completedAt: string | null;
|
|
1377
|
+
}[];
|
|
1378
|
+
nextCursor: string | null;
|
|
1379
|
+
};
|
|
1380
|
+
RenderAccessResponse: {
|
|
1381
|
+
id: string;
|
|
1382
|
+
/** Format: uri */
|
|
1383
|
+
url: string;
|
|
1384
|
+
/** Format: date-time */
|
|
1385
|
+
expiresAt: string;
|
|
1386
|
+
};
|
|
1233
1387
|
ConnectionHistoryResponse: {
|
|
1234
1388
|
sessionId: string;
|
|
1235
1389
|
observations: {
|
|
@@ -1476,9 +1630,9 @@ interface components {
|
|
|
1476
1630
|
* @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
1631
|
* @enum {string}
|
|
1478
1632
|
*/
|
|
1479
|
-
requiredScope?: "*" | "api_keys:write" | "credits:read" | "avatars:read" | "avatars:write" | "realtime:write" | "usage:read" | "recordings:read" | "usage:write" | "speech:write";
|
|
1633
|
+
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
1634
|
/** @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")[];
|
|
1635
|
+
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
1636
|
/** @description Present on 402 — where to send the user to top up. */
|
|
1483
1637
|
billingUrl?: string;
|
|
1484
1638
|
/** @description On concurrency_limit_reached: the workspace's concurrent session limit. */
|
|
@@ -2861,6 +3015,336 @@ interface operations {
|
|
|
2861
3015
|
};
|
|
2862
3016
|
};
|
|
2863
3017
|
};
|
|
3018
|
+
listRenders: {
|
|
3019
|
+
parameters: {
|
|
3020
|
+
query?: {
|
|
3021
|
+
limit?: number;
|
|
3022
|
+
/** @description The previous response's nextCursor. */
|
|
3023
|
+
cursor?: string;
|
|
3024
|
+
};
|
|
3025
|
+
header?: never;
|
|
3026
|
+
path?: never;
|
|
3027
|
+
cookie?: never;
|
|
3028
|
+
};
|
|
3029
|
+
requestBody?: never;
|
|
3030
|
+
responses: {
|
|
3031
|
+
/** @description Renders */
|
|
3032
|
+
200: {
|
|
3033
|
+
headers: {
|
|
3034
|
+
[name: string]: unknown;
|
|
3035
|
+
};
|
|
3036
|
+
content: {
|
|
3037
|
+
"application/json": components["schemas"]["ListRendersResponse"];
|
|
3038
|
+
};
|
|
3039
|
+
};
|
|
3040
|
+
/** @description Invalid query */
|
|
3041
|
+
400: {
|
|
3042
|
+
headers: {
|
|
3043
|
+
[name: string]: unknown;
|
|
3044
|
+
};
|
|
3045
|
+
content: {
|
|
3046
|
+
"application/json": components["schemas"]["Error"];
|
|
3047
|
+
};
|
|
3048
|
+
};
|
|
3049
|
+
/** @description Missing, malformed, revoked, or expired key. */
|
|
3050
|
+
401: {
|
|
3051
|
+
headers: {
|
|
3052
|
+
[name: string]: unknown;
|
|
3053
|
+
};
|
|
3054
|
+
content: {
|
|
3055
|
+
"application/json": components["schemas"]["Error"];
|
|
3056
|
+
};
|
|
3057
|
+
};
|
|
3058
|
+
/** @description The key lacks the scope for this operation, or the tenant is not active. */
|
|
3059
|
+
403: {
|
|
3060
|
+
headers: {
|
|
3061
|
+
[name: string]: unknown;
|
|
3062
|
+
};
|
|
3063
|
+
content: {
|
|
3064
|
+
"application/json": components["schemas"]["Error"];
|
|
3065
|
+
};
|
|
3066
|
+
};
|
|
3067
|
+
/** @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`. */
|
|
3068
|
+
default: {
|
|
3069
|
+
headers: {
|
|
3070
|
+
[name: string]: unknown;
|
|
3071
|
+
};
|
|
3072
|
+
content: {
|
|
3073
|
+
"application/json": components["schemas"]["Error"];
|
|
3074
|
+
};
|
|
3075
|
+
};
|
|
3076
|
+
};
|
|
3077
|
+
};
|
|
3078
|
+
createRender: {
|
|
3079
|
+
parameters: {
|
|
3080
|
+
query?: never;
|
|
3081
|
+
header?: {
|
|
3082
|
+
/** @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. */
|
|
3083
|
+
"Idempotency-Key"?: string;
|
|
3084
|
+
};
|
|
3085
|
+
path?: never;
|
|
3086
|
+
cookie?: never;
|
|
3087
|
+
};
|
|
3088
|
+
requestBody: {
|
|
3089
|
+
content: {
|
|
3090
|
+
/**
|
|
3091
|
+
* @example {
|
|
3092
|
+
* "avatarId": "ava_0123456789abcdef0123456789abcdef",
|
|
3093
|
+
* "shots": [
|
|
3094
|
+
* {
|
|
3095
|
+
* "clipId": "gesture_send_flower",
|
|
3096
|
+
* "say": "你终于来了。今天……我有话想对你说。"
|
|
3097
|
+
* },
|
|
3098
|
+
* {
|
|
3099
|
+
* "clipId": "idle_touch_collar",
|
|
3100
|
+
* "say": "别笑,我是认真的。",
|
|
3101
|
+
* "pauseAfterMs": 800
|
|
3102
|
+
* },
|
|
3103
|
+
* {
|
|
3104
|
+
* "say": "所以,今晚留下来。"
|
|
3105
|
+
* }
|
|
3106
|
+
* ]
|
|
3107
|
+
* }
|
|
3108
|
+
*/
|
|
3109
|
+
"application/json": components["schemas"]["CreateRenderRequest"];
|
|
3110
|
+
};
|
|
3111
|
+
};
|
|
3112
|
+
responses: {
|
|
3113
|
+
/** @description Queued */
|
|
3114
|
+
202: {
|
|
3115
|
+
headers: {
|
|
3116
|
+
[name: string]: unknown;
|
|
3117
|
+
};
|
|
3118
|
+
content: {
|
|
3119
|
+
"application/json": components["schemas"]["Render"];
|
|
3120
|
+
};
|
|
3121
|
+
};
|
|
3122
|
+
/** @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) */
|
|
3123
|
+
400: {
|
|
3124
|
+
headers: {
|
|
3125
|
+
[name: string]: unknown;
|
|
3126
|
+
};
|
|
3127
|
+
content: {
|
|
3128
|
+
"application/json": components["schemas"]["Error"];
|
|
3129
|
+
};
|
|
3130
|
+
};
|
|
3131
|
+
/** @description Missing, malformed, revoked, or expired key. */
|
|
3132
|
+
401: {
|
|
3133
|
+
headers: {
|
|
3134
|
+
[name: string]: unknown;
|
|
3135
|
+
};
|
|
3136
|
+
content: {
|
|
3137
|
+
"application/json": components["schemas"]["Error"];
|
|
3138
|
+
};
|
|
3139
|
+
};
|
|
3140
|
+
/** @description Not enough credits for the estimated length, or the key's spend limit is reached */
|
|
3141
|
+
402: {
|
|
3142
|
+
headers: {
|
|
3143
|
+
[name: string]: unknown;
|
|
3144
|
+
};
|
|
3145
|
+
content: {
|
|
3146
|
+
"application/json": components["schemas"]["Error"];
|
|
3147
|
+
};
|
|
3148
|
+
};
|
|
3149
|
+
/** @description The key lacks the scope for this operation, or the tenant is not active. */
|
|
3150
|
+
403: {
|
|
3151
|
+
headers: {
|
|
3152
|
+
[name: string]: unknown;
|
|
3153
|
+
};
|
|
3154
|
+
content: {
|
|
3155
|
+
"application/json": components["schemas"]["Error"];
|
|
3156
|
+
};
|
|
3157
|
+
};
|
|
3158
|
+
/** @description Avatar not found in this workspace, or a voiceId it cannot see (voice_not_found) */
|
|
3159
|
+
404: {
|
|
3160
|
+
headers: {
|
|
3161
|
+
[name: string]: unknown;
|
|
3162
|
+
};
|
|
3163
|
+
content: {
|
|
3164
|
+
"application/json": components["schemas"]["Error"];
|
|
3165
|
+
};
|
|
3166
|
+
};
|
|
3167
|
+
/** @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 */
|
|
3168
|
+
422: {
|
|
3169
|
+
headers: {
|
|
3170
|
+
[name: string]: unknown;
|
|
3171
|
+
};
|
|
3172
|
+
content: {
|
|
3173
|
+
"application/json": components["schemas"]["Error"];
|
|
3174
|
+
};
|
|
3175
|
+
};
|
|
3176
|
+
/** @description This workspace already has the maximum number of renders queued or rendering (concurrency_limit_reached) */
|
|
3177
|
+
429: {
|
|
3178
|
+
headers: {
|
|
3179
|
+
[name: string]: unknown;
|
|
3180
|
+
};
|
|
3181
|
+
content: {
|
|
3182
|
+
"application/json": components["schemas"]["Error"];
|
|
3183
|
+
};
|
|
3184
|
+
};
|
|
3185
|
+
/** @description Rendering is not available on this deployment (render_export_unavailable, not retryable), or this render could not be started (render_start_failed, retryable) */
|
|
3186
|
+
503: {
|
|
3187
|
+
headers: {
|
|
3188
|
+
[name: string]: unknown;
|
|
3189
|
+
};
|
|
3190
|
+
content: {
|
|
3191
|
+
"application/json": components["schemas"]["Error"];
|
|
3192
|
+
};
|
|
3193
|
+
};
|
|
3194
|
+
/** @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`. */
|
|
3195
|
+
default: {
|
|
3196
|
+
headers: {
|
|
3197
|
+
[name: string]: unknown;
|
|
3198
|
+
};
|
|
3199
|
+
content: {
|
|
3200
|
+
"application/json": components["schemas"]["Error"];
|
|
3201
|
+
};
|
|
3202
|
+
};
|
|
3203
|
+
};
|
|
3204
|
+
};
|
|
3205
|
+
getRender: {
|
|
3206
|
+
parameters: {
|
|
3207
|
+
query?: never;
|
|
3208
|
+
header?: never;
|
|
3209
|
+
path: {
|
|
3210
|
+
renderId: string;
|
|
3211
|
+
};
|
|
3212
|
+
cookie?: never;
|
|
3213
|
+
};
|
|
3214
|
+
requestBody?: never;
|
|
3215
|
+
responses: {
|
|
3216
|
+
/** @description Render */
|
|
3217
|
+
200: {
|
|
3218
|
+
headers: {
|
|
3219
|
+
[name: string]: unknown;
|
|
3220
|
+
};
|
|
3221
|
+
content: {
|
|
3222
|
+
"application/json": components["schemas"]["Render"];
|
|
3223
|
+
};
|
|
3224
|
+
};
|
|
3225
|
+
/** @description Missing, malformed, revoked, or expired key. */
|
|
3226
|
+
401: {
|
|
3227
|
+
headers: {
|
|
3228
|
+
[name: string]: unknown;
|
|
3229
|
+
};
|
|
3230
|
+
content: {
|
|
3231
|
+
"application/json": components["schemas"]["Error"];
|
|
3232
|
+
};
|
|
3233
|
+
};
|
|
3234
|
+
/** @description The key lacks the scope for this operation, or the tenant is not active. */
|
|
3235
|
+
403: {
|
|
3236
|
+
headers: {
|
|
3237
|
+
[name: string]: unknown;
|
|
3238
|
+
};
|
|
3239
|
+
content: {
|
|
3240
|
+
"application/json": components["schemas"]["Error"];
|
|
3241
|
+
};
|
|
3242
|
+
};
|
|
3243
|
+
/** @description No render with this id in this workspace (render_not_found) */
|
|
3244
|
+
404: {
|
|
3245
|
+
headers: {
|
|
3246
|
+
[name: string]: unknown;
|
|
3247
|
+
};
|
|
3248
|
+
content: {
|
|
3249
|
+
"application/json": components["schemas"]["Error"];
|
|
3250
|
+
};
|
|
3251
|
+
};
|
|
3252
|
+
/** @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`. */
|
|
3253
|
+
default: {
|
|
3254
|
+
headers: {
|
|
3255
|
+
[name: string]: unknown;
|
|
3256
|
+
};
|
|
3257
|
+
content: {
|
|
3258
|
+
"application/json": components["schemas"]["Error"];
|
|
3259
|
+
};
|
|
3260
|
+
};
|
|
3261
|
+
};
|
|
3262
|
+
};
|
|
3263
|
+
getRenderAccess: {
|
|
3264
|
+
parameters: {
|
|
3265
|
+
query?: never;
|
|
3266
|
+
header?: never;
|
|
3267
|
+
path: {
|
|
3268
|
+
renderId: string;
|
|
3269
|
+
};
|
|
3270
|
+
cookie?: never;
|
|
3271
|
+
};
|
|
3272
|
+
requestBody?: never;
|
|
3273
|
+
responses: {
|
|
3274
|
+
/** @description Temporary access */
|
|
3275
|
+
200: {
|
|
3276
|
+
headers: {
|
|
3277
|
+
[name: string]: unknown;
|
|
3278
|
+
};
|
|
3279
|
+
content: {
|
|
3280
|
+
"application/json": components["schemas"]["RenderAccessResponse"];
|
|
3281
|
+
};
|
|
3282
|
+
};
|
|
3283
|
+
/** @description Missing, malformed, revoked, or expired key. */
|
|
3284
|
+
401: {
|
|
3285
|
+
headers: {
|
|
3286
|
+
[name: string]: unknown;
|
|
3287
|
+
};
|
|
3288
|
+
content: {
|
|
3289
|
+
"application/json": components["schemas"]["Error"];
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
3292
|
+
/** @description The key lacks the scope for this operation, or the tenant is not active. */
|
|
3293
|
+
403: {
|
|
3294
|
+
headers: {
|
|
3295
|
+
[name: string]: unknown;
|
|
3296
|
+
};
|
|
3297
|
+
content: {
|
|
3298
|
+
"application/json": components["schemas"]["Error"];
|
|
3299
|
+
};
|
|
3300
|
+
};
|
|
3301
|
+
/** @description No render with this id in this workspace (render_not_found) */
|
|
3302
|
+
404: {
|
|
3303
|
+
headers: {
|
|
3304
|
+
[name: string]: unknown;
|
|
3305
|
+
};
|
|
3306
|
+
content: {
|
|
3307
|
+
"application/json": components["schemas"]["Error"];
|
|
3308
|
+
};
|
|
3309
|
+
};
|
|
3310
|
+
/** @description The render is not ready (render_not_ready) */
|
|
3311
|
+
409: {
|
|
3312
|
+
headers: {
|
|
3313
|
+
[name: string]: unknown;
|
|
3314
|
+
};
|
|
3315
|
+
content: {
|
|
3316
|
+
"application/json": components["schemas"]["Error"];
|
|
3317
|
+
};
|
|
3318
|
+
};
|
|
3319
|
+
/** @description The render's video is no longer stored (render_gone) */
|
|
3320
|
+
410: {
|
|
3321
|
+
headers: {
|
|
3322
|
+
[name: string]: unknown;
|
|
3323
|
+
};
|
|
3324
|
+
content: {
|
|
3325
|
+
"application/json": components["schemas"]["Error"];
|
|
3326
|
+
};
|
|
3327
|
+
};
|
|
3328
|
+
/** @description Render storage temporarily unavailable */
|
|
3329
|
+
503: {
|
|
3330
|
+
headers: {
|
|
3331
|
+
[name: string]: unknown;
|
|
3332
|
+
};
|
|
3333
|
+
content: {
|
|
3334
|
+
"application/json": components["schemas"]["Error"];
|
|
3335
|
+
};
|
|
3336
|
+
};
|
|
3337
|
+
/** @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`. */
|
|
3338
|
+
default: {
|
|
3339
|
+
headers: {
|
|
3340
|
+
[name: string]: unknown;
|
|
3341
|
+
};
|
|
3342
|
+
content: {
|
|
3343
|
+
"application/json": components["schemas"]["Error"];
|
|
3344
|
+
};
|
|
3345
|
+
};
|
|
3346
|
+
};
|
|
3347
|
+
};
|
|
2864
3348
|
listUsageSessions: {
|
|
2865
3349
|
parameters: {
|
|
2866
3350
|
query?: {
|
|
@@ -3748,6 +4232,35 @@ type UsageSessionPage = ReturnType<typeof toSessionsPage>;
|
|
|
3748
4232
|
type ListSessionsOptions = NonNullable<operations["listUsageSessions"]["parameters"]["query"]> & {
|
|
3749
4233
|
speechDiagnostics?: NonNullable<operations["listUsageSessions"]["parameters"]["header"]>["X-RTA-Speech-Diagnostics"] extends "1" | undefined ? boolean : never;
|
|
3750
4234
|
};
|
|
4235
|
+
type CreateRenderWire = Wire["CreateRenderRequest"];
|
|
4236
|
+
type OptionalModel<V> = V extends {
|
|
4237
|
+
model: unknown;
|
|
4238
|
+
} ? Omit<V, "model"> & Partial<Pick<V, "model">> : V;
|
|
4239
|
+
/**
|
|
4240
|
+
* A pre-rendered video request: the avatar, an optional voice, and the script as `shots`.
|
|
4241
|
+
* Everything in one shot happens at the same time; shots play one after another. The body is
|
|
4242
|
+
* camelCase on the wire too, so it is sent exactly as given, except the inline `voice`, which is
|
|
4243
|
+
* the live call's snake_case voice object (`voice_id`).
|
|
4244
|
+
*
|
|
4245
|
+
* The voice is `voiceId` (a voice from the workspace's voice library), or `voice` (an inline Fish
|
|
4246
|
+
* voice), or neither (the avatar's own). Only a Fish voice renders: an inline voice of another
|
|
4247
|
+
* provider, and an avatar whose own voice is not Fish when neither was sent, are
|
|
4248
|
+
* `422 voice_unavailable`.
|
|
4249
|
+
*
|
|
4250
|
+
* DERIVATION: every field indexes `CreateRenderRequest`; two rules the generator drops are
|
|
4251
|
+
* restated. The published `not: { required: ["voice", "voiceId"] }` (the platform refuses both
|
|
4252
|
+
* with 422) is the either/or union, so sending both fails to compile. And `voice.model` has a
|
|
4253
|
+
* published default that openapi-typescript renders as required; the wire accepts it omitted.
|
|
4254
|
+
*/
|
|
4255
|
+
type CreateRenderInput = Omit<CreateRenderWire, "voice" | "voiceId"> & ({
|
|
4256
|
+
voice?: OptionalModel<NonNullable<CreateRenderWire["voice"]>>;
|
|
4257
|
+
voiceId?: never;
|
|
4258
|
+
} | {
|
|
4259
|
+
voice?: never;
|
|
4260
|
+
voiceId?: CreateRenderWire["voiceId"];
|
|
4261
|
+
});
|
|
4262
|
+
/** One shot: `clipId` is what she does, `say` what she says, `pauseAfterMs` the silence after it. */
|
|
4263
|
+
type RenderShot = Wire["CreateRenderRequest"]["shots"][number];
|
|
3751
4264
|
type CreditBalance = Pick<Wire["CreditBalance"], "balanceCreditMicros" | "reservedCreditMicros">;
|
|
3752
4265
|
/**
|
|
3753
4266
|
* Complete desired sources and behavior; expectedRevision protects concurrent edits.
|
|
@@ -3833,4 +4346,4 @@ interface TranscriptPayload {
|
|
|
3833
4346
|
client_metadata: Record<string, string>;
|
|
3834
4347
|
}
|
|
3835
4348
|
|
|
3836
|
-
export { type Avatar as A, type
|
|
4349
|
+
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-DOFXGl7G.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.31.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",
|