@cloudflare/workers-types 4.20250917.0 → 4.20250918.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.
@@ -3493,6 +3493,18 @@ export declare abstract class BaseAiImageTextToText {
3493
3493
  inputs: AiImageTextToTextInput;
3494
3494
  postProcessedOutputs: AiImageTextToTextOutput;
3495
3495
  }
3496
+ export type AiMultimodalEmbeddingsInput = {
3497
+ image: string;
3498
+ text: string[];
3499
+ };
3500
+ export type AiIMultimodalEmbeddingsOutput = {
3501
+ data: number[][];
3502
+ shape: number[];
3503
+ };
3504
+ export declare abstract class BaseAiMultimodalEmbeddings {
3505
+ inputs: AiImageTextToTextInput;
3506
+ postProcessedOutputs: AiImageTextToTextOutput;
3507
+ }
3496
3508
  export type AiObjectDetectionInput = {
3497
3509
  image: number[];
3498
3510
  };
@@ -3631,12 +3643,28 @@ export type AiTextGenerationInput = {
3631
3643
  | (object & NonNullable<unknown>);
3632
3644
  functions?: AiTextGenerationFunctionsInput[];
3633
3645
  };
3646
+ export type AiTextGenerationToolLegacyOutput = {
3647
+ name: string;
3648
+ arguments: unknown;
3649
+ };
3650
+ export type AiTextGenerationToolOutput = {
3651
+ id: string;
3652
+ type: "function";
3653
+ function: {
3654
+ name: string;
3655
+ arguments: string;
3656
+ };
3657
+ };
3658
+ export type UsageTags = {
3659
+ prompt_tokens: number;
3660
+ completion_tokens: number;
3661
+ total_tokens: number;
3662
+ };
3634
3663
  export type AiTextGenerationOutput = {
3635
3664
  response?: string;
3636
- tool_calls?: {
3637
- name: string;
3638
- arguments: unknown;
3639
- }[];
3665
+ tool_calls?: AiTextGenerationToolLegacyOutput[] &
3666
+ AiTextGenerationToolOutput[];
3667
+ usage?: UsageTags;
3640
3668
  };
3641
3669
  export declare abstract class BaseAiTextGeneration {
3642
3670
  inputs: AiTextGenerationInput;
@@ -4725,6 +4753,7 @@ export type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output =
4725
4753
  name?: string;
4726
4754
  }[];
4727
4755
  }
4756
+ | string
4728
4757
  | AsyncResponse;
4729
4758
  export declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast {
4730
4759
  inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input;
@@ -4801,7 +4830,6 @@ export interface Ai_Cf_Baai_Bge_Reranker_Base_Input {
4801
4830
  /**
4802
4831
  * A query you wish to perform against the provided contexts.
4803
4832
  */
4804
- query: string;
4805
4833
  /**
4806
4834
  * Number of returned results starting with the best score.
4807
4835
  */
@@ -5896,7 +5924,8 @@ export declare abstract class Base_Ai_Cf_Google_Gemma_3_12B_It {
5896
5924
  }
5897
5925
  export type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input =
5898
5926
  | Ai_Cf_Meta_Llama_4_Prompt
5899
- | Ai_Cf_Meta_Llama_4_Messages;
5927
+ | Ai_Cf_Meta_Llama_4_Messages
5928
+ | Ai_Cf_Meta_Llama_4_Async_Batch;
5900
5929
  export interface Ai_Cf_Meta_Llama_4_Prompt {
5901
5930
  /**
5902
5931
  * The input text prompt for the model to generate a response.
@@ -6130,6 +6159,245 @@ export interface Ai_Cf_Meta_Llama_4_Messages {
6130
6159
  */
6131
6160
  presence_penalty?: number;
6132
6161
  }
6162
+ export interface Ai_Cf_Meta_Llama_4_Async_Batch {
6163
+ requests: (
6164
+ | Ai_Cf_Meta_Llama_4_Prompt_Inner
6165
+ | Ai_Cf_Meta_Llama_4_Messages_Inner
6166
+ )[];
6167
+ }
6168
+ export interface Ai_Cf_Meta_Llama_4_Prompt_Inner {
6169
+ /**
6170
+ * The input text prompt for the model to generate a response.
6171
+ */
6172
+ prompt: string;
6173
+ /**
6174
+ * JSON schema that should be fulfilled for the response.
6175
+ */
6176
+ guided_json?: object;
6177
+ response_format?: JSONMode;
6178
+ /**
6179
+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
6180
+ */
6181
+ raw?: boolean;
6182
+ /**
6183
+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
6184
+ */
6185
+ stream?: boolean;
6186
+ /**
6187
+ * The maximum number of tokens to generate in the response.
6188
+ */
6189
+ max_tokens?: number;
6190
+ /**
6191
+ * Controls the randomness of the output; higher values produce more random results.
6192
+ */
6193
+ temperature?: number;
6194
+ /**
6195
+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
6196
+ */
6197
+ top_p?: number;
6198
+ /**
6199
+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
6200
+ */
6201
+ top_k?: number;
6202
+ /**
6203
+ * Random seed for reproducibility of the generation.
6204
+ */
6205
+ seed?: number;
6206
+ /**
6207
+ * Penalty for repeated tokens; higher values discourage repetition.
6208
+ */
6209
+ repetition_penalty?: number;
6210
+ /**
6211
+ * Decreases the likelihood of the model repeating the same lines verbatim.
6212
+ */
6213
+ frequency_penalty?: number;
6214
+ /**
6215
+ * Increases the likelihood of the model introducing new topics.
6216
+ */
6217
+ presence_penalty?: number;
6218
+ }
6219
+ export interface Ai_Cf_Meta_Llama_4_Messages_Inner {
6220
+ /**
6221
+ * An array of message objects representing the conversation history.
6222
+ */
6223
+ messages: {
6224
+ /**
6225
+ * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
6226
+ */
6227
+ role?: string;
6228
+ /**
6229
+ * The tool call id. If you don't know what to put here you can fall back to 000000001
6230
+ */
6231
+ tool_call_id?: string;
6232
+ content?:
6233
+ | string
6234
+ | {
6235
+ /**
6236
+ * Type of the content provided
6237
+ */
6238
+ type?: string;
6239
+ text?: string;
6240
+ image_url?: {
6241
+ /**
6242
+ * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
6243
+ */
6244
+ url?: string;
6245
+ };
6246
+ }[]
6247
+ | {
6248
+ /**
6249
+ * Type of the content provided
6250
+ */
6251
+ type?: string;
6252
+ text?: string;
6253
+ image_url?: {
6254
+ /**
6255
+ * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
6256
+ */
6257
+ url?: string;
6258
+ };
6259
+ };
6260
+ }[];
6261
+ functions?: {
6262
+ name: string;
6263
+ code: string;
6264
+ }[];
6265
+ /**
6266
+ * A list of tools available for the assistant to use.
6267
+ */
6268
+ tools?: (
6269
+ | {
6270
+ /**
6271
+ * The name of the tool. More descriptive the better.
6272
+ */
6273
+ name: string;
6274
+ /**
6275
+ * A brief description of what the tool does.
6276
+ */
6277
+ description: string;
6278
+ /**
6279
+ * Schema defining the parameters accepted by the tool.
6280
+ */
6281
+ parameters: {
6282
+ /**
6283
+ * The type of the parameters object (usually 'object').
6284
+ */
6285
+ type: string;
6286
+ /**
6287
+ * List of required parameter names.
6288
+ */
6289
+ required?: string[];
6290
+ /**
6291
+ * Definitions of each parameter.
6292
+ */
6293
+ properties: {
6294
+ [k: string]: {
6295
+ /**
6296
+ * The data type of the parameter.
6297
+ */
6298
+ type: string;
6299
+ /**
6300
+ * A description of the expected parameter.
6301
+ */
6302
+ description: string;
6303
+ };
6304
+ };
6305
+ };
6306
+ }
6307
+ | {
6308
+ /**
6309
+ * Specifies the type of tool (e.g., 'function').
6310
+ */
6311
+ type: string;
6312
+ /**
6313
+ * Details of the function tool.
6314
+ */
6315
+ function: {
6316
+ /**
6317
+ * The name of the function.
6318
+ */
6319
+ name: string;
6320
+ /**
6321
+ * A brief description of what the function does.
6322
+ */
6323
+ description: string;
6324
+ /**
6325
+ * Schema defining the parameters accepted by the function.
6326
+ */
6327
+ parameters: {
6328
+ /**
6329
+ * The type of the parameters object (usually 'object').
6330
+ */
6331
+ type: string;
6332
+ /**
6333
+ * List of required parameter names.
6334
+ */
6335
+ required?: string[];
6336
+ /**
6337
+ * Definitions of each parameter.
6338
+ */
6339
+ properties: {
6340
+ [k: string]: {
6341
+ /**
6342
+ * The data type of the parameter.
6343
+ */
6344
+ type: string;
6345
+ /**
6346
+ * A description of the expected parameter.
6347
+ */
6348
+ description: string;
6349
+ };
6350
+ };
6351
+ };
6352
+ };
6353
+ }
6354
+ )[];
6355
+ response_format?: JSONMode;
6356
+ /**
6357
+ * JSON schema that should be fufilled for the response.
6358
+ */
6359
+ guided_json?: object;
6360
+ /**
6361
+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
6362
+ */
6363
+ raw?: boolean;
6364
+ /**
6365
+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
6366
+ */
6367
+ stream?: boolean;
6368
+ /**
6369
+ * The maximum number of tokens to generate in the response.
6370
+ */
6371
+ max_tokens?: number;
6372
+ /**
6373
+ * Controls the randomness of the output; higher values produce more random results.
6374
+ */
6375
+ temperature?: number;
6376
+ /**
6377
+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
6378
+ */
6379
+ top_p?: number;
6380
+ /**
6381
+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
6382
+ */
6383
+ top_k?: number;
6384
+ /**
6385
+ * Random seed for reproducibility of the generation.
6386
+ */
6387
+ seed?: number;
6388
+ /**
6389
+ * Penalty for repeated tokens; higher values discourage repetition.
6390
+ */
6391
+ repetition_penalty?: number;
6392
+ /**
6393
+ * Decreases the likelihood of the model repeating the same lines verbatim.
6394
+ */
6395
+ frequency_penalty?: number;
6396
+ /**
6397
+ * Increases the likelihood of the model introducing new topics.
6398
+ */
6399
+ presence_penalty?: number;
6400
+ }
6133
6401
  export type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output = {
6134
6402
  /**
6135
6403
  * The generated text response from the model
@@ -6183,6 +6451,447 @@ export declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct {
6183
6451
  inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
6184
6452
  postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
6185
6453
  }
6454
+ export interface Ai_Cf_Deepgram_Nova_3_Input {
6455
+ audio: {
6456
+ body: object;
6457
+ contentType: string;
6458
+ };
6459
+ /**
6460
+ * Sets how the model will interpret strings submitted to the custom_topic param. When strict, the model will only return topics submitted using the custom_topic param. When extended, the model will return its own detected topics in addition to those submitted using the custom_topic param.
6461
+ */
6462
+ custom_topic_mode?: "extended" | "strict";
6463
+ /**
6464
+ * Custom topics you want the model to detect within your input audio or text if present Submit up to 100
6465
+ */
6466
+ custom_topic?: string;
6467
+ /**
6468
+ * Sets how the model will interpret intents submitted to the custom_intent param. When strict, the model will only return intents submitted using the custom_intent param. When extended, the model will return its own detected intents in addition those submitted using the custom_intents param
6469
+ */
6470
+ custom_intent_mode?: "extended" | "strict";
6471
+ /**
6472
+ * Custom intents you want the model to detect within your input audio if present
6473
+ */
6474
+ custom_intent?: string;
6475
+ /**
6476
+ * Identifies and extracts key entities from content in submitted audio
6477
+ */
6478
+ detect_entities?: boolean;
6479
+ /**
6480
+ * Identifies the dominant language spoken in submitted audio
6481
+ */
6482
+ detect_language?: boolean;
6483
+ /**
6484
+ * Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0
6485
+ */
6486
+ diarize?: boolean;
6487
+ /**
6488
+ * Identify and extract key entities from content in submitted audio
6489
+ */
6490
+ dictation?: boolean;
6491
+ /**
6492
+ * Specify the expected encoding of your submitted audio
6493
+ */
6494
+ encoding?:
6495
+ | "linear16"
6496
+ | "flac"
6497
+ | "mulaw"
6498
+ | "amr-nb"
6499
+ | "amr-wb"
6500
+ | "opus"
6501
+ | "speex"
6502
+ | "g729";
6503
+ /**
6504
+ * Arbitrary key-value pairs that are attached to the API response for usage in downstream processing
6505
+ */
6506
+ extra?: string;
6507
+ /**
6508
+ * Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um'
6509
+ */
6510
+ filler_words?: boolean;
6511
+ /**
6512
+ * Key term prompting can boost or suppress specialized terminology and brands.
6513
+ */
6514
+ keyterm?: string;
6515
+ /**
6516
+ * Keywords can boost or suppress specialized terminology and brands.
6517
+ */
6518
+ keywords?: string;
6519
+ /**
6520
+ * The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available.
6521
+ */
6522
+ language?: string;
6523
+ /**
6524
+ * Spoken measurements will be converted to their corresponding abbreviations.
6525
+ */
6526
+ measurements?: boolean;
6527
+ /**
6528
+ * Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip.
6529
+ */
6530
+ mip_opt_out?: boolean;
6531
+ /**
6532
+ * Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio
6533
+ */
6534
+ mode?: "general" | "medical" | "finance";
6535
+ /**
6536
+ * Transcribe each audio channel independently.
6537
+ */
6538
+ multichannel?: boolean;
6539
+ /**
6540
+ * Numerals converts numbers from written format to numerical format.
6541
+ */
6542
+ numerals?: boolean;
6543
+ /**
6544
+ * Splits audio into paragraphs to improve transcript readability.
6545
+ */
6546
+ paragraphs?: boolean;
6547
+ /**
6548
+ * Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely.
6549
+ */
6550
+ profanity_filter?: boolean;
6551
+ /**
6552
+ * Add punctuation and capitalization to the transcript.
6553
+ */
6554
+ punctuate?: boolean;
6555
+ /**
6556
+ * Redaction removes sensitive information from your transcripts.
6557
+ */
6558
+ redact?: string;
6559
+ /**
6560
+ * Search for terms or phrases in submitted audio and replaces them.
6561
+ */
6562
+ replace?: string;
6563
+ /**
6564
+ * Search for terms or phrases in submitted audio.
6565
+ */
6566
+ search?: string;
6567
+ /**
6568
+ * Recognizes the sentiment throughout a transcript or text.
6569
+ */
6570
+ sentiment?: boolean;
6571
+ /**
6572
+ * Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability.
6573
+ */
6574
+ smart_format?: boolean;
6575
+ /**
6576
+ * Detect topics throughout a transcript or text.
6577
+ */
6578
+ topics?: boolean;
6579
+ /**
6580
+ * Segments speech into meaningful semantic units.
6581
+ */
6582
+ utterances?: boolean;
6583
+ /**
6584
+ * Seconds to wait before detecting a pause between words in submitted audio.
6585
+ */
6586
+ utt_split?: number;
6587
+ /**
6588
+ * The number of channels in the submitted audio
6589
+ */
6590
+ channels?: number;
6591
+ /**
6592
+ * Specifies whether the streaming endpoint should provide ongoing transcription updates as more audio is received. When set to true, the endpoint sends continuous updates, meaning transcription results may evolve over time. Note: Supported only for webosockets.
6593
+ */
6594
+ interim_results?: boolean;
6595
+ /**
6596
+ * Indicates how long model will wait to detect whether a speaker has finished speaking or pauses for a significant period of time. When set to a value, the streaming endpoint immediately finalizes the transcription for the processed time range and returns the transcript with a speech_final parameter set to true. Can also be set to false to disable endpointing
6597
+ */
6598
+ endpointing?: string;
6599
+ /**
6600
+ * Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.
6601
+ */
6602
+ vad_events?: boolean;
6603
+ /**
6604
+ * Indicates how long model will wait to send an UtteranceEnd message after a word has been transcribed. Use with interim_results. Note: Supported only for webosockets.
6605
+ */
6606
+ utterance_end_ms?: boolean;
6607
+ }
6608
+ export interface Ai_Cf_Deepgram_Nova_3_Output {
6609
+ results?: {
6610
+ channels?: {
6611
+ alternatives?: {
6612
+ confidence?: number;
6613
+ transcript?: string;
6614
+ words?: {
6615
+ confidence?: number;
6616
+ end?: number;
6617
+ start?: number;
6618
+ word?: string;
6619
+ }[];
6620
+ }[];
6621
+ }[];
6622
+ summary?: {
6623
+ result?: string;
6624
+ short?: string;
6625
+ };
6626
+ sentiments?: {
6627
+ segments?: {
6628
+ text?: string;
6629
+ start_word?: number;
6630
+ end_word?: number;
6631
+ sentiment?: string;
6632
+ sentiment_score?: number;
6633
+ }[];
6634
+ average?: {
6635
+ sentiment?: string;
6636
+ sentiment_score?: number;
6637
+ };
6638
+ };
6639
+ };
6640
+ }
6641
+ export declare abstract class Base_Ai_Cf_Deepgram_Nova_3 {
6642
+ inputs: Ai_Cf_Deepgram_Nova_3_Input;
6643
+ postProcessedOutputs: Ai_Cf_Deepgram_Nova_3_Output;
6644
+ }
6645
+ export type Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input =
6646
+ | {
6647
+ /**
6648
+ * readable stream with audio data and content-type specified for that data
6649
+ */
6650
+ audio: {
6651
+ body: object;
6652
+ contentType: string;
6653
+ };
6654
+ /**
6655
+ * type of data PCM data that's sent to the inference server as raw array
6656
+ */
6657
+ dtype?: "uint8" | "float32" | "float64";
6658
+ }
6659
+ | {
6660
+ /**
6661
+ * base64 encoded audio data
6662
+ */
6663
+ audio: string;
6664
+ /**
6665
+ * type of data PCM data that's sent to the inference server as raw array
6666
+ */
6667
+ dtype?: "uint8" | "float32" | "float64";
6668
+ };
6669
+ export interface Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output {
6670
+ /**
6671
+ * if true, end-of-turn was detected
6672
+ */
6673
+ is_complete?: boolean;
6674
+ /**
6675
+ * probability of the end-of-turn detection
6676
+ */
6677
+ probability?: number;
6678
+ }
6679
+ export declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
6680
+ inputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input;
6681
+ postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
6682
+ }
6683
+ export type Ai_Cf_Openai_Gpt_Oss_120B_Input =
6684
+ | GPT_OSS_120B_Responses
6685
+ | GPT_OSS_120B_Responses_Async;
6686
+ export interface GPT_OSS_120B_Responses {
6687
+ /**
6688
+ * Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
6689
+ */
6690
+ input: string | unknown[];
6691
+ reasoning?: {
6692
+ /**
6693
+ * Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
6694
+ */
6695
+ effort?: "low" | "medium" | "high";
6696
+ /**
6697
+ * A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
6698
+ */
6699
+ summary?: "auto" | "concise" | "detailed";
6700
+ };
6701
+ }
6702
+ export interface GPT_OSS_120B_Responses_Async {
6703
+ requests: {
6704
+ /**
6705
+ * Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
6706
+ */
6707
+ input: string | unknown[];
6708
+ reasoning?: {
6709
+ /**
6710
+ * Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
6711
+ */
6712
+ effort?: "low" | "medium" | "high";
6713
+ /**
6714
+ * A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
6715
+ */
6716
+ summary?: "auto" | "concise" | "detailed";
6717
+ };
6718
+ }[];
6719
+ }
6720
+ export type Ai_Cf_Openai_Gpt_Oss_120B_Output =
6721
+ | {}
6722
+ | (string & NonNullable<unknown>);
6723
+ export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
6724
+ inputs: Ai_Cf_Openai_Gpt_Oss_120B_Input;
6725
+ postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_120B_Output;
6726
+ }
6727
+ export type Ai_Cf_Openai_Gpt_Oss_20B_Input =
6728
+ | GPT_OSS_20B_Responses
6729
+ | GPT_OSS_20B_Responses_Async;
6730
+ export interface GPT_OSS_20B_Responses {
6731
+ /**
6732
+ * Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
6733
+ */
6734
+ input: string | unknown[];
6735
+ reasoning?: {
6736
+ /**
6737
+ * Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
6738
+ */
6739
+ effort?: "low" | "medium" | "high";
6740
+ /**
6741
+ * A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
6742
+ */
6743
+ summary?: "auto" | "concise" | "detailed";
6744
+ };
6745
+ }
6746
+ export interface GPT_OSS_20B_Responses_Async {
6747
+ requests: {
6748
+ /**
6749
+ * Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
6750
+ */
6751
+ input: string | unknown[];
6752
+ reasoning?: {
6753
+ /**
6754
+ * Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
6755
+ */
6756
+ effort?: "low" | "medium" | "high";
6757
+ /**
6758
+ * A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
6759
+ */
6760
+ summary?: "auto" | "concise" | "detailed";
6761
+ };
6762
+ }[];
6763
+ }
6764
+ export type Ai_Cf_Openai_Gpt_Oss_20B_Output =
6765
+ | {}
6766
+ | (string & NonNullable<unknown>);
6767
+ export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
6768
+ inputs: Ai_Cf_Openai_Gpt_Oss_20B_Input;
6769
+ postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_20B_Output;
6770
+ }
6771
+ export interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
6772
+ /**
6773
+ * A text description of the image you want to generate.
6774
+ */
6775
+ prompt: string;
6776
+ /**
6777
+ * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
6778
+ */
6779
+ guidance?: number;
6780
+ /**
6781
+ * Random seed for reproducibility of the image generation
6782
+ */
6783
+ seed?: number;
6784
+ /**
6785
+ * The height of the generated image in pixels
6786
+ */
6787
+ height?: number;
6788
+ /**
6789
+ * The width of the generated image in pixels
6790
+ */
6791
+ width?: number;
6792
+ /**
6793
+ * The number of diffusion steps; higher values can improve quality but take longer
6794
+ */
6795
+ num_steps?: number;
6796
+ /**
6797
+ * Specify what to exclude from the generated images
6798
+ */
6799
+ negative_prompt?: string;
6800
+ }
6801
+ /**
6802
+ * The generated image in JPEG format
6803
+ */
6804
+ export type Ai_Cf_Leonardo_Phoenix_1_0_Output = string;
6805
+ export declare abstract class Base_Ai_Cf_Leonardo_Phoenix_1_0 {
6806
+ inputs: Ai_Cf_Leonardo_Phoenix_1_0_Input;
6807
+ postProcessedOutputs: Ai_Cf_Leonardo_Phoenix_1_0_Output;
6808
+ }
6809
+ export interface Ai_Cf_Leonardo_Lucid_Origin_Input {
6810
+ /**
6811
+ * A text description of the image you want to generate.
6812
+ */
6813
+ prompt: string;
6814
+ /**
6815
+ * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
6816
+ */
6817
+ guidance?: number;
6818
+ /**
6819
+ * Random seed for reproducibility of the image generation
6820
+ */
6821
+ seed?: number;
6822
+ /**
6823
+ * The height of the generated image in pixels
6824
+ */
6825
+ height?: number;
6826
+ /**
6827
+ * The width of the generated image in pixels
6828
+ */
6829
+ width?: number;
6830
+ /**
6831
+ * The number of diffusion steps; higher values can improve quality but take longer
6832
+ */
6833
+ num_steps?: number;
6834
+ /**
6835
+ * The number of diffusion steps; higher values can improve quality but take longer
6836
+ */
6837
+ steps?: number;
6838
+ }
6839
+ export interface Ai_Cf_Leonardo_Lucid_Origin_Output {
6840
+ /**
6841
+ * The generated image in Base64 format.
6842
+ */
6843
+ image?: string;
6844
+ }
6845
+ export declare abstract class Base_Ai_Cf_Leonardo_Lucid_Origin {
6846
+ inputs: Ai_Cf_Leonardo_Lucid_Origin_Input;
6847
+ postProcessedOutputs: Ai_Cf_Leonardo_Lucid_Origin_Output;
6848
+ }
6849
+ export interface Ai_Cf_Deepgram_Aura_1_Input {
6850
+ /**
6851
+ * Speaker used to produce the audio.
6852
+ */
6853
+ speaker?:
6854
+ | "angus"
6855
+ | "asteria"
6856
+ | "arcas"
6857
+ | "orion"
6858
+ | "orpheus"
6859
+ | "athena"
6860
+ | "luna"
6861
+ | "zeus"
6862
+ | "perseus"
6863
+ | "helios"
6864
+ | "hera"
6865
+ | "stella";
6866
+ /**
6867
+ * Encoding of the output audio.
6868
+ */
6869
+ encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
6870
+ /**
6871
+ * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
6872
+ */
6873
+ container?: "none" | "wav" | "ogg";
6874
+ /**
6875
+ * The text content to be converted to speech
6876
+ */
6877
+ text: string;
6878
+ /**
6879
+ * Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable
6880
+ */
6881
+ sample_rate?: number;
6882
+ /**
6883
+ * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
6884
+ */
6885
+ bit_rate?: number;
6886
+ }
6887
+ /**
6888
+ * The generated audio in MP3 format
6889
+ */
6890
+ export type Ai_Cf_Deepgram_Aura_1_Output = string;
6891
+ export declare abstract class Base_Ai_Cf_Deepgram_Aura_1 {
6892
+ inputs: Ai_Cf_Deepgram_Aura_1_Input;
6893
+ postProcessedOutputs: Ai_Cf_Deepgram_Aura_1_Output;
6894
+ }
6186
6895
  export interface AiModels {
6187
6896
  "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
6188
6897
  "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
@@ -6191,8 +6900,8 @@ export interface AiModels {
6191
6900
  "@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage;
6192
6901
  "@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage;
6193
6902
  "@cf/myshell-ai/melotts": BaseAiTextToSpeech;
6903
+ "@cf/google/embeddinggemma-300m": BaseAiTextEmbeddings;
6194
6904
  "@cf/microsoft/resnet-50": BaseAiImageClassification;
6195
- "@cf/facebook/detr-resnet-50": BaseAiObjectDetection;
6196
6905
  "@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration;
6197
6906
  "@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration;
6198
6907
  "@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration;
@@ -6227,7 +6936,6 @@ export interface AiModels {
6227
6936
  "@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration;
6228
6937
  "@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration;
6229
6938
  "@hf/meta-llama/meta-llama-3-8b-instruct": BaseAiTextGeneration;
6230
- "@cf/meta/llama-3.1-8b-instruct": BaseAiTextGeneration;
6231
6939
  "@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration;
6232
6940
  "@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration;
6233
6941
  "@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration;
@@ -6254,6 +6962,13 @@ export interface AiModels {
6254
6962
  "@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct;
6255
6963
  "@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It;
6256
6964
  "@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
6965
+ "@cf/deepgram/nova-3": Base_Ai_Cf_Deepgram_Nova_3;
6966
+ "@cf/pipecat-ai/smart-turn-v2": Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2;
6967
+ "@cf/openai/gpt-oss-120b": Base_Ai_Cf_Openai_Gpt_Oss_120B;
6968
+ "@cf/openai/gpt-oss-20b": Base_Ai_Cf_Openai_Gpt_Oss_20B;
6969
+ "@cf/leonardo/phoenix-1.0": Base_Ai_Cf_Leonardo_Phoenix_1_0;
6970
+ "@cf/leonardo/lucid-origin": Base_Ai_Cf_Leonardo_Lucid_Origin;
6971
+ "@cf/deepgram/aura-1": Base_Ai_Cf_Deepgram_Aura_1;
6257
6972
  }
6258
6973
  export type AiOptions = {
6259
6974
  /**
@@ -6261,6 +6976,10 @@ export type AiOptions = {
6261
6976
  * https://developers.cloudflare.com/workers-ai/features/batch-api
6262
6977
  */
6263
6978
  queueRequest?: boolean;
6979
+ /**
6980
+ * Establish websocket connections, only works for supported models
6981
+ */
6982
+ websocket?: boolean;
6264
6983
  gateway?: GatewayOptions;
6265
6984
  returnRawResponse?: boolean;
6266
6985
  prefix?: string;
@@ -6306,7 +7025,7 @@ export declare abstract class Ai<
6306
7025
  > {
6307
7026
  aiGatewayLogId: string | null;
6308
7027
  gateway(gatewayId: string): AiGateway;
6309
- autorag(autoragId?: string): AutoRAG;
7028
+ autorag(autoragId: string): AutoRAG;
6310
7029
  run<
6311
7030
  Name extends keyof AiModelList,
6312
7031
  Options extends AiOptions,
@@ -6316,9 +7035,13 @@ export declare abstract class Ai<
6316
7035
  inputs: InputOptions,
6317
7036
  options?: Options,
6318
7037
  ): Promise<
6319
- Options extends {
6320
- returnRawResponse: true;
6321
- }
7038
+ Options extends
7039
+ | {
7040
+ returnRawResponse: true;
7041
+ }
7042
+ | {
7043
+ websocket: true;
7044
+ }
6322
7045
  ? Response
6323
7046
  : InputOptions extends {
6324
7047
  stream: true;