@mindstudio-ai/agent 0.1.148 → 0.1.150
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/dist/cli.js +126 -113
- package/dist/index.d.ts +188 -33
- package/dist/index.js +131 -119
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +126 -113
- package/llms.txt +40 -27
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -537,6 +537,15 @@ interface MindStudioModel {
|
|
|
537
537
|
maxResponseSize?: number;
|
|
538
538
|
/** Accepted input types for this model (text, imageUrl, videoUrl, etc.). */
|
|
539
539
|
inputs?: Record<string, unknown>[];
|
|
540
|
+
/**
|
|
541
|
+
* When the platform retires this model (`YYYY-MM-DD`, from 00:00 UTC). Until
|
|
542
|
+
* then it runs as itself; from then saved calls run on `replacedBy`.
|
|
543
|
+
*/
|
|
544
|
+
retiresOn?: string;
|
|
545
|
+
/** The model that runs in this one's place once it has retired. */
|
|
546
|
+
replacedBy?: string;
|
|
547
|
+
/** True once the model has retired: a call to it runs on `replacedBy`. */
|
|
548
|
+
retired?: boolean;
|
|
540
549
|
}
|
|
541
550
|
/** A lightweight AI model summary. */
|
|
542
551
|
interface MindStudioModelSummary {
|
|
@@ -547,6 +556,15 @@ interface MindStudioModelSummary {
|
|
|
547
556
|
type?: ModelType;
|
|
548
557
|
/** Comma-separated tags for the model. */
|
|
549
558
|
tags?: string;
|
|
559
|
+
/**
|
|
560
|
+
* When the platform retires this model (`YYYY-MM-DD`, from 00:00 UTC). Until
|
|
561
|
+
* then it runs as itself; from then saved calls run on `replacedBy`.
|
|
562
|
+
*/
|
|
563
|
+
retiresOn?: string;
|
|
564
|
+
/** The model that runs in this one's place once it has retired. */
|
|
565
|
+
replacedBy?: string;
|
|
566
|
+
/** True once the model has retired: a call to it runs on `replacedBy`. */
|
|
567
|
+
retired?: boolean;
|
|
550
568
|
}
|
|
551
569
|
/**
|
|
552
570
|
* Supported model type categories for filtering.
|
|
@@ -1073,7 +1091,10 @@ type Accessor<T, R = unknown> = (row: T) => R;
|
|
|
1073
1091
|
* queries against the correct database.
|
|
1074
1092
|
*/
|
|
1075
1093
|
interface TableConfig {
|
|
1076
|
-
/**
|
|
1094
|
+
/**
|
|
1095
|
+
* The managed database ID (from app context metadata). Empty on a lazy
|
|
1096
|
+
* table until its context is loaded (`ready`).
|
|
1097
|
+
*/
|
|
1077
1098
|
databaseId: string;
|
|
1078
1099
|
/** The SQL table name (as declared in defineTable). */
|
|
1079
1100
|
tableName: string;
|
|
@@ -1120,6 +1141,15 @@ interface TableConfig {
|
|
|
1120
1141
|
* @returns Array of results in the same order as the input queries
|
|
1121
1142
|
*/
|
|
1122
1143
|
executeBatch: (queries: SqlQuery[]) => Promise<SqlResult[]>;
|
|
1144
|
+
/**
|
|
1145
|
+
* Loads the app's context, for a table defined before it was available
|
|
1146
|
+
* (the lazy db's `defineTable`). Such a table's database, columns and
|
|
1147
|
+
* managed columns read the context whenever they're read, so whatever
|
|
1148
|
+
* builds SQL from them awaits this first: built without them, a write
|
|
1149
|
+
* stores a user ID with no `@@user@@` prefix and skips the managed-column
|
|
1150
|
+
* check. Absent on a table made with its context in hand.
|
|
1151
|
+
*/
|
|
1152
|
+
ready?: () => Promise<void>;
|
|
1123
1153
|
}
|
|
1124
1154
|
/** A single SQL query with optional positional bind params. */
|
|
1125
1155
|
interface SqlQuery {
|
|
@@ -1469,6 +1499,14 @@ interface CompiledQuery<T, TResult = T[]> {
|
|
|
1469
1499
|
* then bundles it with other operations into a single round trip. After
|
|
1470
1500
|
* execution, `_processResults()` deserializes the raw SQL results.
|
|
1471
1501
|
*
|
|
1502
|
+
* ## SQL is built when it runs
|
|
1503
|
+
*
|
|
1504
|
+
* A Mutation holds a builder rather than its statements, called when it's
|
|
1505
|
+
* compiled or executed. The statements depend on the table's columns (a user
|
|
1506
|
+
* column's `@@user@@` prefix) and managed columns, which a lazy table only
|
|
1507
|
+
* knows once the app's context is loaded (`TableConfig.ready`), and that can
|
|
1508
|
+
* be after the write method was called.
|
|
1509
|
+
*
|
|
1472
1510
|
* ## Non-batchable mutations
|
|
1473
1511
|
*
|
|
1474
1512
|
* Some mutations (e.g. `removeAll` with a JS-fallback predicate) require
|
|
@@ -1487,12 +1525,12 @@ declare class Mutation<TResult> implements PromiseLike<TResult> {
|
|
|
1487
1525
|
/** @internal */
|
|
1488
1526
|
private readonly _config;
|
|
1489
1527
|
/** @internal */
|
|
1490
|
-
private readonly
|
|
1528
|
+
private readonly _build;
|
|
1491
1529
|
/** @internal */
|
|
1492
1530
|
private readonly _processResult;
|
|
1493
1531
|
/** @internal Non-batchable executor for complex mutations (e.g. removeAll JS fallback). */
|
|
1494
1532
|
private readonly _executor;
|
|
1495
|
-
constructor(config: TableConfig,
|
|
1533
|
+
constructor(config: TableConfig, build: () => SqlQuery[], processResult: (results: SqlResult[]) => TResult);
|
|
1496
1534
|
/**
|
|
1497
1535
|
* Create a non-batchable mutation that wraps an async executor.
|
|
1498
1536
|
* Used for operations that require multi-step execution (e.g. removeAll
|
|
@@ -1668,10 +1706,11 @@ interface CompiledRawQuery<TResult> {
|
|
|
1668
1706
|
processResult: (result: SqlResult) => TResult;
|
|
1669
1707
|
}
|
|
1670
1708
|
declare class RawQuery<TResult = Record<string, unknown>[]> implements PromiseLike<TResult> {
|
|
1709
|
+
/** Read when it's compiled: the lazy db's database is known only once its context is. */
|
|
1671
1710
|
private readonly _databaseId;
|
|
1672
1711
|
private readonly _executeBatch;
|
|
1673
1712
|
private readonly _query;
|
|
1674
|
-
constructor(databaseId: string, executeBatch: (queries: SqlQuery[]) => Promise<SqlResult[]>, query: SqlQuery);
|
|
1713
|
+
constructor(databaseId: () => string, executeBatch: (queries: SqlQuery[]) => Promise<SqlResult[]>, query: SqlQuery);
|
|
1675
1714
|
then<T1 = TResult, T2 = never>(onfulfilled?: ((value: TResult) => T1 | PromiseLike<T1>) | null, onrejected?: ((reason: unknown) => T2 | PromiseLike<T2>) | null): Promise<T1 | T2>;
|
|
1676
1715
|
catch<T2 = never>(onrejected?: ((reason: unknown) => T2 | PromiseLike<T2>) | null): Promise<TResult | T2>;
|
|
1677
1716
|
/** @internal Compile for db.batch(). */
|
|
@@ -5479,7 +5518,12 @@ interface CreateDataSourceStepInput {
|
|
|
5479
5518
|
/** Name for the new data source (supports variable interpolation) */
|
|
5480
5519
|
name: string;
|
|
5481
5520
|
}
|
|
5482
|
-
|
|
5521
|
+
interface CreateDataSourceStepOutput {
|
|
5522
|
+
/** ID of the newly created data source */
|
|
5523
|
+
dataSourceId: string;
|
|
5524
|
+
/** Resolved name of the data source */
|
|
5525
|
+
name: string;
|
|
5526
|
+
}
|
|
5483
5527
|
interface CreateGmailDraftStepInput {
|
|
5484
5528
|
/** Recipient email address(es), comma-separated for multiple */
|
|
5485
5529
|
to: string;
|
|
@@ -5563,14 +5607,22 @@ interface DeleteDataSourceStepInput {
|
|
|
5563
5607
|
/** ID of the data source to delete (supports variable interpolation) */
|
|
5564
5608
|
dataSourceId: string;
|
|
5565
5609
|
}
|
|
5566
|
-
|
|
5610
|
+
interface DeleteDataSourceStepOutput {
|
|
5611
|
+
/** ID of the deleted data source */
|
|
5612
|
+
dataSourceId: string;
|
|
5613
|
+
}
|
|
5567
5614
|
interface DeleteDataSourceDocumentStepInput {
|
|
5568
5615
|
/** ID of the data source containing the document (supports variable interpolation) */
|
|
5569
5616
|
dataSourceId: string;
|
|
5570
5617
|
/** ID of the document to delete (supports variable interpolation) */
|
|
5571
5618
|
documentId: string;
|
|
5572
5619
|
}
|
|
5573
|
-
|
|
5620
|
+
interface DeleteDataSourceDocumentStepOutput {
|
|
5621
|
+
/** ID of the data source */
|
|
5622
|
+
dataSourceId: string;
|
|
5623
|
+
/** ID of the deleted document */
|
|
5624
|
+
documentId: string;
|
|
5625
|
+
}
|
|
5574
5626
|
interface DeleteGmailEmailStepInput {
|
|
5575
5627
|
/** Gmail message ID to delete (move to trash) */
|
|
5576
5628
|
messageId: string;
|
|
@@ -5780,7 +5832,18 @@ interface FetchDataSourceDocumentStepInput {
|
|
|
5780
5832
|
/** ID of the document to fetch (supports variable interpolation) */
|
|
5781
5833
|
documentId: string;
|
|
5782
5834
|
}
|
|
5783
|
-
|
|
5835
|
+
interface FetchDataSourceDocumentStepOutput {
|
|
5836
|
+
/** ID of the document */
|
|
5837
|
+
documentId: string;
|
|
5838
|
+
/** Document name */
|
|
5839
|
+
name: string;
|
|
5840
|
+
/** Full extracted text content */
|
|
5841
|
+
content: string;
|
|
5842
|
+
/** Document summary */
|
|
5843
|
+
summary: string;
|
|
5844
|
+
/** Word count */
|
|
5845
|
+
numWords: number;
|
|
5846
|
+
}
|
|
5784
5847
|
interface FetchGoogleDocStepInput {
|
|
5785
5848
|
/** Google Document ID (from the document URL) */
|
|
5786
5849
|
documentId: string;
|
|
@@ -6331,13 +6394,16 @@ interface GenerateLipsyncStepInput {
|
|
|
6331
6394
|
* The watermark is a product mark on assets generated in the MindStudio UI. A step run directly via the SDK or API is producing the app's own asset, so it is never watermarked and this flag has no effect there.
|
|
6332
6395
|
*/
|
|
6333
6396
|
addWatermark?: boolean;
|
|
6334
|
-
/**
|
|
6397
|
+
/** The lip sync model to run and its config, whose keys come from the model: the media (`image` or `video`, and `audio`) and the model's options */
|
|
6335
6398
|
lipsyncModelOverride?: {
|
|
6336
6399
|
model: string;
|
|
6337
6400
|
config?: Record<string, unknown>;
|
|
6338
6401
|
};
|
|
6339
6402
|
}
|
|
6340
|
-
|
|
6403
|
+
interface GenerateLipsyncStepOutput {
|
|
6404
|
+
/** URL of the generated lip sync video */
|
|
6405
|
+
videoUrl: string;
|
|
6406
|
+
}
|
|
6341
6407
|
interface GenerateMusicStepInput {
|
|
6342
6408
|
/** The instructions (prompt) for the music generation */
|
|
6343
6409
|
text: string;
|
|
@@ -6349,7 +6415,10 @@ interface GenerateMusicStepInput {
|
|
|
6349
6415
|
config?: Record<string, unknown>;
|
|
6350
6416
|
};
|
|
6351
6417
|
}
|
|
6352
|
-
|
|
6418
|
+
interface GenerateMusicStepOutput {
|
|
6419
|
+
/** URL of the generated audio file */
|
|
6420
|
+
audioUrl: string;
|
|
6421
|
+
}
|
|
6353
6422
|
interface GeneratePdfStepInput {
|
|
6354
6423
|
/** The HTML or Markdown source template for the asset */
|
|
6355
6424
|
source: string;
|
|
@@ -6498,7 +6567,15 @@ interface GetGmailAttachmentsStepInput {
|
|
|
6498
6567
|
/** Google OAuth connection ID */
|
|
6499
6568
|
connectionId?: string;
|
|
6500
6569
|
}
|
|
6501
|
-
|
|
6570
|
+
interface GetGmailAttachmentsStepOutput {
|
|
6571
|
+
/** List of attachments with CDN URLs */
|
|
6572
|
+
attachments: {
|
|
6573
|
+
filename: string;
|
|
6574
|
+
mimeType: string;
|
|
6575
|
+
size: number;
|
|
6576
|
+
url: string;
|
|
6577
|
+
}[];
|
|
6578
|
+
}
|
|
6502
6579
|
interface GetGmailDraftStepInput {
|
|
6503
6580
|
/** Gmail draft ID to retrieve */
|
|
6504
6581
|
draftId: string;
|
|
@@ -6545,7 +6622,10 @@ interface GetGmailUnreadCountStepInput {
|
|
|
6545
6622
|
/** Google OAuth connection ID */
|
|
6546
6623
|
connectionId?: string;
|
|
6547
6624
|
}
|
|
6548
|
-
|
|
6625
|
+
interface GetGmailUnreadCountStepOutput {
|
|
6626
|
+
/** Number of unread messages in the inbox */
|
|
6627
|
+
unreadCount: number;
|
|
6628
|
+
}
|
|
6549
6629
|
interface GetGoogleCalendarEventStepInput {
|
|
6550
6630
|
/** Google OAuth connection ID */
|
|
6551
6631
|
connectionId?: string;
|
|
@@ -6983,7 +7063,25 @@ interface InsertVideoClipsStepOutput {
|
|
|
6983
7063
|
videoUrl: string;
|
|
6984
7064
|
}
|
|
6985
7065
|
type ListDataSourcesStepInput = Record<string, unknown>;
|
|
6986
|
-
|
|
7066
|
+
interface ListDataSourcesStepOutput {
|
|
7067
|
+
/** All data sources for the current app version */
|
|
7068
|
+
dataSources: ({
|
|
7069
|
+
id: string;
|
|
7070
|
+
name: string;
|
|
7071
|
+
description: string;
|
|
7072
|
+
/** One of: `loaded`, `hibernating`. */
|
|
7073
|
+
status: "loaded" | "hibernating";
|
|
7074
|
+
dateCreated: string;
|
|
7075
|
+
documents: ({
|
|
7076
|
+
id: string;
|
|
7077
|
+
name: string;
|
|
7078
|
+
/** One of: `processing`, `done`, `error`. */
|
|
7079
|
+
status: "processing" | "done" | "error";
|
|
7080
|
+
numWords?: number;
|
|
7081
|
+
dateUploaded: string;
|
|
7082
|
+
})[];
|
|
7083
|
+
})[];
|
|
7084
|
+
}
|
|
6987
7085
|
interface ListGmailDraftsStepInput {
|
|
6988
7086
|
/** Google OAuth connection ID */
|
|
6989
7087
|
connectionId?: string;
|
|
@@ -7011,7 +7109,14 @@ interface ListGmailLabelsStepInput {
|
|
|
7011
7109
|
/** Google OAuth connection ID */
|
|
7012
7110
|
connectionId?: string;
|
|
7013
7111
|
}
|
|
7014
|
-
|
|
7112
|
+
interface ListGmailLabelsStepOutput {
|
|
7113
|
+
/** List of Gmail labels */
|
|
7114
|
+
labels: {
|
|
7115
|
+
id: string;
|
|
7116
|
+
name: string;
|
|
7117
|
+
type: string;
|
|
7118
|
+
}[];
|
|
7119
|
+
}
|
|
7015
7120
|
interface ListGoogleCalendarEventsStepInput {
|
|
7016
7121
|
/** Google OAuth connection ID */
|
|
7017
7122
|
connectionId?: string;
|
|
@@ -7094,7 +7199,27 @@ interface ListRecentGmailEmailsStepInput {
|
|
|
7094
7199
|
/** Maximum number of emails to return (1-100, default: 5) */
|
|
7095
7200
|
limit: string;
|
|
7096
7201
|
}
|
|
7097
|
-
|
|
7202
|
+
interface ListRecentGmailEmailsStepOutput {
|
|
7203
|
+
/** List of recent email messages */
|
|
7204
|
+
emails: {
|
|
7205
|
+
/** Gmail message ID */
|
|
7206
|
+
id: string;
|
|
7207
|
+
/** Email subject line */
|
|
7208
|
+
subject: string;
|
|
7209
|
+
/** Sender email address */
|
|
7210
|
+
from: string;
|
|
7211
|
+
/** Recipient email address */
|
|
7212
|
+
to: string;
|
|
7213
|
+
/** Email date */
|
|
7214
|
+
date: string;
|
|
7215
|
+
/** Plain text body content */
|
|
7216
|
+
plainBody: string;
|
|
7217
|
+
/** HTML body content (if available) */
|
|
7218
|
+
htmlBody: string;
|
|
7219
|
+
/** Comma-separated label IDs applied to the email */
|
|
7220
|
+
labels: string;
|
|
7221
|
+
}[];
|
|
7222
|
+
}
|
|
7098
7223
|
interface LogicStepInput {
|
|
7099
7224
|
/** Evaluation mode: 'ai' for LLM-based, 'comparison' for operator-based. Default: 'ai' */
|
|
7100
7225
|
mode?: "ai" | "comparison";
|
|
@@ -8317,7 +8442,10 @@ interface SendGmailDraftStepInput {
|
|
|
8317
8442
|
/** Google OAuth connection ID */
|
|
8318
8443
|
connectionId?: string;
|
|
8319
8444
|
}
|
|
8320
|
-
|
|
8445
|
+
interface SendGmailDraftStepOutput {
|
|
8446
|
+
/** Gmail message ID of the sent email */
|
|
8447
|
+
messageId: string;
|
|
8448
|
+
}
|
|
8321
8449
|
interface SendGmailMessageStepInput {
|
|
8322
8450
|
/** Recipient email address(es), comma-separated for multiple */
|
|
8323
8451
|
to: string;
|
|
@@ -8362,7 +8490,10 @@ interface SetGmailReadStatusStepInput {
|
|
|
8362
8490
|
/** Google OAuth connection ID */
|
|
8363
8491
|
connectionId?: string;
|
|
8364
8492
|
}
|
|
8365
|
-
|
|
8493
|
+
interface SetGmailReadStatusStepOutput {
|
|
8494
|
+
/** IDs of the updated messages */
|
|
8495
|
+
messageIds: string[];
|
|
8496
|
+
}
|
|
8366
8497
|
interface SetRunTitleStepInput {
|
|
8367
8498
|
/** The title to assign to the agent run (supports variable interpolation) */
|
|
8368
8499
|
title: string;
|
|
@@ -8438,6 +8569,8 @@ interface TranscribeAudioStepOutput {
|
|
|
8438
8569
|
language?: string;
|
|
8439
8570
|
/** Length of the transcribed audio, when the model reports it. */
|
|
8440
8571
|
durationSeconds?: number;
|
|
8572
|
+
/** The transcript as an SRT or WebVTT file, when `subtitles` was asked for in the model's config and the model returned segments to time it by. */
|
|
8573
|
+
subtitles?: string;
|
|
8441
8574
|
}
|
|
8442
8575
|
interface TrimMediaStepInput {
|
|
8443
8576
|
/** URL of the source audio or video file to trim */
|
|
@@ -8454,19 +8587,21 @@ interface TrimMediaStepOutput {
|
|
|
8454
8587
|
mediaUrl: string;
|
|
8455
8588
|
}
|
|
8456
8589
|
interface TypesafeEvaluateStepInput {
|
|
8457
|
-
/** The content to evaluate. A string, or a JSON object or array.
|
|
8590
|
+
/** The content to evaluate. A string, or a JSON object or array. */
|
|
8458
8591
|
state: string | Record<string, unknown> | unknown[];
|
|
8459
8592
|
/** Questions to ask about the state, keyed by an id you choose. */
|
|
8460
8593
|
questions: Record<string, unknown>;
|
|
8461
|
-
/** Model id or alias. Defaults to jev-latest. jev-preview tracks the newest release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version. */
|
|
8594
|
+
/** Model id or alias. Defaults to jev-latest. jev-preview tracks the newest TypeSafe release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version. clef and clef-flash run Cloudflare Clef, with the same questions and answers. */
|
|
8462
8595
|
model?: string;
|
|
8596
|
+
/** Images for Clef to read, up to 4. Each entry is a URL or a data URL (PNG, JPEG, or WebP). A Jev call that includes images is rejected. */
|
|
8597
|
+
images?: string[];
|
|
8463
8598
|
}
|
|
8464
8599
|
interface TypesafeEvaluateStepOutput {
|
|
8465
8600
|
/** Versioned model id that answered, such as jev-1.13.0. */
|
|
8466
8601
|
model: string;
|
|
8467
8602
|
/** One answer per question, under the same ids. */
|
|
8468
8603
|
answers: Record<string, unknown>;
|
|
8469
|
-
/** Token counts for the call. Input tokens are what the
|
|
8604
|
+
/** Token counts for the call. Input tokens are what the model bills. */
|
|
8470
8605
|
usage: {
|
|
8471
8606
|
input_tokens: number;
|
|
8472
8607
|
output_tokens: number;
|
|
@@ -8554,7 +8689,14 @@ interface UploadDataSourceDocumentStepInput {
|
|
|
8554
8689
|
/** Display name for the document (supports variable interpolation) */
|
|
8555
8690
|
fileName: string;
|
|
8556
8691
|
}
|
|
8557
|
-
|
|
8692
|
+
interface UploadDataSourceDocumentStepOutput {
|
|
8693
|
+
/** ID of the uploaded document */
|
|
8694
|
+
documentId: string;
|
|
8695
|
+
/** ID of the data source it was uploaded to */
|
|
8696
|
+
dataSourceId: string;
|
|
8697
|
+
/** Resolved file name */
|
|
8698
|
+
fileName: string;
|
|
8699
|
+
}
|
|
8558
8700
|
interface UpscaleImageStepInput {
|
|
8559
8701
|
/** URL of the image to upscale */
|
|
8560
8702
|
imageUrl: string;
|
|
@@ -9928,7 +10070,7 @@ interface StepMethods {
|
|
|
9928
10070
|
*/
|
|
9929
10071
|
generateImage(step: GenerateImageStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<GenerateImageStepOutput>>;
|
|
9930
10072
|
/**
|
|
9931
|
-
* Generate a lip sync video from
|
|
10073
|
+
* Generate a lip sync video from audio and an image or video.
|
|
9932
10074
|
*
|
|
9933
10075
|
* @remarks
|
|
9934
10076
|
* - In foreground mode, the video is displayed to the user. In background mode, the URL is saved to a variable.
|
|
@@ -11428,6 +11570,10 @@ interface StepMethods {
|
|
|
11428
11570
|
*
|
|
11429
11571
|
* @remarks
|
|
11430
11572
|
* - The text field contains the exact words to be spoken (not instructions).
|
|
11573
|
+
* - Voice, delivery and format are set through `speechModelOverride.config`, whose keys are the model's own (look a model up with its id). Delivery direction, where a model takes one, is never spoken: `styleInstruction` on gemini-3.8-flash-tts and gemini-3.8-flash-lite-tts, `instructions` on gpt-realtime-2.1-mini-tts, `voice_instruction` on seed-speech-tts-2.0, `emotion` on cartesia-sonic-3.6 and the MiniMax models.
|
|
11574
|
+
* - Tags in the text act at that point, in each vendor's own syntax: `[laughs]` or `[whispers]` on elevenlabs-tts with Eleven v4 or v3; `<laugh>`, `<sigh>` or `<whispers>` on the Gemini 3.8 models; `[laugh]`, `[pause]` or `<whisper>…</whisper>` on grok-voice-tts; `[laughter]` or `<emotion value="excited"/>` on cartesia-sonic-3.6; `[be happy and upbeat]` on inworld-tts-2.
|
|
11575
|
+
* - A dialogue between voices: set `$mode: 'dialogue'` and name each speaker (`speaker1_name`, `speaker1_voice`, `speaker2_name`, …), then write the text as a script, one `Name: line` per turn. Supported by elevenlabs-tts (Eleven v4 or v3, up to 4 speakers) and the Gemini 3.8 models (exactly 2).
|
|
11576
|
+
* - A text longer than a model takes in one request is spoken in pieces and joined, and then comes back as MP3 whatever format was asked for.
|
|
11431
11577
|
* - In foreground mode, the audio is displayed to the user. In background mode, the URL is saved to a variable.
|
|
11432
11578
|
*
|
|
11433
11579
|
* @example
|
|
@@ -11442,12 +11588,20 @@ interface StepMethods {
|
|
|
11442
11588
|
* Convert an audio file to text using a transcription model.
|
|
11443
11589
|
*
|
|
11444
11590
|
* @remarks
|
|
11445
|
-
* - The
|
|
11446
|
-
* -
|
|
11447
|
-
* -
|
|
11448
|
-
* - `
|
|
11449
|
-
* - `detectLanguage: 'yes'` — detect the
|
|
11450
|
-
* -
|
|
11591
|
+
* - The default model is elevenlabs-scribe-v2: speakers, word timings, key terms and redaction, at any length.
|
|
11592
|
+
* - The prompt field gives context (speaker names, domain) to OpenAI's and DeepInfra's models. Other models ignore it; give them `keyterms` instead.
|
|
11593
|
+
* - Options go in `transcriptionModelOverride.config`, and support varies by model:
|
|
11594
|
+
* - `language` — the spoken language as a code such as `en` or `es`; left out, the model detects it. Every model takes it. deepgram-nova-3 assumes `en` unless told, and also takes `multi` for speech that switches language (billed at its multilingual rate).
|
|
11595
|
+
* - `detectLanguage: 'yes'` — detect the language instead of assuming English (deepgram-nova-3 only).
|
|
11596
|
+
* - `includeSpeakers: 'yes'` — label each passage with a speaker. Supported by elevenlabs-scribe-v2, elevenlabs-scribe-v2-medical, deepgram-nova-3, grok-stt, voxtral-mini-transcribe-2 and gemini-3.5-transcribe; gpt-4o-transcribe-diarize always does. Scribe and Voxtral also switch `text` to a timestamped, speaker-labelled block format; Deepgram, Gemini and gpt-4o-transcribe-diarize to `Speaker N:` lines.
|
|
11597
|
+
* - `numSpeakers` — the most people talking, to help tell them apart (Scribe).
|
|
11598
|
+
* - `keyterms` — a list of names, products and terms the audio contains, so they're spelled right. Supported by gpt-transcribe, Scribe, deepgram-nova-3, grok-stt, voxtral-mini-transcribe-2 and gemini-3.5-transcribe. Billed as an add-on on Scribe and Deepgram.
|
|
11599
|
+
* - `redactPii: 'yes'` — replace names, phone numbers, addresses and other personal information with a label of what was there (Scribe, deepgram-nova-3). Billed as an add-on.
|
|
11600
|
+
* - `includeWordTimings: 'yes'` — add per-word timings and confidence inside each segment. Supported by Scribe, deepgram-nova-3, whisper-1, grok-stt, voxtral-mini-transcribe-2 and gemini-3.5-transcribe. Off by default because an hour of speech is roughly ten thousand words.
|
|
11601
|
+
* - `subtitles: 'srt' | 'vtt'` — also return the transcript as a subtitle file, in the `subtitles` output, timed by the segments. Any model that returns segments.
|
|
11602
|
+
* - gemini-3.5-transcribe can't take `keyterms` together with speakers, word timings or subtitles, and voxtral-mini-transcribe-2 can't take `language` together with word timings or subtitles; either asked for both is refused.
|
|
11603
|
+
* - The `segments` output carries timings, confidence and speakers as structured data, so there is no need to slice the audio up to recover them. It is populated by Scribe, deepgram-nova-3, grok-stt, whisper-1, gpt-4o-transcribe-diarize, voxtral-mini-transcribe-2 (unless given a language), gemini-3.5-transcribe (with word timings or subtitles) and the DeepInfra-served whisper and qwen models, and absent for models that return nothing but text (gpt-transcribe, gpt-4o-transcribe, gpt-4o-mini-transcribe, the DeepInfra-served voxtral models).
|
|
11604
|
+
* - A recording of any length can be transcribed. One longer than a model takes at once (OpenAI's and DeepInfra's models, Gemini) is transcribed in pieces and joined, its timings running from the start of the recording. Speakers can't be followed from one piece to the next, so with speakers on, such a recording is refused; Scribe and Deepgram label speakers at any length.
|
|
11451
11605
|
* - `confidence` is always 0..1 with higher meaning more confident, whichever model produced it.
|
|
11452
11606
|
*
|
|
11453
11607
|
* @example
|
|
@@ -11471,18 +11625,19 @@ interface StepMethods {
|
|
|
11471
11625
|
*/
|
|
11472
11626
|
trimMedia(step: TrimMediaStepInput, options?: StepExecutionOptions): Promise<StepExecutionResult<TrimMediaStepOutput>>;
|
|
11473
11627
|
/**
|
|
11474
|
-
* Ask
|
|
11628
|
+
* Ask structured questions about text, JSON, or images and get calibrated answers. The model returns a probability, a selected option, or a score. It does not write a reply. Each question is a noul (yes or no, as a probability from 0 to 1), a choice (one option from a set you define, with a probability for each), or a score (a rating against ordered levels). Put every question in the same call. The question id is yours: answers come back under the same ids. The model defaults to Jev (jev-latest). Pass clef or clef-flash to run Cloudflare Clef with the same questions and answers. Clef and Clef Flash can also read up to 4 images.
|
|
11475
11629
|
*
|
|
11476
11630
|
* @remarks
|
|
11477
|
-
* - state is the content to judge: a string, or a JSON object or array (a record, a chat log, application state).
|
|
11631
|
+
* - state is the content to judge: a string, or a JSON object or array (a record, a chat log, application state).
|
|
11632
|
+
* - images is for Clef and Clef Flash. Pass up to 4 PNG, JPEG, or WebP images as URLs. Each file is at most 4 MiB, and 8 MiB together. A call on Jev that includes images is rejected.
|
|
11478
11633
|
* - questions is a map. The key is an id you choose. It is not shown to the model. The answer comes back under the same id.
|
|
11479
11634
|
* - A noul asks a yes/no question and returns noul, a probability from 0 (no) to 1 (yes). Optional criteria.true and criteria.false say what a yes and a no mean.
|
|
11480
11635
|
* - A choice picks one option. criteria is a map of option id to a short description (or null). At most 255 options. The answer includes the winning choice, a probability for every option, and confidence.
|
|
11481
11636
|
* - A score rates the state on an ordered rubric. criteria is 2 to 10 level descriptions, low to high. The answer's score can land between levels, and includes a probability per level plus confidence.
|
|
11482
11637
|
* - instructions may be a string, or an object that keeps the question in one field and reference data in the others. Refer to those fields by name in backticks.
|
|
11483
11638
|
* - Send every question you need in one call. The model reads the state once and answers them together.
|
|
11484
|
-
* - model defaults to jev-latest, the current stable release. jev-preview tracks the newest release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version. The response model field is the version that answered.
|
|
11485
|
-
* - Billed per input token. Output tokens are free.
|
|
11639
|
+
* - model defaults to jev-latest, the current stable TypeSafe release. jev-preview tracks the newest TypeSafe release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version. clef and clef-flash run Cloudflare Clef on the same questions and answers. clef is the larger model. clef-flash is the faster one. @cf/cloudflare/clef and @cf/cloudflare/clef-flash name the same two. Clef accepts at most 64 questions, and a question id may use only letters, digits, underscore, dot, and hyphen, up to 100 characters. The response model field is the version that answered.
|
|
11640
|
+
* - Billed per input token. Output tokens are free. Clef and Clef-flash have their own rates.
|
|
11486
11641
|
*
|
|
11487
11642
|
* @example
|
|
11488
11643
|
* ```typescript
|