@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.
@@ -3219,6 +3219,18 @@ export declare abstract class BaseAiImageTextToText {
3219
3219
  inputs: AiImageTextToTextInput;
3220
3220
  postProcessedOutputs: AiImageTextToTextOutput;
3221
3221
  }
3222
+ export type AiMultimodalEmbeddingsInput = {
3223
+ image: string;
3224
+ text: string[];
3225
+ };
3226
+ export type AiIMultimodalEmbeddingsOutput = {
3227
+ data: number[][];
3228
+ shape: number[];
3229
+ };
3230
+ export declare abstract class BaseAiMultimodalEmbeddings {
3231
+ inputs: AiImageTextToTextInput;
3232
+ postProcessedOutputs: AiImageTextToTextOutput;
3233
+ }
3222
3234
  export type AiObjectDetectionInput = {
3223
3235
  image: number[];
3224
3236
  };
@@ -3357,12 +3369,28 @@ export type AiTextGenerationInput = {
3357
3369
  | (object & NonNullable<unknown>);
3358
3370
  functions?: AiTextGenerationFunctionsInput[];
3359
3371
  };
3372
+ export type AiTextGenerationToolLegacyOutput = {
3373
+ name: string;
3374
+ arguments: unknown;
3375
+ };
3376
+ export type AiTextGenerationToolOutput = {
3377
+ id: string;
3378
+ type: "function";
3379
+ function: {
3380
+ name: string;
3381
+ arguments: string;
3382
+ };
3383
+ };
3384
+ export type UsageTags = {
3385
+ prompt_tokens: number;
3386
+ completion_tokens: number;
3387
+ total_tokens: number;
3388
+ };
3360
3389
  export type AiTextGenerationOutput = {
3361
3390
  response?: string;
3362
- tool_calls?: {
3363
- name: string;
3364
- arguments: unknown;
3365
- }[];
3391
+ tool_calls?: AiTextGenerationToolLegacyOutput[] &
3392
+ AiTextGenerationToolOutput[];
3393
+ usage?: UsageTags;
3366
3394
  };
3367
3395
  export declare abstract class BaseAiTextGeneration {
3368
3396
  inputs: AiTextGenerationInput;
@@ -4451,6 +4479,7 @@ export type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output =
4451
4479
  name?: string;
4452
4480
  }[];
4453
4481
  }
4482
+ | string
4454
4483
  | AsyncResponse;
4455
4484
  export declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast {
4456
4485
  inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input;
@@ -4527,7 +4556,6 @@ export interface Ai_Cf_Baai_Bge_Reranker_Base_Input {
4527
4556
  /**
4528
4557
  * A query you wish to perform against the provided contexts.
4529
4558
  */
4530
- query: string;
4531
4559
  /**
4532
4560
  * Number of returned results starting with the best score.
4533
4561
  */
@@ -5622,7 +5650,8 @@ export declare abstract class Base_Ai_Cf_Google_Gemma_3_12B_It {
5622
5650
  }
5623
5651
  export type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input =
5624
5652
  | Ai_Cf_Meta_Llama_4_Prompt
5625
- | Ai_Cf_Meta_Llama_4_Messages;
5653
+ | Ai_Cf_Meta_Llama_4_Messages
5654
+ | Ai_Cf_Meta_Llama_4_Async_Batch;
5626
5655
  export interface Ai_Cf_Meta_Llama_4_Prompt {
5627
5656
  /**
5628
5657
  * The input text prompt for the model to generate a response.
@@ -5856,6 +5885,245 @@ export interface Ai_Cf_Meta_Llama_4_Messages {
5856
5885
  */
5857
5886
  presence_penalty?: number;
5858
5887
  }
5888
+ export interface Ai_Cf_Meta_Llama_4_Async_Batch {
5889
+ requests: (
5890
+ | Ai_Cf_Meta_Llama_4_Prompt_Inner
5891
+ | Ai_Cf_Meta_Llama_4_Messages_Inner
5892
+ )[];
5893
+ }
5894
+ export interface Ai_Cf_Meta_Llama_4_Prompt_Inner {
5895
+ /**
5896
+ * The input text prompt for the model to generate a response.
5897
+ */
5898
+ prompt: string;
5899
+ /**
5900
+ * JSON schema that should be fulfilled for the response.
5901
+ */
5902
+ guided_json?: object;
5903
+ response_format?: JSONMode;
5904
+ /**
5905
+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
5906
+ */
5907
+ raw?: boolean;
5908
+ /**
5909
+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
5910
+ */
5911
+ stream?: boolean;
5912
+ /**
5913
+ * The maximum number of tokens to generate in the response.
5914
+ */
5915
+ max_tokens?: number;
5916
+ /**
5917
+ * Controls the randomness of the output; higher values produce more random results.
5918
+ */
5919
+ temperature?: number;
5920
+ /**
5921
+ * 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.
5922
+ */
5923
+ top_p?: number;
5924
+ /**
5925
+ * 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.
5926
+ */
5927
+ top_k?: number;
5928
+ /**
5929
+ * Random seed for reproducibility of the generation.
5930
+ */
5931
+ seed?: number;
5932
+ /**
5933
+ * Penalty for repeated tokens; higher values discourage repetition.
5934
+ */
5935
+ repetition_penalty?: number;
5936
+ /**
5937
+ * Decreases the likelihood of the model repeating the same lines verbatim.
5938
+ */
5939
+ frequency_penalty?: number;
5940
+ /**
5941
+ * Increases the likelihood of the model introducing new topics.
5942
+ */
5943
+ presence_penalty?: number;
5944
+ }
5945
+ export interface Ai_Cf_Meta_Llama_4_Messages_Inner {
5946
+ /**
5947
+ * An array of message objects representing the conversation history.
5948
+ */
5949
+ messages: {
5950
+ /**
5951
+ * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
5952
+ */
5953
+ role?: string;
5954
+ /**
5955
+ * The tool call id. If you don't know what to put here you can fall back to 000000001
5956
+ */
5957
+ tool_call_id?: string;
5958
+ content?:
5959
+ | string
5960
+ | {
5961
+ /**
5962
+ * Type of the content provided
5963
+ */
5964
+ type?: string;
5965
+ text?: string;
5966
+ image_url?: {
5967
+ /**
5968
+ * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
5969
+ */
5970
+ url?: string;
5971
+ };
5972
+ }[]
5973
+ | {
5974
+ /**
5975
+ * Type of the content provided
5976
+ */
5977
+ type?: string;
5978
+ text?: string;
5979
+ image_url?: {
5980
+ /**
5981
+ * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
5982
+ */
5983
+ url?: string;
5984
+ };
5985
+ };
5986
+ }[];
5987
+ functions?: {
5988
+ name: string;
5989
+ code: string;
5990
+ }[];
5991
+ /**
5992
+ * A list of tools available for the assistant to use.
5993
+ */
5994
+ tools?: (
5995
+ | {
5996
+ /**
5997
+ * The name of the tool. More descriptive the better.
5998
+ */
5999
+ name: string;
6000
+ /**
6001
+ * A brief description of what the tool does.
6002
+ */
6003
+ description: string;
6004
+ /**
6005
+ * Schema defining the parameters accepted by the tool.
6006
+ */
6007
+ parameters: {
6008
+ /**
6009
+ * The type of the parameters object (usually 'object').
6010
+ */
6011
+ type: string;
6012
+ /**
6013
+ * List of required parameter names.
6014
+ */
6015
+ required?: string[];
6016
+ /**
6017
+ * Definitions of each parameter.
6018
+ */
6019
+ properties: {
6020
+ [k: string]: {
6021
+ /**
6022
+ * The data type of the parameter.
6023
+ */
6024
+ type: string;
6025
+ /**
6026
+ * A description of the expected parameter.
6027
+ */
6028
+ description: string;
6029
+ };
6030
+ };
6031
+ };
6032
+ }
6033
+ | {
6034
+ /**
6035
+ * Specifies the type of tool (e.g., 'function').
6036
+ */
6037
+ type: string;
6038
+ /**
6039
+ * Details of the function tool.
6040
+ */
6041
+ function: {
6042
+ /**
6043
+ * The name of the function.
6044
+ */
6045
+ name: string;
6046
+ /**
6047
+ * A brief description of what the function does.
6048
+ */
6049
+ description: string;
6050
+ /**
6051
+ * Schema defining the parameters accepted by the function.
6052
+ */
6053
+ parameters: {
6054
+ /**
6055
+ * The type of the parameters object (usually 'object').
6056
+ */
6057
+ type: string;
6058
+ /**
6059
+ * List of required parameter names.
6060
+ */
6061
+ required?: string[];
6062
+ /**
6063
+ * Definitions of each parameter.
6064
+ */
6065
+ properties: {
6066
+ [k: string]: {
6067
+ /**
6068
+ * The data type of the parameter.
6069
+ */
6070
+ type: string;
6071
+ /**
6072
+ * A description of the expected parameter.
6073
+ */
6074
+ description: string;
6075
+ };
6076
+ };
6077
+ };
6078
+ };
6079
+ }
6080
+ )[];
6081
+ response_format?: JSONMode;
6082
+ /**
6083
+ * JSON schema that should be fufilled for the response.
6084
+ */
6085
+ guided_json?: object;
6086
+ /**
6087
+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
6088
+ */
6089
+ raw?: boolean;
6090
+ /**
6091
+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
6092
+ */
6093
+ stream?: boolean;
6094
+ /**
6095
+ * The maximum number of tokens to generate in the response.
6096
+ */
6097
+ max_tokens?: number;
6098
+ /**
6099
+ * Controls the randomness of the output; higher values produce more random results.
6100
+ */
6101
+ temperature?: number;
6102
+ /**
6103
+ * 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.
6104
+ */
6105
+ top_p?: number;
6106
+ /**
6107
+ * 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.
6108
+ */
6109
+ top_k?: number;
6110
+ /**
6111
+ * Random seed for reproducibility of the generation.
6112
+ */
6113
+ seed?: number;
6114
+ /**
6115
+ * Penalty for repeated tokens; higher values discourage repetition.
6116
+ */
6117
+ repetition_penalty?: number;
6118
+ /**
6119
+ * Decreases the likelihood of the model repeating the same lines verbatim.
6120
+ */
6121
+ frequency_penalty?: number;
6122
+ /**
6123
+ * Increases the likelihood of the model introducing new topics.
6124
+ */
6125
+ presence_penalty?: number;
6126
+ }
5859
6127
  export type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output = {
5860
6128
  /**
5861
6129
  * The generated text response from the model
@@ -5909,6 +6177,447 @@ export declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct {
5909
6177
  inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
5910
6178
  postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
5911
6179
  }
6180
+ export interface Ai_Cf_Deepgram_Nova_3_Input {
6181
+ audio: {
6182
+ body: object;
6183
+ contentType: string;
6184
+ };
6185
+ /**
6186
+ * 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.
6187
+ */
6188
+ custom_topic_mode?: "extended" | "strict";
6189
+ /**
6190
+ * Custom topics you want the model to detect within your input audio or text if present Submit up to 100
6191
+ */
6192
+ custom_topic?: string;
6193
+ /**
6194
+ * 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
6195
+ */
6196
+ custom_intent_mode?: "extended" | "strict";
6197
+ /**
6198
+ * Custom intents you want the model to detect within your input audio if present
6199
+ */
6200
+ custom_intent?: string;
6201
+ /**
6202
+ * Identifies and extracts key entities from content in submitted audio
6203
+ */
6204
+ detect_entities?: boolean;
6205
+ /**
6206
+ * Identifies the dominant language spoken in submitted audio
6207
+ */
6208
+ detect_language?: boolean;
6209
+ /**
6210
+ * Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0
6211
+ */
6212
+ diarize?: boolean;
6213
+ /**
6214
+ * Identify and extract key entities from content in submitted audio
6215
+ */
6216
+ dictation?: boolean;
6217
+ /**
6218
+ * Specify the expected encoding of your submitted audio
6219
+ */
6220
+ encoding?:
6221
+ | "linear16"
6222
+ | "flac"
6223
+ | "mulaw"
6224
+ | "amr-nb"
6225
+ | "amr-wb"
6226
+ | "opus"
6227
+ | "speex"
6228
+ | "g729";
6229
+ /**
6230
+ * Arbitrary key-value pairs that are attached to the API response for usage in downstream processing
6231
+ */
6232
+ extra?: string;
6233
+ /**
6234
+ * Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um'
6235
+ */
6236
+ filler_words?: boolean;
6237
+ /**
6238
+ * Key term prompting can boost or suppress specialized terminology and brands.
6239
+ */
6240
+ keyterm?: string;
6241
+ /**
6242
+ * Keywords can boost or suppress specialized terminology and brands.
6243
+ */
6244
+ keywords?: string;
6245
+ /**
6246
+ * 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.
6247
+ */
6248
+ language?: string;
6249
+ /**
6250
+ * Spoken measurements will be converted to their corresponding abbreviations.
6251
+ */
6252
+ measurements?: boolean;
6253
+ /**
6254
+ * 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.
6255
+ */
6256
+ mip_opt_out?: boolean;
6257
+ /**
6258
+ * Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio
6259
+ */
6260
+ mode?: "general" | "medical" | "finance";
6261
+ /**
6262
+ * Transcribe each audio channel independently.
6263
+ */
6264
+ multichannel?: boolean;
6265
+ /**
6266
+ * Numerals converts numbers from written format to numerical format.
6267
+ */
6268
+ numerals?: boolean;
6269
+ /**
6270
+ * Splits audio into paragraphs to improve transcript readability.
6271
+ */
6272
+ paragraphs?: boolean;
6273
+ /**
6274
+ * Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely.
6275
+ */
6276
+ profanity_filter?: boolean;
6277
+ /**
6278
+ * Add punctuation and capitalization to the transcript.
6279
+ */
6280
+ punctuate?: boolean;
6281
+ /**
6282
+ * Redaction removes sensitive information from your transcripts.
6283
+ */
6284
+ redact?: string;
6285
+ /**
6286
+ * Search for terms or phrases in submitted audio and replaces them.
6287
+ */
6288
+ replace?: string;
6289
+ /**
6290
+ * Search for terms or phrases in submitted audio.
6291
+ */
6292
+ search?: string;
6293
+ /**
6294
+ * Recognizes the sentiment throughout a transcript or text.
6295
+ */
6296
+ sentiment?: boolean;
6297
+ /**
6298
+ * Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability.
6299
+ */
6300
+ smart_format?: boolean;
6301
+ /**
6302
+ * Detect topics throughout a transcript or text.
6303
+ */
6304
+ topics?: boolean;
6305
+ /**
6306
+ * Segments speech into meaningful semantic units.
6307
+ */
6308
+ utterances?: boolean;
6309
+ /**
6310
+ * Seconds to wait before detecting a pause between words in submitted audio.
6311
+ */
6312
+ utt_split?: number;
6313
+ /**
6314
+ * The number of channels in the submitted audio
6315
+ */
6316
+ channels?: number;
6317
+ /**
6318
+ * 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.
6319
+ */
6320
+ interim_results?: boolean;
6321
+ /**
6322
+ * 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
6323
+ */
6324
+ endpointing?: string;
6325
+ /**
6326
+ * Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.
6327
+ */
6328
+ vad_events?: boolean;
6329
+ /**
6330
+ * 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.
6331
+ */
6332
+ utterance_end_ms?: boolean;
6333
+ }
6334
+ export interface Ai_Cf_Deepgram_Nova_3_Output {
6335
+ results?: {
6336
+ channels?: {
6337
+ alternatives?: {
6338
+ confidence?: number;
6339
+ transcript?: string;
6340
+ words?: {
6341
+ confidence?: number;
6342
+ end?: number;
6343
+ start?: number;
6344
+ word?: string;
6345
+ }[];
6346
+ }[];
6347
+ }[];
6348
+ summary?: {
6349
+ result?: string;
6350
+ short?: string;
6351
+ };
6352
+ sentiments?: {
6353
+ segments?: {
6354
+ text?: string;
6355
+ start_word?: number;
6356
+ end_word?: number;
6357
+ sentiment?: string;
6358
+ sentiment_score?: number;
6359
+ }[];
6360
+ average?: {
6361
+ sentiment?: string;
6362
+ sentiment_score?: number;
6363
+ };
6364
+ };
6365
+ };
6366
+ }
6367
+ export declare abstract class Base_Ai_Cf_Deepgram_Nova_3 {
6368
+ inputs: Ai_Cf_Deepgram_Nova_3_Input;
6369
+ postProcessedOutputs: Ai_Cf_Deepgram_Nova_3_Output;
6370
+ }
6371
+ export type Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input =
6372
+ | {
6373
+ /**
6374
+ * readable stream with audio data and content-type specified for that data
6375
+ */
6376
+ audio: {
6377
+ body: object;
6378
+ contentType: string;
6379
+ };
6380
+ /**
6381
+ * type of data PCM data that's sent to the inference server as raw array
6382
+ */
6383
+ dtype?: "uint8" | "float32" | "float64";
6384
+ }
6385
+ | {
6386
+ /**
6387
+ * base64 encoded audio data
6388
+ */
6389
+ audio: string;
6390
+ /**
6391
+ * type of data PCM data that's sent to the inference server as raw array
6392
+ */
6393
+ dtype?: "uint8" | "float32" | "float64";
6394
+ };
6395
+ export interface Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output {
6396
+ /**
6397
+ * if true, end-of-turn was detected
6398
+ */
6399
+ is_complete?: boolean;
6400
+ /**
6401
+ * probability of the end-of-turn detection
6402
+ */
6403
+ probability?: number;
6404
+ }
6405
+ export declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
6406
+ inputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input;
6407
+ postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
6408
+ }
6409
+ export type Ai_Cf_Openai_Gpt_Oss_120B_Input =
6410
+ | GPT_OSS_120B_Responses
6411
+ | GPT_OSS_120B_Responses_Async;
6412
+ export interface GPT_OSS_120B_Responses {
6413
+ /**
6414
+ * Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
6415
+ */
6416
+ input: string | unknown[];
6417
+ reasoning?: {
6418
+ /**
6419
+ * 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.
6420
+ */
6421
+ effort?: "low" | "medium" | "high";
6422
+ /**
6423
+ * 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.
6424
+ */
6425
+ summary?: "auto" | "concise" | "detailed";
6426
+ };
6427
+ }
6428
+ export interface GPT_OSS_120B_Responses_Async {
6429
+ requests: {
6430
+ /**
6431
+ * Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
6432
+ */
6433
+ input: string | unknown[];
6434
+ reasoning?: {
6435
+ /**
6436
+ * 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.
6437
+ */
6438
+ effort?: "low" | "medium" | "high";
6439
+ /**
6440
+ * 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.
6441
+ */
6442
+ summary?: "auto" | "concise" | "detailed";
6443
+ };
6444
+ }[];
6445
+ }
6446
+ export type Ai_Cf_Openai_Gpt_Oss_120B_Output =
6447
+ | {}
6448
+ | (string & NonNullable<unknown>);
6449
+ export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
6450
+ inputs: Ai_Cf_Openai_Gpt_Oss_120B_Input;
6451
+ postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_120B_Output;
6452
+ }
6453
+ export type Ai_Cf_Openai_Gpt_Oss_20B_Input =
6454
+ | GPT_OSS_20B_Responses
6455
+ | GPT_OSS_20B_Responses_Async;
6456
+ export interface GPT_OSS_20B_Responses {
6457
+ /**
6458
+ * Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
6459
+ */
6460
+ input: string | unknown[];
6461
+ reasoning?: {
6462
+ /**
6463
+ * 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.
6464
+ */
6465
+ effort?: "low" | "medium" | "high";
6466
+ /**
6467
+ * 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.
6468
+ */
6469
+ summary?: "auto" | "concise" | "detailed";
6470
+ };
6471
+ }
6472
+ export interface GPT_OSS_20B_Responses_Async {
6473
+ requests: {
6474
+ /**
6475
+ * Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
6476
+ */
6477
+ input: string | unknown[];
6478
+ reasoning?: {
6479
+ /**
6480
+ * 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.
6481
+ */
6482
+ effort?: "low" | "medium" | "high";
6483
+ /**
6484
+ * 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.
6485
+ */
6486
+ summary?: "auto" | "concise" | "detailed";
6487
+ };
6488
+ }[];
6489
+ }
6490
+ export type Ai_Cf_Openai_Gpt_Oss_20B_Output =
6491
+ | {}
6492
+ | (string & NonNullable<unknown>);
6493
+ export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
6494
+ inputs: Ai_Cf_Openai_Gpt_Oss_20B_Input;
6495
+ postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_20B_Output;
6496
+ }
6497
+ export interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
6498
+ /**
6499
+ * A text description of the image you want to generate.
6500
+ */
6501
+ prompt: string;
6502
+ /**
6503
+ * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
6504
+ */
6505
+ guidance?: number;
6506
+ /**
6507
+ * Random seed for reproducibility of the image generation
6508
+ */
6509
+ seed?: number;
6510
+ /**
6511
+ * The height of the generated image in pixels
6512
+ */
6513
+ height?: number;
6514
+ /**
6515
+ * The width of the generated image in pixels
6516
+ */
6517
+ width?: number;
6518
+ /**
6519
+ * The number of diffusion steps; higher values can improve quality but take longer
6520
+ */
6521
+ num_steps?: number;
6522
+ /**
6523
+ * Specify what to exclude from the generated images
6524
+ */
6525
+ negative_prompt?: string;
6526
+ }
6527
+ /**
6528
+ * The generated image in JPEG format
6529
+ */
6530
+ export type Ai_Cf_Leonardo_Phoenix_1_0_Output = string;
6531
+ export declare abstract class Base_Ai_Cf_Leonardo_Phoenix_1_0 {
6532
+ inputs: Ai_Cf_Leonardo_Phoenix_1_0_Input;
6533
+ postProcessedOutputs: Ai_Cf_Leonardo_Phoenix_1_0_Output;
6534
+ }
6535
+ export interface Ai_Cf_Leonardo_Lucid_Origin_Input {
6536
+ /**
6537
+ * A text description of the image you want to generate.
6538
+ */
6539
+ prompt: string;
6540
+ /**
6541
+ * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
6542
+ */
6543
+ guidance?: number;
6544
+ /**
6545
+ * Random seed for reproducibility of the image generation
6546
+ */
6547
+ seed?: number;
6548
+ /**
6549
+ * The height of the generated image in pixels
6550
+ */
6551
+ height?: number;
6552
+ /**
6553
+ * The width of the generated image in pixels
6554
+ */
6555
+ width?: number;
6556
+ /**
6557
+ * The number of diffusion steps; higher values can improve quality but take longer
6558
+ */
6559
+ num_steps?: number;
6560
+ /**
6561
+ * The number of diffusion steps; higher values can improve quality but take longer
6562
+ */
6563
+ steps?: number;
6564
+ }
6565
+ export interface Ai_Cf_Leonardo_Lucid_Origin_Output {
6566
+ /**
6567
+ * The generated image in Base64 format.
6568
+ */
6569
+ image?: string;
6570
+ }
6571
+ export declare abstract class Base_Ai_Cf_Leonardo_Lucid_Origin {
6572
+ inputs: Ai_Cf_Leonardo_Lucid_Origin_Input;
6573
+ postProcessedOutputs: Ai_Cf_Leonardo_Lucid_Origin_Output;
6574
+ }
6575
+ export interface Ai_Cf_Deepgram_Aura_1_Input {
6576
+ /**
6577
+ * Speaker used to produce the audio.
6578
+ */
6579
+ speaker?:
6580
+ | "angus"
6581
+ | "asteria"
6582
+ | "arcas"
6583
+ | "orion"
6584
+ | "orpheus"
6585
+ | "athena"
6586
+ | "luna"
6587
+ | "zeus"
6588
+ | "perseus"
6589
+ | "helios"
6590
+ | "hera"
6591
+ | "stella";
6592
+ /**
6593
+ * Encoding of the output audio.
6594
+ */
6595
+ encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
6596
+ /**
6597
+ * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
6598
+ */
6599
+ container?: "none" | "wav" | "ogg";
6600
+ /**
6601
+ * The text content to be converted to speech
6602
+ */
6603
+ text: string;
6604
+ /**
6605
+ * 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
6606
+ */
6607
+ sample_rate?: number;
6608
+ /**
6609
+ * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
6610
+ */
6611
+ bit_rate?: number;
6612
+ }
6613
+ /**
6614
+ * The generated audio in MP3 format
6615
+ */
6616
+ export type Ai_Cf_Deepgram_Aura_1_Output = string;
6617
+ export declare abstract class Base_Ai_Cf_Deepgram_Aura_1 {
6618
+ inputs: Ai_Cf_Deepgram_Aura_1_Input;
6619
+ postProcessedOutputs: Ai_Cf_Deepgram_Aura_1_Output;
6620
+ }
5912
6621
  export interface AiModels {
5913
6622
  "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
5914
6623
  "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
@@ -5917,8 +6626,8 @@ export interface AiModels {
5917
6626
  "@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage;
5918
6627
  "@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage;
5919
6628
  "@cf/myshell-ai/melotts": BaseAiTextToSpeech;
6629
+ "@cf/google/embeddinggemma-300m": BaseAiTextEmbeddings;
5920
6630
  "@cf/microsoft/resnet-50": BaseAiImageClassification;
5921
- "@cf/facebook/detr-resnet-50": BaseAiObjectDetection;
5922
6631
  "@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration;
5923
6632
  "@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration;
5924
6633
  "@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration;
@@ -5953,7 +6662,6 @@ export interface AiModels {
5953
6662
  "@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration;
5954
6663
  "@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration;
5955
6664
  "@hf/meta-llama/meta-llama-3-8b-instruct": BaseAiTextGeneration;
5956
- "@cf/meta/llama-3.1-8b-instruct": BaseAiTextGeneration;
5957
6665
  "@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration;
5958
6666
  "@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration;
5959
6667
  "@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration;
@@ -5980,6 +6688,13 @@ export interface AiModels {
5980
6688
  "@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct;
5981
6689
  "@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It;
5982
6690
  "@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
6691
+ "@cf/deepgram/nova-3": Base_Ai_Cf_Deepgram_Nova_3;
6692
+ "@cf/pipecat-ai/smart-turn-v2": Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2;
6693
+ "@cf/openai/gpt-oss-120b": Base_Ai_Cf_Openai_Gpt_Oss_120B;
6694
+ "@cf/openai/gpt-oss-20b": Base_Ai_Cf_Openai_Gpt_Oss_20B;
6695
+ "@cf/leonardo/phoenix-1.0": Base_Ai_Cf_Leonardo_Phoenix_1_0;
6696
+ "@cf/leonardo/lucid-origin": Base_Ai_Cf_Leonardo_Lucid_Origin;
6697
+ "@cf/deepgram/aura-1": Base_Ai_Cf_Deepgram_Aura_1;
5983
6698
  }
5984
6699
  export type AiOptions = {
5985
6700
  /**
@@ -5987,6 +6702,10 @@ export type AiOptions = {
5987
6702
  * https://developers.cloudflare.com/workers-ai/features/batch-api
5988
6703
  */
5989
6704
  queueRequest?: boolean;
6705
+ /**
6706
+ * Establish websocket connections, only works for supported models
6707
+ */
6708
+ websocket?: boolean;
5990
6709
  gateway?: GatewayOptions;
5991
6710
  returnRawResponse?: boolean;
5992
6711
  prefix?: string;
@@ -6032,7 +6751,7 @@ export declare abstract class Ai<
6032
6751
  > {
6033
6752
  aiGatewayLogId: string | null;
6034
6753
  gateway(gatewayId: string): AiGateway;
6035
- autorag(autoragId?: string): AutoRAG;
6754
+ autorag(autoragId: string): AutoRAG;
6036
6755
  run<
6037
6756
  Name extends keyof AiModelList,
6038
6757
  Options extends AiOptions,
@@ -6042,9 +6761,13 @@ export declare abstract class Ai<
6042
6761
  inputs: InputOptions,
6043
6762
  options?: Options,
6044
6763
  ): Promise<
6045
- Options extends {
6046
- returnRawResponse: true;
6047
- }
6764
+ Options extends
6765
+ | {
6766
+ returnRawResponse: true;
6767
+ }
6768
+ | {
6769
+ websocket: true;
6770
+ }
6048
6771
  ? Response
6049
6772
  : InputOptions extends {
6050
6773
  stream: true;