Skip to content
File

Blob: types/defines/ai.d.ts

typescript6061 lines
1export type AiImageClassificationInput = {
2 image: number[];
3};
4export type AiImageClassificationOutput = {
5 score?: number;
6 label?: string;
7}[];
8export declare abstract class BaseAiImageClassification {
9 inputs: AiImageClassificationInput;
10 postProcessedOutputs: AiImageClassificationOutput;
11}
12export type AiImageToTextInput = {
13 image: number[];
14 prompt?: string;
15 max_tokens?: number;
16 temperature?: number;
17 top_p?: number;
18 top_k?: number;
19 seed?: number;
20 repetition_penalty?: number;
21 frequency_penalty?: number;
22 presence_penalty?: number;
23 raw?: boolean;
24 messages?: RoleScopedChatInput[];
25};
26export type AiImageToTextOutput = {
27 description: string;
28};
29export declare abstract class BaseAiImageToText {
30 inputs: AiImageToTextInput;
31 postProcessedOutputs: AiImageToTextOutput;
32}
33export type AiImageTextToTextInput = {
34 image: string;
35 prompt?: string;
36 max_tokens?: number;
37 temperature?: number;
38 ignore_eos?: boolean;
39 top_p?: number;
40 top_k?: number;
41 seed?: number;
42 repetition_penalty?: number;
43 frequency_penalty?: number;
44 presence_penalty?: number;
45 raw?: boolean;
46 messages?: RoleScopedChatInput[];
47};
48export type AiImageTextToTextOutput = {
49 description: string;
50};
51export declare abstract class BaseAiImageTextToText {
52 inputs: AiImageTextToTextInput;
53 postProcessedOutputs: AiImageTextToTextOutput;
54}
55export type AiMultimodalEmbeddingsInput = {
56 image: string;
57 text: string[];
58};
59export type AiIMultimodalEmbeddingsOutput = {
60 data: number[][];
61 shape: number[];
62};
63export declare abstract class BaseAiMultimodalEmbeddings {
64 inputs: AiImageTextToTextInput;
65 postProcessedOutputs: AiImageTextToTextOutput;
66}
67export type AiObjectDetectionInput = {
68 image: number[];
69};
70export type AiObjectDetectionOutput = {
71 score?: number;
72 label?: string;
73}[];
74export declare abstract class BaseAiObjectDetection {
75 inputs: AiObjectDetectionInput;
76 postProcessedOutputs: AiObjectDetectionOutput;
77}
78export type AiSentenceSimilarityInput = {
79 source: string;
80 sentences: string[];
81};
82export type AiSentenceSimilarityOutput = number[];
83export declare abstract class BaseAiSentenceSimilarity {
84 inputs: AiSentenceSimilarityInput;
85 postProcessedOutputs: AiSentenceSimilarityOutput;
86}
87export type AiAutomaticSpeechRecognitionInput = {
88 audio: number[];
89};
90export type AiAutomaticSpeechRecognitionOutput = {
91 text?: string;
92 words?: {
93 word: string;
94 start: number;
95 end: number;
96 }[];
97 vtt?: string;
98};
99export declare abstract class BaseAiAutomaticSpeechRecognition {
100 inputs: AiAutomaticSpeechRecognitionInput;
101 postProcessedOutputs: AiAutomaticSpeechRecognitionOutput;
102}
103export type AiSummarizationInput = {
104 input_text: string;
105 max_length?: number;
106};
107export type AiSummarizationOutput = {
108 summary: string;
109};
110export declare abstract class BaseAiSummarization {
111 inputs: AiSummarizationInput;
112 postProcessedOutputs: AiSummarizationOutput;
113}
114export type AiTextClassificationInput = {
115 text: string;
116};
117export type AiTextClassificationOutput = {
118 score?: number;
119 label?: string;
120}[];
121export declare abstract class BaseAiTextClassification {
122 inputs: AiTextClassificationInput;
123 postProcessedOutputs: AiTextClassificationOutput;
124}
125export type AiTextEmbeddingsInput = {
126 text: string | string[];
127};
128export type AiTextEmbeddingsOutput = {
129 shape: number[];
130 data: number[][];
131};
132export declare abstract class BaseAiTextEmbeddings {
133 inputs: AiTextEmbeddingsInput;
134 postProcessedOutputs: AiTextEmbeddingsOutput;
135}
136export type RoleScopedChatInput = {
137 role: "user" | "assistant" | "system" | "tool" | (string & NonNullable<unknown>);
138 content: string;
139 name?: string;
140};
141export type AiTextGenerationToolLegacyInput = {
142 name: string;
143 description: string;
144 parameters?: {
145 type: "object" | (string & NonNullable<unknown>);
146 properties: {
147 [key: string]: {
148 type: string;
149 description?: string;
150 };
151 };
152 required: string[];
153 };
154};
155export type AiTextGenerationToolInput = {
156 type: "function" | (string & NonNullable<unknown>);
157 function: {
158 name: string;
159 description: string;
160 parameters?: {
161 type: "object" | (string & NonNullable<unknown>);
162 properties: {
163 [key: string]: {
164 type: string;
165 description?: string;
166 };
167 };
168 required: string[];
169 };
170 };
171};
172export type AiTextGenerationFunctionsInput = {
173 name: string;
174 code: string;
175};
176export type AiTextGenerationResponseFormat = {
177 type: string;
178 json_schema?: any;
179};
180export type AiTextGenerationInput = {
181 prompt?: string;
182 raw?: boolean;
183 stream?: boolean;
184 max_tokens?: number;
185 temperature?: number;
186 top_p?: number;
187 top_k?: number;
188 seed?: number;
189 repetition_penalty?: number;
190 frequency_penalty?: number;
191 presence_penalty?: number;
192 messages?: RoleScopedChatInput[];
193 response_format?: AiTextGenerationResponseFormat;
194 tools?: AiTextGenerationToolInput[] | AiTextGenerationToolLegacyInput[] | (object & NonNullable<unknown>);
195 functions?: AiTextGenerationFunctionsInput[];
196};
197export type AiTextGenerationToolLegacyOutput = {
198 name: string;
199 arguments: unknown;
200};
201export type AiTextGenerationToolOutput = {
202 id: string;
203 type: "function";
204 function: {
205 name: string;
206 arguments: string;
207 };
208};
209export type UsageTags = {
210 prompt_tokens: number;
211 completion_tokens: number;
212 total_tokens: number;
213};
214export type AiTextGenerationOutput = {
215 response?: string;
216 tool_calls?: AiTextGenerationToolLegacyOutput[] & AiTextGenerationToolOutput[];
217 usage?: UsageTags;
218};
219export declare abstract class BaseAiTextGeneration {
220 inputs: AiTextGenerationInput;
221 postProcessedOutputs: AiTextGenerationOutput;
222}
223export type AiTextToSpeechInput = {
224 prompt: string;
225 lang?: string;
226};
227export type AiTextToSpeechOutput =
228 | Uint8Array
229 | {
230 audio: string;
231 };
232export declare abstract class BaseAiTextToSpeech {
233 inputs: AiTextToSpeechInput;
234 postProcessedOutputs: AiTextToSpeechOutput;
235}
236export type AiTextToImageInput = {
237 prompt: string;
238 negative_prompt?: string;
239 height?: number;
240 width?: number;
241 image?: number[];
242 image_b64?: string;
243 mask?: number[];
244 num_steps?: number;
245 strength?: number;
246 guidance?: number;
247 seed?: number;
248};
249export type AiTextToImageOutput = ReadableStream<Uint8Array>;
250export declare abstract class BaseAiTextToImage {
251 inputs: AiTextToImageInput;
252 postProcessedOutputs: AiTextToImageOutput;
253}
254export type AiTranslationInput = {
255 text: string;
256 target_lang: string;
257 source_lang?: string;
258};
259export type AiTranslationOutput = {
260 translated_text?: string;
261};
262export declare abstract class BaseAiTranslation {
263 inputs: AiTranslationInput;
264 postProcessedOutputs: AiTranslationOutput;
265}
266/**
267 * Workers AI support for OpenAI's Chat Completions API
268 */
269export type ChatCompletionContentPartText = {
270 type: "text";
271 text: string;
272};
273export type ChatCompletionContentPartImage = {
274 type: "image_url";
275 image_url: {
276 url: string;
277 detail?: "auto" | "low" | "high";
278 };
279};
280export type ChatCompletionContentPartInputAudio = {
281 type: "input_audio";
282 input_audio: {
283 /** Base64 encoded audio data. */
284 data: string;
285 format: "wav" | "mp3";
286 };
287};
288export type ChatCompletionContentPartFile = {
289 type: "file";
290 file: {
291 /** Base64 encoded file data. */
292 file_data?: string;
293 /** The ID of an uploaded file. */
294 file_id?: string;
295 filename?: string;
296 };
297};
298export type ChatCompletionContentPartRefusal = {
299 type: "refusal";
300 refusal: string;
301};
302export type ChatCompletionContentPart =
303 | ChatCompletionContentPartText
304 | ChatCompletionContentPartImage
305 | ChatCompletionContentPartInputAudio
306 | ChatCompletionContentPartFile;
307export type FunctionDefinition = {
308 name: string;
309 description?: string;
310 parameters?: Record<string, unknown>;
311 strict?: boolean | null;
312};
313export type ChatCompletionFunctionTool = {
314 type: "function";
315 function: FunctionDefinition;
316};
317export type ChatCompletionCustomToolGrammarFormat = {
318 type: "grammar";
319 grammar: {
320 definition: string;
321 syntax: "lark" | "regex";
322 };
323};
324export type ChatCompletionCustomToolTextFormat = {
325 type: "text";
326};
327export type ChatCompletionCustomToolFormat = ChatCompletionCustomToolTextFormat | ChatCompletionCustomToolGrammarFormat;
328export type ChatCompletionCustomTool = {
329 type: "custom";
330 custom: {
331 name: string;
332 description?: string;
333 format?: ChatCompletionCustomToolFormat;
334 };
335};
336export type ChatCompletionTool = ChatCompletionFunctionTool | ChatCompletionCustomTool;
337export type ChatCompletionMessageFunctionToolCall = {
338 id: string;
339 type: "function";
340 function: {
341 name: string;
342 /** JSON-encoded arguments string. */
343 arguments: string;
344 };
345};
346export type ChatCompletionMessageCustomToolCall = {
347 id: string;
348 type: "custom";
349 custom: {
350 name: string;
351 input: string;
352 };
353};
354export type ChatCompletionMessageToolCall = ChatCompletionMessageFunctionToolCall | ChatCompletionMessageCustomToolCall;
355export type ChatCompletionToolChoiceFunction = {
356 type: "function";
357 function: {
358 name: string;
359 };
360};
361export type ChatCompletionToolChoiceCustom = {
362 type: "custom";
363 custom: {
364 name: string;
365 };
366};
367export type ChatCompletionToolChoiceAllowedTools = {
368 type: "allowed_tools";
369 allowed_tools: {
370 mode: "auto" | "required";
371 tools: Array<Record<string, unknown>>;
372 };
373};
374export type ChatCompletionToolChoiceOption =
375 | "none"
376 | "auto"
377 | "required"
378 | ChatCompletionToolChoiceFunction
379 | ChatCompletionToolChoiceCustom
380 | ChatCompletionToolChoiceAllowedTools;
381export type DeveloperMessage = {
382 role: "developer";
383 content:
384 | string
385 | Array<{
386 type: "text";
387 text: string;
388 }>;
389 name?: string;
390};
391export type SystemMessage = {
392 role: "system";
393 content:
394 | string
395 | Array<{
396 type: "text";
397 text: string;
398 }>;
399 name?: string;
400};
401/**
402 * Permissive merged content part used inside UserMessage arrays.
403 *
404 * Cabidela has a limitation where anyOf/oneOf with enum-based discrimination
405 * inside nested array items does not correctly match different branches for
406 * different array elements, so the schema uses a single merged object.
407 */
408export type UserMessageContentPart = {
409 type: "text" | "image_url" | "input_audio" | "file";
410 text?: string;
411 image_url?: {
412 url?: string;
413 detail?: "auto" | "low" | "high";
414 };
415 input_audio?: {
416 data?: string;
417 format?: "wav" | "mp3";
418 };
419 file?: {
420 file_data?: string;
421 file_id?: string;
422 filename?: string;
423 };
424};
425export type UserMessage = {
426 role: "user";
427 content: string | Array<UserMessageContentPart>;
428 name?: string;
429};
430export type AssistantMessageContentPart = {
431 type: "text" | "refusal";
432 text?: string;
433 refusal?: string;
434};
435export type AssistantMessage = {
436 role: "assistant";
437 content?: string | null | Array<AssistantMessageContentPart>;
438 refusal?: string | null;
439 name?: string;
440 audio?: {
441 id: string;
442 };
443 tool_calls?: Array<ChatCompletionMessageToolCall>;
444 function_call?: {
445 name: string;
446 arguments: string;
447 };
448};
449export type ToolMessage = {
450 role: "tool";
451 content:
452 | string
453 | Array<{
454 type: "text";
455 text: string;
456 }>;
457 tool_call_id: string;
458};
459export type FunctionMessage = {
460 role: "function";
461 content: string;
462 name: string;
463};
464export type ChatCompletionMessageParam =
465 | DeveloperMessage
466 | SystemMessage
467 | UserMessage
468 | AssistantMessage
469 | ToolMessage
470 | FunctionMessage;
471export type ChatCompletionsResponseFormatText = {
472 type: "text";
473};
474export type ChatCompletionsResponseFormatJSONObject = {
475 type: "json_object";
476};
477export type ResponseFormatJSONSchema = {
478 type: "json_schema";
479 json_schema: {
480 name: string;
481 description?: string;
482 schema?: Record<string, unknown>;
483 strict?: boolean | null;
484 };
485};
486export type ResponseFormat =
487 | ChatCompletionsResponseFormatText
488 | ChatCompletionsResponseFormatJSONObject
489 | ResponseFormatJSONSchema;
490export type ChatCompletionsStreamOptions = {
491 include_usage?: boolean;
492 include_obfuscation?: boolean;
493};
494export type PredictionContent = {
495 type: "content";
496 content:
497 | string
498 | Array<{
499 type: "text";
500 text: string;
501 }>;
502};
503export type AudioParams = {
504 voice:
505 | string
506 | {
507 id: string;
508 };
509 format: "wav" | "aac" | "mp3" | "flac" | "opus" | "pcm16";
510};
511export type WebSearchUserLocation = {
512 type: "approximate";
513 approximate: {
514 city?: string;
515 country?: string;
516 region?: string;
517 timezone?: string;
518 };
519};
520export type WebSearchOptions = {
521 search_context_size?: "low" | "medium" | "high";
522 user_location?: WebSearchUserLocation;
523};
524export type ChatTemplateKwargs = {
525 /** Whether to enable reasoning, enabled by default. */
526 enable_thinking?: boolean;
527 /** If false, preserves reasoning context between turns. */
528 clear_thinking?: boolean;
529};
530/** Shared optional properties used by both Prompt and Messages input branches. */
531export type ChatCompletionsCommonOptions = {
532 model?: string;
533 audio?: AudioParams;
534 frequency_penalty?: number | null;
535 logit_bias?: Record<string, unknown> | null;
536 logprobs?: boolean | null;
537 top_logprobs?: number | null;
538 max_tokens?: number | null;
539 max_completion_tokens?: number | null;
540 metadata?: Record<string, unknown> | null;
541 modalities?: Array<"text" | "audio"> | null;
542 n?: number | null;
543 parallel_tool_calls?: boolean;
544 prediction?: PredictionContent;
545 presence_penalty?: number | null;
546 reasoning_effort?: "low" | "medium" | "high" | null;
547 chat_template_kwargs?: ChatTemplateKwargs;
548 response_format?: ResponseFormat;
549 seed?: number | null;
550 service_tier?: "auto" | "default" | "flex" | "scale" | "priority" | null;
551 stop?: string | Array<string> | null;
552 store?: boolean | null;
553 stream?: boolean | null;
554 stream_options?: ChatCompletionsStreamOptions;
555 temperature?: number | null;
556 tool_choice?: ChatCompletionToolChoiceOption;
557 tools?: Array<ChatCompletionTool>;
558 top_p?: number | null;
559 user?: string;
560 web_search_options?: WebSearchOptions;
561 function_call?:
562 | "none"
563 | "auto"
564 | {
565 name: string;
566 };
567 functions?: Array<FunctionDefinition>;
568};
569export type PromptTokensDetails = {
570 cached_tokens?: number;
571 audio_tokens?: number;
572};
573export type CompletionTokensDetails = {
574 reasoning_tokens?: number;
575 audio_tokens?: number;
576 accepted_prediction_tokens?: number;
577 rejected_prediction_tokens?: number;
578};
579export type CompletionUsage = {
580 prompt_tokens: number;
581 completion_tokens: number;
582 total_tokens: number;
583 prompt_tokens_details?: PromptTokensDetails;
584 completion_tokens_details?: CompletionTokensDetails;
585};
586export type ChatCompletionTopLogprob = {
587 token: string;
588 logprob: number;
589 bytes: Array<number> | null;
590};
591export type ChatCompletionTokenLogprob = {
592 token: string;
593 logprob: number;
594 bytes: Array<number> | null;
595 top_logprobs: Array<ChatCompletionTopLogprob>;
596};
597export type ChatCompletionAudio = {
598 id: string;
599 /** Base64 encoded audio bytes. */
600 data: string;
601 expires_at: number;
602 transcript: string;
603};
604export type ChatCompletionUrlCitation = {
605 type: "url_citation";
606 url_citation: {
607 url: string;
608 title: string;
609 start_index: number;
610 end_index: number;
611 };
612};
613export type ChatCompletionResponseMessage = {
614 role: "assistant";
615 content: string | null;
616 refusal: string | null;
617 annotations?: Array<ChatCompletionUrlCitation>;
618 audio?: ChatCompletionAudio;
619 tool_calls?: Array<ChatCompletionMessageToolCall>;
620 function_call?: {
621 name: string;
622 arguments: string;
623 } | null;
624};
625export type ChatCompletionLogprobs = {
626 content: Array<ChatCompletionTokenLogprob> | null;
627 refusal?: Array<ChatCompletionTokenLogprob> | null;
628};
629export type ChatCompletionChoice = {
630 index: number;
631 message: ChatCompletionResponseMessage;
632 finish_reason: "stop" | "length" | "tool_calls" | "content_filter" | "function_call";
633 logprobs: ChatCompletionLogprobs | null;
634};
635export type ChatCompletionsPromptInput = {
636 prompt: string;
637} & ChatCompletionsCommonOptions;
638export type ChatCompletionsMessagesInput = {
639 messages: Array<ChatCompletionMessageParam>;
640} & ChatCompletionsCommonOptions;
641export type ChatCompletionsOutput = {
642 id: string;
643 object: string;
644 created: number;
645 model: string;
646 choices: Array<ChatCompletionChoice>;
647 usage?: CompletionUsage;
648 system_fingerprint?: string | null;
649 service_tier?: "auto" | "default" | "flex" | "scale" | "priority" | null;
650};
651/**
652 * Workers AI support for OpenAI's Responses API
653 * Reference: https://github.com/openai/openai-node/blob/master/src/resources/responses/responses.ts
654 *
655 * It's a stripped down version from its source.
656 * It currently supports basic function calling, json mode and accepts images as input.
657 *
658 * It does not include types for WebSearch, CodeInterpreter, FileInputs, MCP, CustomTools.
659 * We plan to add those incrementally as model + platform capabilities evolve.
660 */
661export type ResponsesInput = {
662 background?: boolean | null;
663 conversation?: string | ResponseConversationParam | null;
664 include?: Array<ResponseIncludable> | null;
665 input?: string | ResponseInput;
666 instructions?: string | null;
667 max_output_tokens?: number | null;
668 parallel_tool_calls?: boolean | null;
669 previous_response_id?: string | null;
670 prompt_cache_key?: string;
671 reasoning?: Reasoning | null;
672 safety_identifier?: string;
673 service_tier?: "auto" | "default" | "flex" | "scale" | "priority" | null;
674 stream?: boolean | null;
675 stream_options?: StreamOptions | null;
676 temperature?: number | null;
677 text?: ResponseTextConfig;
678 tool_choice?: ToolChoiceOptions | ToolChoiceFunction;
679 tools?: Array<Tool>;
680 top_p?: number | null;
681 truncation?: "auto" | "disabled" | null;
682};
683export type ResponsesOutput = {
684 id?: string;
685 created_at?: number;
686 output_text?: string;
687 error?: ResponseError | null;
688 incomplete_details?: ResponseIncompleteDetails | null;
689 instructions?: string | Array<ResponseInputItem> | null;
690 object?: "response";
691 output?: Array<ResponseOutputItem>;
692 parallel_tool_calls?: boolean;
693 temperature?: number | null;
694 tool_choice?: ToolChoiceOptions | ToolChoiceFunction;
695 tools?: Array<Tool>;
696 top_p?: number | null;
697 max_output_tokens?: number | null;
698 previous_response_id?: string | null;
699 prompt?: ResponsePrompt | null;
700 reasoning?: Reasoning | null;
701 safety_identifier?: string;
702 service_tier?: "auto" | "default" | "flex" | "scale" | "priority" | null;
703 status?: ResponseStatus;
704 text?: ResponseTextConfig;
705 truncation?: "auto" | "disabled" | null;
706 usage?: ResponseUsage;
707};
708export type EasyInputMessage = {
709 content: string | ResponseInputMessageContentList;
710 role: "user" | "assistant" | "system" | "developer";
711 type?: "message";
712};
713export type ResponsesFunctionTool = {
714 name: string;
715 parameters: {
716 [key: string]: unknown;
717 } | null;
718 strict: boolean | null;
719 type: "function";
720 description?: string | null;
721};
722export type ResponseIncompleteDetails = {
723 reason?: "max_output_tokens" | "content_filter";
724};
725export type ResponsePrompt = {
726 id: string;
727 variables?: {
728 [key: string]: string | ResponseInputText | ResponseInputImage;
729 } | null;
730 version?: string | null;
731};
732export type Reasoning = {
733 effort?: ReasoningEffort | null;
734 generate_summary?: "auto" | "concise" | "detailed" | null;
735 summary?: "auto" | "concise" | "detailed" | null;
736};
737export type ResponseContent =
738 | ResponseInputText
739 | ResponseInputImage
740 | ResponseOutputText
741 | ResponseOutputRefusal
742 | ResponseContentReasoningText;
743export type ResponseContentReasoningText = {
744 text: string;
745 type: "reasoning_text";
746};
747export type ResponseConversationParam = {
748 id: string;
749};
750export type ResponseCreatedEvent = {
751 response: Response;
752 sequence_number: number;
753 type: "response.created";
754};
755export type ResponseCustomToolCallOutput = {
756 call_id: string;
757 output: string | Array<ResponseInputText | ResponseInputImage>;
758 type: "custom_tool_call_output";
759 id?: string;
760};
761export type ResponseError = {
762 code:
763 | "server_error"
764 | "rate_limit_exceeded"
765 | "invalid_prompt"
766 | "vector_store_timeout"
767 | "invalid_image"
768 | "invalid_image_format"
769 | "invalid_base64_image"
770 | "invalid_image_url"
771 | "image_too_large"
772 | "image_too_small"
773 | "image_parse_error"
774 | "image_content_policy_violation"
775 | "invalid_image_mode"
776 | "image_file_too_large"
777 | "unsupported_image_media_type"
778 | "empty_image_file"
779 | "failed_to_download_image"
780 | "image_file_not_found";
781 message: string;
782};
783export type ResponseErrorEvent = {
784 code: string | null;
785 message: string;
786 param: string | null;
787 sequence_number: number;
788 type: "error";
789};
790export type ResponseFailedEvent = {
791 response: Response;
792 sequence_number: number;
793 type: "response.failed";
794};
795export type ResponseFormatText = {
796 type: "text";
797};
798export type ResponseFormatJSONObject = {
799 type: "json_object";
800};
801export type ResponseFormatTextConfig =
802 | ResponseFormatText
803 | ResponseFormatTextJSONSchemaConfig
804 | ResponseFormatJSONObject;
805export type ResponseFormatTextJSONSchemaConfig = {
806 name: string;
807 schema: {
808 [key: string]: unknown;
809 };
810 type: "json_schema";
811 description?: string;
812 strict?: boolean | null;
813};
814export type ResponseFunctionCallArgumentsDeltaEvent = {
815 delta: string;
816 item_id: string;
817 output_index: number;
818 sequence_number: number;
819 type: "response.function_call_arguments.delta";
820};
821export type ResponseFunctionCallArgumentsDoneEvent = {
822 arguments: string;
823 item_id: string;
824 name: string;
825 output_index: number;
826 sequence_number: number;
827 type: "response.function_call_arguments.done";
828};
829export type ResponseFunctionCallOutputItem = ResponseInputTextContent | ResponseInputImageContent;
830export type ResponseFunctionCallOutputItemList = Array<ResponseFunctionCallOutputItem>;
831export type ResponseFunctionToolCall = {
832 arguments: string;
833 call_id: string;
834 name: string;
835 type: "function_call";
836 id?: string;
837 status?: "in_progress" | "completed" | "incomplete";
838};
839export interface ResponseFunctionToolCallItem extends ResponseFunctionToolCall {
840 id: string;
841}
842export type ResponseFunctionToolCallOutputItem = {
843 id: string;
844 call_id: string;
845 output: string | Array<ResponseInputText | ResponseInputImage>;
846 type: "function_call_output";
847 status?: "in_progress" | "completed" | "incomplete";
848};
849export type ResponseIncludable = "message.input_image.image_url" | "message.output_text.logprobs";
850export type ResponseIncompleteEvent = {
851 response: Response;
852 sequence_number: number;
853 type: "response.incomplete";
854};
855export type ResponseInput = Array<ResponseInputItem>;
856export type ResponseInputContent = ResponseInputText | ResponseInputImage;
857export type ResponseInputImage = {
858 detail: "low" | "high" | "auto";
859 type: "input_image";
860 /**
861 * Base64 encoded image
862 */
863 image_url?: string | null;
864};
865export type ResponseInputImageContent = {
866 type: "input_image";
867 detail?: "low" | "high" | "auto" | null;
868 /**
869 * Base64 encoded image
870 */
871 image_url?: string | null;
872};
873export type ResponseInputItem =
874 | EasyInputMessage
875 | ResponseInputItemMessage
876 | ResponseOutputMessage
877 | ResponseFunctionToolCall
878 | ResponseInputItemFunctionCallOutput
879 | ResponseReasoningItem;
880export type ResponseInputItemFunctionCallOutput = {
881 call_id: string;
882 output: string | ResponseFunctionCallOutputItemList;
883 type: "function_call_output";
884 id?: string | null;
885 status?: "in_progress" | "completed" | "incomplete" | null;
886};
887export type ResponseInputItemMessage = {
888 content: ResponseInputMessageContentList;
889 role: "user" | "system" | "developer";
890 status?: "in_progress" | "completed" | "incomplete";
891 type?: "message";
892};
893export type ResponseInputMessageContentList = Array<ResponseInputContent>;
894export type ResponseInputMessageItem = {
895 id: string;
896 content: ResponseInputMessageContentList;
897 role: "user" | "system" | "developer";
898 status?: "in_progress" | "completed" | "incomplete";
899 type?: "message";
900};
901export type ResponseInputText = {
902 text: string;
903 type: "input_text";
904};
905export type ResponseInputTextContent = {
906 text: string;
907 type: "input_text";
908};
909export type ResponseItem =
910 | ResponseInputMessageItem
911 | ResponseOutputMessage
912 | ResponseFunctionToolCallItem
913 | ResponseFunctionToolCallOutputItem;
914export type ResponseOutputItem = ResponseOutputMessage | ResponseFunctionToolCall | ResponseReasoningItem;
915export type ResponseOutputItemAddedEvent = {
916 item: ResponseOutputItem;
917 output_index: number;
918 sequence_number: number;
919 type: "response.output_item.added";
920};
921export type ResponseOutputItemDoneEvent = {
922 item: ResponseOutputItem;
923 output_index: number;
924 sequence_number: number;
925 type: "response.output_item.done";
926};
927export type ResponseOutputMessage = {
928 id: string;
929 content: Array<ResponseOutputText | ResponseOutputRefusal>;
930 role: "assistant";
931 status: "in_progress" | "completed" | "incomplete";
932 type: "message";
933};
934export type ResponseOutputRefusal = {
935 refusal: string;
936 type: "refusal";
937};
938export type ResponseOutputText = {
939 text: string;
940 type: "output_text";
941 logprobs?: Array<Logprob>;
942};
943export type ResponseReasoningItem = {
944 id: string;
945 summary: Array<ResponseReasoningSummaryItem>;
946 type: "reasoning";
947 content?: Array<ResponseReasoningContentItem>;
948 encrypted_content?: string | null;
949 status?: "in_progress" | "completed" | "incomplete";
950};
951export type ResponseReasoningSummaryItem = {
952 text: string;
953 type: "summary_text";
954};
955export type ResponseReasoningContentItem = {
956 text: string;
957 type: "reasoning_text";
958};
959export type ResponseReasoningTextDeltaEvent = {
960 content_index: number;
961 delta: string;
962 item_id: string;
963 output_index: number;
964 sequence_number: number;
965 type: "response.reasoning_text.delta";
966};
967export type ResponseReasoningTextDoneEvent = {
968 content_index: number;
969 item_id: string;
970 output_index: number;
971 sequence_number: number;
972 text: string;
973 type: "response.reasoning_text.done";
974};
975export type ResponseRefusalDeltaEvent = {
976 content_index: number;
977 delta: string;
978 item_id: string;
979 output_index: number;
980 sequence_number: number;
981 type: "response.refusal.delta";
982};
983export type ResponseRefusalDoneEvent = {
984 content_index: number;
985 item_id: string;
986 output_index: number;
987 refusal: string;
988 sequence_number: number;
989 type: "response.refusal.done";
990};
991export type ResponseStatus = "completed" | "failed" | "in_progress" | "cancelled" | "queued" | "incomplete";
992export type ResponseStreamEvent =
993 | ResponseCompletedEvent
994 | ResponseCreatedEvent
995 | ResponseErrorEvent
996 | ResponseFunctionCallArgumentsDeltaEvent
997 | ResponseFunctionCallArgumentsDoneEvent
998 | ResponseFailedEvent
999 | ResponseIncompleteEvent
1000 | ResponseOutputItemAddedEvent
1001 | ResponseOutputItemDoneEvent
1002 | ResponseReasoningTextDeltaEvent
1003 | ResponseReasoningTextDoneEvent
1004 | ResponseRefusalDeltaEvent
1005 | ResponseRefusalDoneEvent
1006 | ResponseTextDeltaEvent
1007 | ResponseTextDoneEvent;
1008export type ResponseCompletedEvent = {
1009 response: Response;
1010 sequence_number: number;
1011 type: "response.completed";
1012};
1013export type ResponseTextConfig = {
1014 format?: ResponseFormatTextConfig;
1015 verbosity?: "low" | "medium" | "high" | null;
1016};
1017export type ResponseTextDeltaEvent = {
1018 content_index: number;
1019 delta: string;
1020 item_id: string;
1021 logprobs: Array<Logprob>;
1022 output_index: number;
1023 sequence_number: number;
1024 type: "response.output_text.delta";
1025};
1026export type ResponseTextDoneEvent = {
1027 content_index: number;
1028 item_id: string;
1029 logprobs: Array<Logprob>;
1030 output_index: number;
1031 sequence_number: number;
1032 text: string;
1033 type: "response.output_text.done";
1034};
1035export type Logprob = {
1036 token: string;
1037 logprob: number;
1038 top_logprobs?: Array<TopLogprob>;
1039};
1040export type TopLogprob = {
1041 token?: string;
1042 logprob?: number;
1043};
1044export type ResponseUsage = {
1045 input_tokens: number;
1046 output_tokens: number;
1047 total_tokens: number;
1048};
1049export type Tool = ResponsesFunctionTool;
1050export type ToolChoiceFunction = {
1051 name: string;
1052 type: "function";
1053};
1054export type ToolChoiceOptions = "none";
1055export type ReasoningEffort = "minimal" | "low" | "medium" | "high" | null;
1056export type StreamOptions = {
1057 include_obfuscation?: boolean;
1058};
1059/** Marks keys from T that aren't in U as optional never */
1060export type Without<T, U> = {
1061 [P in Exclude<keyof T, keyof U>]?: never;
1062};
1063/** Either T or U, but not both (mutually exclusive) */
1064export type XOR<T, U> = (T & Without<U, T>) | (U & Without<T, U>);
1065export type Ai_Cf_Baai_Bge_Base_En_V1_5_Input =
1066 | {
1067 text: string | string[];
1068 /**
1069 * The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.
1070 */
1071 pooling?: "mean" | "cls";
1072 }
1073 | {
1074 /**
1075 * Batch of the embeddings requests to run using async-queue
1076 */
1077 requests: {
1078 text: string | string[];
1079 /**
1080 * The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.
1081 */
1082 pooling?: "mean" | "cls";
1083 }[];
1084 };
1085export type Ai_Cf_Baai_Bge_Base_En_V1_5_Output =
1086 | {
1087 shape?: number[];
1088 /**
1089 * Embeddings of the requested text values
1090 */
1091 data?: number[][];
1092 /**
1093 * The pooling method used in the embedding process.
1094 */
1095 pooling?: "mean" | "cls";
1096 }
1097 | Ai_Cf_Baai_Bge_Base_En_V1_5_AsyncResponse;
1098export interface Ai_Cf_Baai_Bge_Base_En_V1_5_AsyncResponse {
1099 /**
1100 * The async request id that can be used to obtain the results.
1101 */
1102 request_id?: string;
1103}
1104export declare abstract class Base_Ai_Cf_Baai_Bge_Base_En_V1_5 {
1105 inputs: Ai_Cf_Baai_Bge_Base_En_V1_5_Input;
1106 postProcessedOutputs: Ai_Cf_Baai_Bge_Base_En_V1_5_Output;
1107}
1108export type Ai_Cf_Openai_Whisper_Input =
1109 | string
1110 | {
1111 /**
1112 * An array of integers that represent the audio data constrained to 8-bit unsigned integer values
1113 */
1114 audio: number[];
1115 };
1116export interface Ai_Cf_Openai_Whisper_Output {
1117 /**
1118 * The transcription
1119 */
1120 text: string;
1121 word_count?: number;
1122 words?: {
1123 word?: string;
1124 /**
1125 * The second this word begins in the recording
1126 */
1127 start?: number;
1128 /**
1129 * The ending second when the word completes
1130 */
1131 end?: number;
1132 }[];
1133 vtt?: string;
1134}
1135export declare abstract class Base_Ai_Cf_Openai_Whisper {
1136 inputs: Ai_Cf_Openai_Whisper_Input;
1137 postProcessedOutputs: Ai_Cf_Openai_Whisper_Output;
1138}
1139export type Ai_Cf_Meta_M2M100_1_2B_Input =
1140 | {
1141 /**
1142 * The text to be translated
1143 */
1144 text: string;
1145 /**
1146 * The language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified
1147 */
1148 source_lang?: string;
1149 /**
1150 * The language code to translate the text into (e.g., 'es' for Spanish)
1151 */
1152 target_lang: string;
1153 }
1154 | {
1155 /**
1156 * Batch of the embeddings requests to run using async-queue
1157 */
1158 requests: {
1159 /**
1160 * The text to be translated
1161 */
1162 text: string;
1163 /**
1164 * The language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified
1165 */
1166 source_lang?: string;
1167 /**
1168 * The language code to translate the text into (e.g., 'es' for Spanish)
1169 */
1170 target_lang: string;
1171 }[];
1172 };
1173export type Ai_Cf_Meta_M2M100_1_2B_Output =
1174 | {
1175 /**
1176 * The translated text in the target language
1177 */
1178 translated_text?: string;
1179 }
1180 | Ai_Cf_Meta_M2M100_1_2B_AsyncResponse;
1181export interface Ai_Cf_Meta_M2M100_1_2B_AsyncResponse {
1182 /**
1183 * The async request id that can be used to obtain the results.
1184 */
1185 request_id?: string;
1186}
1187export declare abstract class Base_Ai_Cf_Meta_M2M100_1_2B {
1188 inputs: Ai_Cf_Meta_M2M100_1_2B_Input;
1189 postProcessedOutputs: Ai_Cf_Meta_M2M100_1_2B_Output;
1190}
1191export type Ai_Cf_Baai_Bge_Small_En_V1_5_Input =
1192 | {
1193 text: string | string[];
1194 /**
1195 * The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.
1196 */
1197 pooling?: "mean" | "cls";
1198 }
1199 | {
1200 /**
1201 * Batch of the embeddings requests to run using async-queue
1202 */
1203 requests: {
1204 text: string | string[];
1205 /**
1206 * The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.
1207 */
1208 pooling?: "mean" | "cls";
1209 }[];
1210 };
1211export type Ai_Cf_Baai_Bge_Small_En_V1_5_Output =
1212 | {
1213 shape?: number[];
1214 /**
1215 * Embeddings of the requested text values
1216 */
1217 data?: number[][];
1218 /**
1219 * The pooling method used in the embedding process.
1220 */
1221 pooling?: "mean" | "cls";
1222 }
1223 | Ai_Cf_Baai_Bge_Small_En_V1_5_AsyncResponse;
1224export interface Ai_Cf_Baai_Bge_Small_En_V1_5_AsyncResponse {
1225 /**
1226 * The async request id that can be used to obtain the results.
1227 */
1228 request_id?: string;
1229}
1230export declare abstract class Base_Ai_Cf_Baai_Bge_Small_En_V1_5 {
1231 inputs: Ai_Cf_Baai_Bge_Small_En_V1_5_Input;
1232 postProcessedOutputs: Ai_Cf_Baai_Bge_Small_En_V1_5_Output;
1233}
1234export type Ai_Cf_Baai_Bge_Large_En_V1_5_Input =
1235 | {
1236 text: string | string[];
1237 /**
1238 * The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.
1239 */
1240 pooling?: "mean" | "cls";
1241 }
1242 | {
1243 /**
1244 * Batch of the embeddings requests to run using async-queue
1245 */
1246 requests: {
1247 text: string | string[];
1248 /**
1249 * The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy.
1250 */
1251 pooling?: "mean" | "cls";
1252 }[];
1253 };
1254export type Ai_Cf_Baai_Bge_Large_En_V1_5_Output =
1255 | {
1256 shape?: number[];
1257 /**
1258 * Embeddings of the requested text values
1259 */
1260 data?: number[][];
1261 /**
1262 * The pooling method used in the embedding process.
1263 */
1264 pooling?: "mean" | "cls";
1265 }
1266 | Ai_Cf_Baai_Bge_Large_En_V1_5_AsyncResponse;
1267export interface Ai_Cf_Baai_Bge_Large_En_V1_5_AsyncResponse {
1268 /**
1269 * The async request id that can be used to obtain the results.
1270 */
1271 request_id?: string;
1272}
1273export declare abstract class Base_Ai_Cf_Baai_Bge_Large_En_V1_5 {
1274 inputs: Ai_Cf_Baai_Bge_Large_En_V1_5_Input;
1275 postProcessedOutputs: Ai_Cf_Baai_Bge_Large_En_V1_5_Output;
1276}
1277export type Ai_Cf_Unum_Uform_Gen2_Qwen_500M_Input =
1278 | string
1279 | {
1280 /**
1281 * The input text prompt for the model to generate a response.
1282 */
1283 prompt?: string;
1284 /**
1285 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
1286 */
1287 raw?: boolean;
1288 /**
1289 * Controls the creativity of the AI's responses by adjusting how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
1290 */
1291 top_p?: number;
1292 /**
1293 * 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.
1294 */
1295 top_k?: number;
1296 /**
1297 * Random seed for reproducibility of the generation.
1298 */
1299 seed?: number;
1300 /**
1301 * Penalty for repeated tokens; higher values discourage repetition.
1302 */
1303 repetition_penalty?: number;
1304 /**
1305 * Decreases the likelihood of the model repeating the same lines verbatim.
1306 */
1307 frequency_penalty?: number;
1308 /**
1309 * Increases the likelihood of the model introducing new topics.
1310 */
1311 presence_penalty?: number;
1312 image: number[] | (string & NonNullable<unknown>);
1313 /**
1314 * The maximum number of tokens to generate in the response.
1315 */
1316 max_tokens?: number;
1317 };
1318export interface Ai_Cf_Unum_Uform_Gen2_Qwen_500M_Output {
1319 description?: string;
1320}
1321export declare abstract class Base_Ai_Cf_Unum_Uform_Gen2_Qwen_500M {
1322 inputs: Ai_Cf_Unum_Uform_Gen2_Qwen_500M_Input;
1323 postProcessedOutputs: Ai_Cf_Unum_Uform_Gen2_Qwen_500M_Output;
1324}
1325export type Ai_Cf_Openai_Whisper_Tiny_En_Input =
1326 | string
1327 | {
1328 /**
1329 * An array of integers that represent the audio data constrained to 8-bit unsigned integer values
1330 */
1331 audio: number[];
1332 };
1333export interface Ai_Cf_Openai_Whisper_Tiny_En_Output {
1334 /**
1335 * The transcription
1336 */
1337 text: string;
1338 word_count?: number;
1339 words?: {
1340 word?: string;
1341 /**
1342 * The second this word begins in the recording
1343 */
1344 start?: number;
1345 /**
1346 * The ending second when the word completes
1347 */
1348 end?: number;
1349 }[];
1350 vtt?: string;
1351}
1352export declare abstract class Base_Ai_Cf_Openai_Whisper_Tiny_En {
1353 inputs: Ai_Cf_Openai_Whisper_Tiny_En_Input;
1354 postProcessedOutputs: Ai_Cf_Openai_Whisper_Tiny_En_Output;
1355}
1356export interface Ai_Cf_Openai_Whisper_Large_V3_Turbo_Input {
1357 audio:
1358 | string
1359 | {
1360 body?: object;
1361 contentType?: string;
1362 };
1363 /**
1364 * Supported tasks are 'translate' or 'transcribe'.
1365 */
1366 task?: string;
1367 /**
1368 * The language of the audio being transcribed or translated.
1369 */
1370 language?: string;
1371 /**
1372 * Preprocess the audio with a voice activity detection model.
1373 */
1374 vad_filter?: boolean;
1375 /**
1376 * A text prompt to help provide context to the model on the contents of the audio.
1377 */
1378 initial_prompt?: string;
1379 /**
1380 * The prefix appended to the beginning of the output of the transcription and can guide the transcription result.
1381 */
1382 prefix?: string;
1383 /**
1384 * The number of beams to use in beam search decoding. Higher values may improve accuracy at the cost of speed.
1385 */
1386 beam_size?: number;
1387 /**
1388 * Whether to condition on previous text during transcription. Setting to false may help prevent hallucination loops.
1389 */
1390 condition_on_previous_text?: boolean;
1391 /**
1392 * Threshold for detecting no-speech segments. Segments with no-speech probability above this value are skipped.
1393 */
1394 no_speech_threshold?: number;
1395 /**
1396 * Threshold for filtering out segments with high compression ratio, which often indicate repetitive or hallucinated text.
1397 */
1398 compression_ratio_threshold?: number;
1399 /**
1400 * Threshold for filtering out segments with low average log probability, indicating low confidence.
1401 */
1402 log_prob_threshold?: number;
1403 /**
1404 * Optional threshold (in seconds) to skip silent periods that may cause hallucinations.
1405 */
1406 hallucination_silence_threshold?: number;
1407}
1408export interface Ai_Cf_Openai_Whisper_Large_V3_Turbo_Output {
1409 transcription_info?: {
1410 /**
1411 * The language of the audio being transcribed or translated.
1412 */
1413 language?: string;
1414 /**
1415 * The confidence level or probability of the detected language being accurate, represented as a decimal between 0 and 1.
1416 */
1417 language_probability?: number;
1418 /**
1419 * The total duration of the original audio file, in seconds.
1420 */
1421 duration?: number;
1422 /**
1423 * The duration of the audio after applying Voice Activity Detection (VAD) to remove silent or irrelevant sections, in seconds.
1424 */
1425 duration_after_vad?: number;
1426 };
1427 /**
1428 * The complete transcription of the audio.
1429 */
1430 text: string;
1431 /**
1432 * The total number of words in the transcription.
1433 */
1434 word_count?: number;
1435 segments?: {
1436 /**
1437 * The starting time of the segment within the audio, in seconds.
1438 */
1439 start?: number;
1440 /**
1441 * The ending time of the segment within the audio, in seconds.
1442 */
1443 end?: number;
1444 /**
1445 * The transcription of the segment.
1446 */
1447 text?: string;
1448 /**
1449 * The temperature used in the decoding process, controlling randomness in predictions. Lower values result in more deterministic outputs.
1450 */
1451 temperature?: number;
1452 /**
1453 * The average log probability of the predictions for the words in this segment, indicating overall confidence.
1454 */
1455 avg_logprob?: number;
1456 /**
1457 * The compression ratio of the input to the output, measuring how much the text was compressed during the transcription process.
1458 */
1459 compression_ratio?: number;
1460 /**
1461 * The probability that the segment contains no speech, represented as a decimal between 0 and 1.
1462 */
1463 no_speech_prob?: number;
1464 words?: {
1465 /**
1466 * The individual word transcribed from the audio.
1467 */
1468 word?: string;
1469 /**
1470 * The starting time of the word within the audio, in seconds.
1471 */
1472 start?: number;
1473 /**
1474 * The ending time of the word within the audio, in seconds.
1475 */
1476 end?: number;
1477 }[];
1478 }[];
1479 /**
1480 * The transcription in WebVTT format, which includes timing and text information for use in subtitles.
1481 */
1482 vtt?: string;
1483}
1484export declare abstract class Base_Ai_Cf_Openai_Whisper_Large_V3_Turbo {
1485 inputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Input;
1486 postProcessedOutputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Output;
1487}
1488export type Ai_Cf_Baai_Bge_M3_Input =
1489 | Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts
1490 | Ai_Cf_Baai_Bge_M3_Input_Embedding
1491 | {
1492 /**
1493 * Batch of the embeddings requests to run using async-queue
1494 */
1495 requests: (Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts_1 | Ai_Cf_Baai_Bge_M3_Input_Embedding_1)[];
1496 };
1497export interface Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts {
1498 /**
1499 * A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts
1500 */
1501 query?: string;
1502 /**
1503 * List of provided contexts. Note that the index in this array is important, as the response will refer to it.
1504 */
1505 contexts: {
1506 /**
1507 * One of the provided context content
1508 */
1509 text?: string;
1510 }[];
1511 /**
1512 * When provided with too long context should the model error out or truncate the context to fit?
1513 */
1514 truncate_inputs?: boolean;
1515}
1516export interface Ai_Cf_Baai_Bge_M3_Input_Embedding {
1517 text: string | string[];
1518 /**
1519 * When provided with too long context should the model error out or truncate the context to fit?
1520 */
1521 truncate_inputs?: boolean;
1522}
1523export interface Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts_1 {
1524 /**
1525 * A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts
1526 */
1527 query?: string;
1528 /**
1529 * List of provided contexts. Note that the index in this array is important, as the response will refer to it.
1530 */
1531 contexts: {
1532 /**
1533 * One of the provided context content
1534 */
1535 text?: string;
1536 }[];
1537 /**
1538 * When provided with too long context should the model error out or truncate the context to fit?
1539 */
1540 truncate_inputs?: boolean;
1541}
1542export interface Ai_Cf_Baai_Bge_M3_Input_Embedding_1 {
1543 text: string | string[];
1544 /**
1545 * When provided with too long context should the model error out or truncate the context to fit?
1546 */
1547 truncate_inputs?: boolean;
1548}
1549export type Ai_Cf_Baai_Bge_M3_Output =
1550 | Ai_Cf_Baai_Bge_M3_Output_Query
1551 | Ai_Cf_Baai_Bge_M3_Output_EmbeddingFor_Contexts
1552 | Ai_Cf_Baai_Bge_M3_Output_Embedding
1553 | Ai_Cf_Baai_Bge_M3_AsyncResponse;
1554export interface Ai_Cf_Baai_Bge_M3_Output_Query {
1555 response?: {
1556 /**
1557 * Index of the context in the request
1558 */
1559 id?: number;
1560 /**
1561 * Score of the context under the index.
1562 */
1563 score?: number;
1564 }[];
1565}
1566export interface Ai_Cf_Baai_Bge_M3_Output_EmbeddingFor_Contexts {
1567 response?: number[][];
1568 shape?: number[];
1569 /**
1570 * The pooling method used in the embedding process.
1571 */
1572 pooling?: "mean" | "cls";
1573}
1574export interface Ai_Cf_Baai_Bge_M3_Output_Embedding {
1575 shape?: number[];
1576 /**
1577 * Embeddings of the requested text values
1578 */
1579 data?: number[][];
1580 /**
1581 * The pooling method used in the embedding process.
1582 */
1583 pooling?: "mean" | "cls";
1584}
1585export interface Ai_Cf_Baai_Bge_M3_AsyncResponse {
1586 /**
1587 * The async request id that can be used to obtain the results.
1588 */
1589 request_id?: string;
1590}
1591export declare abstract class Base_Ai_Cf_Baai_Bge_M3 {
1592 inputs: Ai_Cf_Baai_Bge_M3_Input;
1593 postProcessedOutputs: Ai_Cf_Baai_Bge_M3_Output;
1594}
1595export interface Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Input {
1596 /**
1597 * A text description of the image you want to generate.
1598 */
1599 prompt: string;
1600 /**
1601 * The number of diffusion steps; higher values can improve quality but take longer.
1602 */
1603 steps?: number;
1604}
1605export interface Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Output {
1606 /**
1607 * The generated image in Base64 format.
1608 */
1609 image?: string;
1610}
1611export declare abstract class Base_Ai_Cf_Black_Forest_Labs_Flux_1_Schnell {
1612 inputs: Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Input;
1613 postProcessedOutputs: Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Output;
1614}
1615export type Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Input =
1616 | Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Prompt
1617 | Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Messages;
1618export interface Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Prompt {
1619 /**
1620 * The input text prompt for the model to generate a response.
1621 */
1622 prompt: string;
1623 image?: number[] | (string & NonNullable<unknown>);
1624 /**
1625 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
1626 */
1627 raw?: boolean;
1628 /**
1629 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
1630 */
1631 stream?: boolean;
1632 /**
1633 * The maximum number of tokens to generate in the response.
1634 */
1635 max_tokens?: number;
1636 /**
1637 * Controls the randomness of the output; higher values produce more random results.
1638 */
1639 temperature?: number;
1640 /**
1641 * 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.
1642 */
1643 top_p?: number;
1644 /**
1645 * 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.
1646 */
1647 top_k?: number;
1648 /**
1649 * Random seed for reproducibility of the generation.
1650 */
1651 seed?: number;
1652 /**
1653 * Penalty for repeated tokens; higher values discourage repetition.
1654 */
1655 repetition_penalty?: number;
1656 /**
1657 * Decreases the likelihood of the model repeating the same lines verbatim.
1658 */
1659 frequency_penalty?: number;
1660 /**
1661 * Increases the likelihood of the model introducing new topics.
1662 */
1663 presence_penalty?: number;
1664 /**
1665 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
1666 */
1667 lora?: string;
1668}
1669export interface Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Messages {
1670 /**
1671 * An array of message objects representing the conversation history.
1672 */
1673 messages: {
1674 /**
1675 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
1676 */
1677 role?: string;
1678 /**
1679 * The tool call id. If you don't know what to put here you can fall back to 000000001
1680 */
1681 tool_call_id?: string;
1682 content?:
1683 | string
1684 | {
1685 /**
1686 * Type of the content provided
1687 */
1688 type?: string;
1689 text?: string;
1690 image_url?: {
1691 /**
1692 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
1693 */
1694 url?: string;
1695 };
1696 }[]
1697 | {
1698 /**
1699 * Type of the content provided
1700 */
1701 type?: string;
1702 text?: string;
1703 image_url?: {
1704 /**
1705 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
1706 */
1707 url?: string;
1708 };
1709 };
1710 }[];
1711 image?: number[] | (string & NonNullable<unknown>);
1712 functions?: {
1713 name: string;
1714 code: string;
1715 }[];
1716 /**
1717 * A list of tools available for the assistant to use.
1718 */
1719 tools?: (
1720 | {
1721 /**
1722 * The name of the tool. More descriptive the better.
1723 */
1724 name: string;
1725 /**
1726 * A brief description of what the tool does.
1727 */
1728 description: string;
1729 /**
1730 * Schema defining the parameters accepted by the tool.
1731 */
1732 parameters: {
1733 /**
1734 * The type of the parameters object (usually 'object').
1735 */
1736 type: string;
1737 /**
1738 * List of required parameter names.
1739 */
1740 required?: string[];
1741 /**
1742 * Definitions of each parameter.
1743 */
1744 properties: {
1745 [k: string]: {
1746 /**
1747 * The data type of the parameter.
1748 */
1749 type: string;
1750 /**
1751 * A description of the expected parameter.
1752 */
1753 description: string;
1754 };
1755 };
1756 };
1757 }
1758 | {
1759 /**
1760 * Specifies the type of tool (e.g., 'function').
1761 */
1762 type: string;
1763 /**
1764 * Details of the function tool.
1765 */
1766 function: {
1767 /**
1768 * The name of the function.
1769 */
1770 name: string;
1771 /**
1772 * A brief description of what the function does.
1773 */
1774 description: string;
1775 /**
1776 * Schema defining the parameters accepted by the function.
1777 */
1778 parameters: {
1779 /**
1780 * The type of the parameters object (usually 'object').
1781 */
1782 type: string;
1783 /**
1784 * List of required parameter names.
1785 */
1786 required?: string[];
1787 /**
1788 * Definitions of each parameter.
1789 */
1790 properties: {
1791 [k: string]: {
1792 /**
1793 * The data type of the parameter.
1794 */
1795 type: string;
1796 /**
1797 * A description of the expected parameter.
1798 */
1799 description: string;
1800 };
1801 };
1802 };
1803 };
1804 }
1805 )[];
1806 /**
1807 * If true, the response will be streamed back incrementally.
1808 */
1809 stream?: boolean;
1810 /**
1811 * The maximum number of tokens to generate in the response.
1812 */
1813 max_tokens?: number;
1814 /**
1815 * Controls the randomness of the output; higher values produce more random results.
1816 */
1817 temperature?: number;
1818 /**
1819 * Controls the creativity of the AI's responses by adjusting how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
1820 */
1821 top_p?: number;
1822 /**
1823 * 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.
1824 */
1825 top_k?: number;
1826 /**
1827 * Random seed for reproducibility of the generation.
1828 */
1829 seed?: number;
1830 /**
1831 * Penalty for repeated tokens; higher values discourage repetition.
1832 */
1833 repetition_penalty?: number;
1834 /**
1835 * Decreases the likelihood of the model repeating the same lines verbatim.
1836 */
1837 frequency_penalty?: number;
1838 /**
1839 * Increases the likelihood of the model introducing new topics.
1840 */
1841 presence_penalty?: number;
1842}
1843export type Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Output = {
1844 /**
1845 * The generated text response from the model
1846 */
1847 response?: string;
1848 /**
1849 * An array of tool calls requests made during the response generation
1850 */
1851 tool_calls?: {
1852 /**
1853 * The arguments passed to be passed to the tool call request
1854 */
1855 arguments?: object;
1856 /**
1857 * The name of the tool to be called
1858 */
1859 name?: string;
1860 }[];
1861};
1862export declare abstract class Base_Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct {
1863 inputs: Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Input;
1864 postProcessedOutputs: Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Output;
1865}
1866export type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input =
1867 | Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Prompt
1868 | Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Messages
1869 | Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Async_Batch;
1870export interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Prompt {
1871 /**
1872 * The input text prompt for the model to generate a response.
1873 */
1874 prompt: string;
1875 /**
1876 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
1877 */
1878 lora?: string;
1879 response_format?: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode;
1880 /**
1881 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
1882 */
1883 raw?: boolean;
1884 /**
1885 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
1886 */
1887 stream?: boolean;
1888 /**
1889 * The maximum number of tokens to generate in the response.
1890 */
1891 max_tokens?: number;
1892 /**
1893 * Controls the randomness of the output; higher values produce more random results.
1894 */
1895 temperature?: number;
1896 /**
1897 * 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.
1898 */
1899 top_p?: number;
1900 /**
1901 * 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.
1902 */
1903 top_k?: number;
1904 /**
1905 * Random seed for reproducibility of the generation.
1906 */
1907 seed?: number;
1908 /**
1909 * Penalty for repeated tokens; higher values discourage repetition.
1910 */
1911 repetition_penalty?: number;
1912 /**
1913 * Decreases the likelihood of the model repeating the same lines verbatim.
1914 */
1915 frequency_penalty?: number;
1916 /**
1917 * Increases the likelihood of the model introducing new topics.
1918 */
1919 presence_penalty?: number;
1920}
1921export interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode {
1922 type?: "json_object" | "json_schema";
1923 json_schema?: unknown;
1924}
1925export interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Messages {
1926 /**
1927 * An array of message objects representing the conversation history.
1928 */
1929 messages: {
1930 /**
1931 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
1932 */
1933 role: string;
1934 content:
1935 | string
1936 | {
1937 /**
1938 * Type of the content (text)
1939 */
1940 type?: string;
1941 /**
1942 * Text content
1943 */
1944 text?: string;
1945 }[];
1946 }[];
1947 functions?: {
1948 name: string;
1949 code: string;
1950 }[];
1951 /**
1952 * A list of tools available for the assistant to use.
1953 */
1954 tools?: (
1955 | {
1956 /**
1957 * The name of the tool. More descriptive the better.
1958 */
1959 name: string;
1960 /**
1961 * A brief description of what the tool does.
1962 */
1963 description: string;
1964 /**
1965 * Schema defining the parameters accepted by the tool.
1966 */
1967 parameters: {
1968 /**
1969 * The type of the parameters object (usually 'object').
1970 */
1971 type: string;
1972 /**
1973 * List of required parameter names.
1974 */
1975 required?: string[];
1976 /**
1977 * Definitions of each parameter.
1978 */
1979 properties: {
1980 [k: string]: {
1981 /**
1982 * The data type of the parameter.
1983 */
1984 type: string;
1985 /**
1986 * A description of the expected parameter.
1987 */
1988 description: string;
1989 };
1990 };
1991 };
1992 }
1993 | {
1994 /**
1995 * Specifies the type of tool (e.g., 'function').
1996 */
1997 type: string;
1998 /**
1999 * Details of the function tool.
2000 */
2001 function: {
2002 /**
2003 * The name of the function.
2004 */
2005 name: string;
2006 /**
2007 * A brief description of what the function does.
2008 */
2009 description: string;
2010 /**
2011 * Schema defining the parameters accepted by the function.
2012 */
2013 parameters: {
2014 /**
2015 * The type of the parameters object (usually 'object').
2016 */
2017 type: string;
2018 /**
2019 * List of required parameter names.
2020 */
2021 required?: string[];
2022 /**
2023 * Definitions of each parameter.
2024 */
2025 properties: {
2026 [k: string]: {
2027 /**
2028 * The data type of the parameter.
2029 */
2030 type: string;
2031 /**
2032 * A description of the expected parameter.
2033 */
2034 description: string;
2035 };
2036 };
2037 };
2038 };
2039 }
2040 )[];
2041 response_format?: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_1;
2042 /**
2043 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
2044 */
2045 raw?: boolean;
2046 /**
2047 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
2048 */
2049 stream?: boolean;
2050 /**
2051 * The maximum number of tokens to generate in the response.
2052 */
2053 max_tokens?: number;
2054 /**
2055 * Controls the randomness of the output; higher values produce more random results.
2056 */
2057 temperature?: number;
2058 /**
2059 * 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.
2060 */
2061 top_p?: number;
2062 /**
2063 * 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.
2064 */
2065 top_k?: number;
2066 /**
2067 * Random seed for reproducibility of the generation.
2068 */
2069 seed?: number;
2070 /**
2071 * Penalty for repeated tokens; higher values discourage repetition.
2072 */
2073 repetition_penalty?: number;
2074 /**
2075 * Decreases the likelihood of the model repeating the same lines verbatim.
2076 */
2077 frequency_penalty?: number;
2078 /**
2079 * Increases the likelihood of the model introducing new topics.
2080 */
2081 presence_penalty?: number;
2082}
2083export interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_1 {
2084 type?: "json_object" | "json_schema";
2085 json_schema?: unknown;
2086}
2087export interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Async_Batch {
2088 requests?: {
2089 /**
2090 * User-supplied reference. This field will be present in the response as well it can be used to reference the request and response. It's NOT validated to be unique.
2091 */
2092 external_reference?: string;
2093 /**
2094 * Prompt for the text generation model
2095 */
2096 prompt?: string;
2097 /**
2098 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
2099 */
2100 stream?: boolean;
2101 /**
2102 * The maximum number of tokens to generate in the response.
2103 */
2104 max_tokens?: number;
2105 /**
2106 * Controls the randomness of the output; higher values produce more random results.
2107 */
2108 temperature?: number;
2109 /**
2110 * 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.
2111 */
2112 top_p?: number;
2113 /**
2114 * Random seed for reproducibility of the generation.
2115 */
2116 seed?: number;
2117 /**
2118 * Penalty for repeated tokens; higher values discourage repetition.
2119 */
2120 repetition_penalty?: number;
2121 /**
2122 * Decreases the likelihood of the model repeating the same lines verbatim.
2123 */
2124 frequency_penalty?: number;
2125 /**
2126 * Increases the likelihood of the model introducing new topics.
2127 */
2128 presence_penalty?: number;
2129 response_format?: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_2;
2130 }[];
2131}
2132export interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_2 {
2133 type?: "json_object" | "json_schema";
2134 json_schema?: unknown;
2135}
2136export type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output =
2137 | {
2138 /**
2139 * The generated text response from the model
2140 */
2141 response: string;
2142 /**
2143 * Usage statistics for the inference request
2144 */
2145 usage?: {
2146 /**
2147 * Total number of tokens in input
2148 */
2149 prompt_tokens?: number;
2150 /**
2151 * Total number of tokens in output
2152 */
2153 completion_tokens?: number;
2154 /**
2155 * Total number of input and output tokens
2156 */
2157 total_tokens?: number;
2158 };
2159 /**
2160 * An array of tool calls requests made during the response generation
2161 */
2162 tool_calls?: {
2163 /**
2164 * The arguments passed to be passed to the tool call request
2165 */
2166 arguments?: object;
2167 /**
2168 * The name of the tool to be called
2169 */
2170 name?: string;
2171 }[];
2172 }
2173 | string
2174 | Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_AsyncResponse;
2175export interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_AsyncResponse {
2176 /**
2177 * The async request id that can be used to obtain the results.
2178 */
2179 request_id?: string;
2180}
2181export declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast {
2182 inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input;
2183 postProcessedOutputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output;
2184}
2185export interface Ai_Cf_Meta_Llama_Guard_3_8B_Input {
2186 /**
2187 * An array of message objects representing the conversation history.
2188 */
2189 messages: {
2190 /**
2191 * The role of the message sender must alternate between 'user' and 'assistant'.
2192 */
2193 role: "user" | "assistant";
2194 /**
2195 * The content of the message as a string.
2196 */
2197 content: string;
2198 }[];
2199 /**
2200 * The maximum number of tokens to generate in the response.
2201 */
2202 max_tokens?: number;
2203 /**
2204 * Controls the randomness of the output; higher values produce more random results.
2205 */
2206 temperature?: number;
2207 /**
2208 * Dictate the output format of the generated response.
2209 */
2210 response_format?: {
2211 /**
2212 * Set to json_object to process and output generated text as JSON.
2213 */
2214 type?: string;
2215 };
2216}
2217export interface Ai_Cf_Meta_Llama_Guard_3_8B_Output {
2218 response?:
2219 | string
2220 | {
2221 /**
2222 * Whether the conversation is safe or not.
2223 */
2224 safe?: boolean;
2225 /**
2226 * A list of what hazard categories predicted for the conversation, if the conversation is deemed unsafe.
2227 */
2228 categories?: string[];
2229 };
2230 /**
2231 * Usage statistics for the inference request
2232 */
2233 usage?: {
2234 /**
2235 * Total number of tokens in input
2236 */
2237 prompt_tokens?: number;
2238 /**
2239 * Total number of tokens in output
2240 */
2241 completion_tokens?: number;
2242 /**
2243 * Total number of input and output tokens
2244 */
2245 total_tokens?: number;
2246 };
2247}
2248export declare abstract class Base_Ai_Cf_Meta_Llama_Guard_3_8B {
2249 inputs: Ai_Cf_Meta_Llama_Guard_3_8B_Input;
2250 postProcessedOutputs: Ai_Cf_Meta_Llama_Guard_3_8B_Output;
2251}
2252export interface Ai_Cf_Baai_Bge_Reranker_Base_Input {
2253 /**
2254 * A query you wish to perform against the provided contexts.
2255 */
2256 /**
2257 * Number of returned results starting with the best score.
2258 */
2259 top_k?: number;
2260 /**
2261 * List of provided contexts. Note that the index in this array is important, as the response will refer to it.
2262 */
2263 contexts: {
2264 /**
2265 * One of the provided context content
2266 */
2267 text?: string;
2268 }[];
2269}
2270export interface Ai_Cf_Baai_Bge_Reranker_Base_Output {
2271 response?: {
2272 /**
2273 * Index of the context in the request
2274 */
2275 id?: number;
2276 /**
2277 * Score of the context under the index.
2278 */
2279 score?: number;
2280 }[];
2281}
2282export declare abstract class Base_Ai_Cf_Baai_Bge_Reranker_Base {
2283 inputs: Ai_Cf_Baai_Bge_Reranker_Base_Input;
2284 postProcessedOutputs: Ai_Cf_Baai_Bge_Reranker_Base_Output;
2285}
2286export type Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Input =
2287 | Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Prompt
2288 | Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Messages;
2289export interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Prompt {
2290 /**
2291 * The input text prompt for the model to generate a response.
2292 */
2293 prompt: string;
2294 /**
2295 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
2296 */
2297 lora?: string;
2298 response_format?: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode;
2299 /**
2300 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
2301 */
2302 raw?: boolean;
2303 /**
2304 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
2305 */
2306 stream?: boolean;
2307 /**
2308 * The maximum number of tokens to generate in the response.
2309 */
2310 max_tokens?: number;
2311 /**
2312 * Controls the randomness of the output; higher values produce more random results.
2313 */
2314 temperature?: number;
2315 /**
2316 * 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.
2317 */
2318 top_p?: number;
2319 /**
2320 * 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.
2321 */
2322 top_k?: number;
2323 /**
2324 * Random seed for reproducibility of the generation.
2325 */
2326 seed?: number;
2327 /**
2328 * Penalty for repeated tokens; higher values discourage repetition.
2329 */
2330 repetition_penalty?: number;
2331 /**
2332 * Decreases the likelihood of the model repeating the same lines verbatim.
2333 */
2334 frequency_penalty?: number;
2335 /**
2336 * Increases the likelihood of the model introducing new topics.
2337 */
2338 presence_penalty?: number;
2339}
2340export interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode {
2341 type?: "json_object" | "json_schema";
2342 json_schema?: unknown;
2343}
2344export interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Messages {
2345 /**
2346 * An array of message objects representing the conversation history.
2347 */
2348 messages: {
2349 /**
2350 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
2351 */
2352 role: string;
2353 /**
2354 * The content of the message as a string.
2355 */
2356 content: string;
2357 }[];
2358 functions?: {
2359 name: string;
2360 code: string;
2361 }[];
2362 /**
2363 * A list of tools available for the assistant to use.
2364 */
2365 tools?: (
2366 | {
2367 /**
2368 * The name of the tool. More descriptive the better.
2369 */
2370 name: string;
2371 /**
2372 * A brief description of what the tool does.
2373 */
2374 description: string;
2375 /**
2376 * Schema defining the parameters accepted by the tool.
2377 */
2378 parameters: {
2379 /**
2380 * The type of the parameters object (usually 'object').
2381 */
2382 type: string;
2383 /**
2384 * List of required parameter names.
2385 */
2386 required?: string[];
2387 /**
2388 * Definitions of each parameter.
2389 */
2390 properties: {
2391 [k: string]: {
2392 /**
2393 * The data type of the parameter.
2394 */
2395 type: string;
2396 /**
2397 * A description of the expected parameter.
2398 */
2399 description: string;
2400 };
2401 };
2402 };
2403 }
2404 | {
2405 /**
2406 * Specifies the type of tool (e.g., 'function').
2407 */
2408 type: string;
2409 /**
2410 * Details of the function tool.
2411 */
2412 function: {
2413 /**
2414 * The name of the function.
2415 */
2416 name: string;
2417 /**
2418 * A brief description of what the function does.
2419 */
2420 description: string;
2421 /**
2422 * Schema defining the parameters accepted by the function.
2423 */
2424 parameters: {
2425 /**
2426 * The type of the parameters object (usually 'object').
2427 */
2428 type: string;
2429 /**
2430 * List of required parameter names.
2431 */
2432 required?: string[];
2433 /**
2434 * Definitions of each parameter.
2435 */
2436 properties: {
2437 [k: string]: {
2438 /**
2439 * The data type of the parameter.
2440 */
2441 type: string;
2442 /**
2443 * A description of the expected parameter.
2444 */
2445 description: string;
2446 };
2447 };
2448 };
2449 };
2450 }
2451 )[];
2452 response_format?: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode_1;
2453 /**
2454 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
2455 */
2456 raw?: boolean;
2457 /**
2458 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
2459 */
2460 stream?: boolean;
2461 /**
2462 * The maximum number of tokens to generate in the response.
2463 */
2464 max_tokens?: number;
2465 /**
2466 * Controls the randomness of the output; higher values produce more random results.
2467 */
2468 temperature?: number;
2469 /**
2470 * 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.
2471 */
2472 top_p?: number;
2473 /**
2474 * 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.
2475 */
2476 top_k?: number;
2477 /**
2478 * Random seed for reproducibility of the generation.
2479 */
2480 seed?: number;
2481 /**
2482 * Penalty for repeated tokens; higher values discourage repetition.
2483 */
2484 repetition_penalty?: number;
2485 /**
2486 * Decreases the likelihood of the model repeating the same lines verbatim.
2487 */
2488 frequency_penalty?: number;
2489 /**
2490 * Increases the likelihood of the model introducing new topics.
2491 */
2492 presence_penalty?: number;
2493}
2494export interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode_1 {
2495 type?: "json_object" | "json_schema";
2496 json_schema?: unknown;
2497}
2498export type Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Output = {
2499 /**
2500 * The generated text response from the model
2501 */
2502 response: string;
2503 /**
2504 * Usage statistics for the inference request
2505 */
2506 usage?: {
2507 /**
2508 * Total number of tokens in input
2509 */
2510 prompt_tokens?: number;
2511 /**
2512 * Total number of tokens in output
2513 */
2514 completion_tokens?: number;
2515 /**
2516 * Total number of input and output tokens
2517 */
2518 total_tokens?: number;
2519 };
2520 /**
2521 * An array of tool calls requests made during the response generation
2522 */
2523 tool_calls?: {
2524 /**
2525 * The arguments passed to be passed to the tool call request
2526 */
2527 arguments?: object;
2528 /**
2529 * The name of the tool to be called
2530 */
2531 name?: string;
2532 }[];
2533};
2534export declare abstract class Base_Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct {
2535 inputs: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Input;
2536 postProcessedOutputs: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Output;
2537}
2538export type Ai_Cf_Qwen_Qwq_32B_Input = Ai_Cf_Qwen_Qwq_32B_Prompt | Ai_Cf_Qwen_Qwq_32B_Messages;
2539export interface Ai_Cf_Qwen_Qwq_32B_Prompt {
2540 /**
2541 * The input text prompt for the model to generate a response.
2542 */
2543 prompt: string;
2544 /**
2545 * JSON schema that should be fulfilled for the response.
2546 */
2547 guided_json?: object;
2548 /**
2549 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
2550 */
2551 raw?: boolean;
2552 /**
2553 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
2554 */
2555 stream?: boolean;
2556 /**
2557 * The maximum number of tokens to generate in the response.
2558 */
2559 max_tokens?: number;
2560 /**
2561 * Controls the randomness of the output; higher values produce more random results.
2562 */
2563 temperature?: number;
2564 /**
2565 * 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.
2566 */
2567 top_p?: number;
2568 /**
2569 * 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.
2570 */
2571 top_k?: number;
2572 /**
2573 * Random seed for reproducibility of the generation.
2574 */
2575 seed?: number;
2576 /**
2577 * Penalty for repeated tokens; higher values discourage repetition.
2578 */
2579 repetition_penalty?: number;
2580 /**
2581 * Decreases the likelihood of the model repeating the same lines verbatim.
2582 */
2583 frequency_penalty?: number;
2584 /**
2585 * Increases the likelihood of the model introducing new topics.
2586 */
2587 presence_penalty?: number;
2588}
2589export interface Ai_Cf_Qwen_Qwq_32B_Messages {
2590 /**
2591 * An array of message objects representing the conversation history.
2592 */
2593 messages: {
2594 /**
2595 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
2596 */
2597 role?: string;
2598 /**
2599 * The tool call id. If you don't know what to put here you can fall back to 000000001
2600 */
2601 tool_call_id?: string;
2602 content?:
2603 | string
2604 | {
2605 /**
2606 * Type of the content provided
2607 */
2608 type?: string;
2609 text?: string;
2610 image_url?: {
2611 /**
2612 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
2613 */
2614 url?: string;
2615 };
2616 }[]
2617 | {
2618 /**
2619 * Type of the content provided
2620 */
2621 type?: string;
2622 text?: string;
2623 image_url?: {
2624 /**
2625 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
2626 */
2627 url?: string;
2628 };
2629 };
2630 }[];
2631 functions?: {
2632 name: string;
2633 code: string;
2634 }[];
2635 /**
2636 * A list of tools available for the assistant to use.
2637 */
2638 tools?: (
2639 | {
2640 /**
2641 * The name of the tool. More descriptive the better.
2642 */
2643 name: string;
2644 /**
2645 * A brief description of what the tool does.
2646 */
2647 description: string;
2648 /**
2649 * Schema defining the parameters accepted by the tool.
2650 */
2651 parameters: {
2652 /**
2653 * The type of the parameters object (usually 'object').
2654 */
2655 type: string;
2656 /**
2657 * List of required parameter names.
2658 */
2659 required?: string[];
2660 /**
2661 * Definitions of each parameter.
2662 */
2663 properties: {
2664 [k: string]: {
2665 /**
2666 * The data type of the parameter.
2667 */
2668 type: string;
2669 /**
2670 * A description of the expected parameter.
2671 */
2672 description: string;
2673 };
2674 };
2675 };
2676 }
2677 | {
2678 /**
2679 * Specifies the type of tool (e.g., 'function').
2680 */
2681 type: string;
2682 /**
2683 * Details of the function tool.
2684 */
2685 function: {
2686 /**
2687 * The name of the function.
2688 */
2689 name: string;
2690 /**
2691 * A brief description of what the function does.
2692 */
2693 description: string;
2694 /**
2695 * Schema defining the parameters accepted by the function.
2696 */
2697 parameters: {
2698 /**
2699 * The type of the parameters object (usually 'object').
2700 */
2701 type: string;
2702 /**
2703 * List of required parameter names.
2704 */
2705 required?: string[];
2706 /**
2707 * Definitions of each parameter.
2708 */
2709 properties: {
2710 [k: string]: {
2711 /**
2712 * The data type of the parameter.
2713 */
2714 type: string;
2715 /**
2716 * A description of the expected parameter.
2717 */
2718 description: string;
2719 };
2720 };
2721 };
2722 };
2723 }
2724 )[];
2725 /**
2726 * JSON schema that should be fufilled for the response.
2727 */
2728 guided_json?: object;
2729 /**
2730 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
2731 */
2732 raw?: boolean;
2733 /**
2734 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
2735 */
2736 stream?: boolean;
2737 /**
2738 * The maximum number of tokens to generate in the response.
2739 */
2740 max_tokens?: number;
2741 /**
2742 * Controls the randomness of the output; higher values produce more random results.
2743 */
2744 temperature?: number;
2745 /**
2746 * 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.
2747 */
2748 top_p?: number;
2749 /**
2750 * 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.
2751 */
2752 top_k?: number;
2753 /**
2754 * Random seed for reproducibility of the generation.
2755 */
2756 seed?: number;
2757 /**
2758 * Penalty for repeated tokens; higher values discourage repetition.
2759 */
2760 repetition_penalty?: number;
2761 /**
2762 * Decreases the likelihood of the model repeating the same lines verbatim.
2763 */
2764 frequency_penalty?: number;
2765 /**
2766 * Increases the likelihood of the model introducing new topics.
2767 */
2768 presence_penalty?: number;
2769}
2770export type Ai_Cf_Qwen_Qwq_32B_Output = {
2771 /**
2772 * The generated text response from the model
2773 */
2774 response: string;
2775 /**
2776 * Usage statistics for the inference request
2777 */
2778 usage?: {
2779 /**
2780 * Total number of tokens in input
2781 */
2782 prompt_tokens?: number;
2783 /**
2784 * Total number of tokens in output
2785 */
2786 completion_tokens?: number;
2787 /**
2788 * Total number of input and output tokens
2789 */
2790 total_tokens?: number;
2791 };
2792 /**
2793 * An array of tool calls requests made during the response generation
2794 */
2795 tool_calls?: {
2796 /**
2797 * The arguments passed to be passed to the tool call request
2798 */
2799 arguments?: object;
2800 /**
2801 * The name of the tool to be called
2802 */
2803 name?: string;
2804 }[];
2805};
2806export declare abstract class Base_Ai_Cf_Qwen_Qwq_32B {
2807 inputs: Ai_Cf_Qwen_Qwq_32B_Input;
2808 postProcessedOutputs: Ai_Cf_Qwen_Qwq_32B_Output;
2809}
2810export type Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Input =
2811 | Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Prompt
2812 | Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Messages;
2813export interface Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Prompt {
2814 /**
2815 * The input text prompt for the model to generate a response.
2816 */
2817 prompt: string;
2818 /**
2819 * JSON schema that should be fulfilled for the response.
2820 */
2821 guided_json?: object;
2822 /**
2823 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
2824 */
2825 raw?: boolean;
2826 /**
2827 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
2828 */
2829 stream?: boolean;
2830 /**
2831 * The maximum number of tokens to generate in the response.
2832 */
2833 max_tokens?: number;
2834 /**
2835 * Controls the randomness of the output; higher values produce more random results.
2836 */
2837 temperature?: number;
2838 /**
2839 * 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.
2840 */
2841 top_p?: number;
2842 /**
2843 * 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.
2844 */
2845 top_k?: number;
2846 /**
2847 * Random seed for reproducibility of the generation.
2848 */
2849 seed?: number;
2850 /**
2851 * Penalty for repeated tokens; higher values discourage repetition.
2852 */
2853 repetition_penalty?: number;
2854 /**
2855 * Decreases the likelihood of the model repeating the same lines verbatim.
2856 */
2857 frequency_penalty?: number;
2858 /**
2859 * Increases the likelihood of the model introducing new topics.
2860 */
2861 presence_penalty?: number;
2862}
2863export interface Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Messages {
2864 /**
2865 * An array of message objects representing the conversation history.
2866 */
2867 messages: {
2868 /**
2869 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
2870 */
2871 role?: string;
2872 /**
2873 * The tool call id. Must be supplied for tool calls for Mistral-3. If you don't know what to put here you can fall back to 000000001
2874 */
2875 tool_call_id?: string;
2876 content?:
2877 | string
2878 | {
2879 /**
2880 * Type of the content provided
2881 */
2882 type?: string;
2883 text?: string;
2884 image_url?: {
2885 /**
2886 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
2887 */
2888 url?: string;
2889 };
2890 }[]
2891 | {
2892 /**
2893 * Type of the content provided
2894 */
2895 type?: string;
2896 text?: string;
2897 image_url?: {
2898 /**
2899 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
2900 */
2901 url?: string;
2902 };
2903 };
2904 }[];
2905 functions?: {
2906 name: string;
2907 code: string;
2908 }[];
2909 /**
2910 * A list of tools available for the assistant to use.
2911 */
2912 tools?: (
2913 | {
2914 /**
2915 * The name of the tool. More descriptive the better.
2916 */
2917 name: string;
2918 /**
2919 * A brief description of what the tool does.
2920 */
2921 description: string;
2922 /**
2923 * Schema defining the parameters accepted by the tool.
2924 */
2925 parameters: {
2926 /**
2927 * The type of the parameters object (usually 'object').
2928 */
2929 type: string;
2930 /**
2931 * List of required parameter names.
2932 */
2933 required?: string[];
2934 /**
2935 * Definitions of each parameter.
2936 */
2937 properties: {
2938 [k: string]: {
2939 /**
2940 * The data type of the parameter.
2941 */
2942 type: string;
2943 /**
2944 * A description of the expected parameter.
2945 */
2946 description: string;
2947 };
2948 };
2949 };
2950 }
2951 | {
2952 /**
2953 * Specifies the type of tool (e.g., 'function').
2954 */
2955 type: string;
2956 /**
2957 * Details of the function tool.
2958 */
2959 function: {
2960 /**
2961 * The name of the function.
2962 */
2963 name: string;
2964 /**
2965 * A brief description of what the function does.
2966 */
2967 description: string;
2968 /**
2969 * Schema defining the parameters accepted by the function.
2970 */
2971 parameters: {
2972 /**
2973 * The type of the parameters object (usually 'object').
2974 */
2975 type: string;
2976 /**
2977 * List of required parameter names.
2978 */
2979 required?: string[];
2980 /**
2981 * Definitions of each parameter.
2982 */
2983 properties: {
2984 [k: string]: {
2985 /**
2986 * The data type of the parameter.
2987 */
2988 type: string;
2989 /**
2990 * A description of the expected parameter.
2991 */
2992 description: string;
2993 };
2994 };
2995 };
2996 };
2997 }
2998 )[];
2999 /**
3000 * JSON schema that should be fufilled for the response.
3001 */
3002 guided_json?: object;
3003 /**
3004 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
3005 */
3006 raw?: boolean;
3007 /**
3008 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
3009 */
3010 stream?: boolean;
3011 /**
3012 * The maximum number of tokens to generate in the response.
3013 */
3014 max_tokens?: number;
3015 /**
3016 * Controls the randomness of the output; higher values produce more random results.
3017 */
3018 temperature?: number;
3019 /**
3020 * 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.
3021 */
3022 top_p?: number;
3023 /**
3024 * 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.
3025 */
3026 top_k?: number;
3027 /**
3028 * Random seed for reproducibility of the generation.
3029 */
3030 seed?: number;
3031 /**
3032 * Penalty for repeated tokens; higher values discourage repetition.
3033 */
3034 repetition_penalty?: number;
3035 /**
3036 * Decreases the likelihood of the model repeating the same lines verbatim.
3037 */
3038 frequency_penalty?: number;
3039 /**
3040 * Increases the likelihood of the model introducing new topics.
3041 */
3042 presence_penalty?: number;
3043}
3044export type Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Output = {
3045 /**
3046 * The generated text response from the model
3047 */
3048 response: string;
3049 /**
3050 * Usage statistics for the inference request
3051 */
3052 usage?: {
3053 /**
3054 * Total number of tokens in input
3055 */
3056 prompt_tokens?: number;
3057 /**
3058 * Total number of tokens in output
3059 */
3060 completion_tokens?: number;
3061 /**
3062 * Total number of input and output tokens
3063 */
3064 total_tokens?: number;
3065 };
3066 /**
3067 * An array of tool calls requests made during the response generation
3068 */
3069 tool_calls?: {
3070 /**
3071 * The arguments passed to be passed to the tool call request
3072 */
3073 arguments?: object;
3074 /**
3075 * The name of the tool to be called
3076 */
3077 name?: string;
3078 }[];
3079};
3080export declare abstract class Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct {
3081 inputs: Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Input;
3082 postProcessedOutputs: Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Output;
3083}
3084export type Ai_Cf_Google_Gemma_3_12B_It_Input =
3085 | Ai_Cf_Google_Gemma_3_12B_It_Prompt
3086 | Ai_Cf_Google_Gemma_3_12B_It_Messages;
3087export interface Ai_Cf_Google_Gemma_3_12B_It_Prompt {
3088 /**
3089 * The input text prompt for the model to generate a response.
3090 */
3091 prompt: string;
3092 /**
3093 * JSON schema that should be fufilled for the response.
3094 */
3095 guided_json?: object;
3096 /**
3097 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
3098 */
3099 raw?: boolean;
3100 /**
3101 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
3102 */
3103 stream?: boolean;
3104 /**
3105 * The maximum number of tokens to generate in the response.
3106 */
3107 max_tokens?: number;
3108 /**
3109 * Controls the randomness of the output; higher values produce more random results.
3110 */
3111 temperature?: number;
3112 /**
3113 * 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.
3114 */
3115 top_p?: number;
3116 /**
3117 * 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.
3118 */
3119 top_k?: number;
3120 /**
3121 * Random seed for reproducibility of the generation.
3122 */
3123 seed?: number;
3124 /**
3125 * Penalty for repeated tokens; higher values discourage repetition.
3126 */
3127 repetition_penalty?: number;
3128 /**
3129 * Decreases the likelihood of the model repeating the same lines verbatim.
3130 */
3131 frequency_penalty?: number;
3132 /**
3133 * Increases the likelihood of the model introducing new topics.
3134 */
3135 presence_penalty?: number;
3136}
3137export interface Ai_Cf_Google_Gemma_3_12B_It_Messages {
3138 /**
3139 * An array of message objects representing the conversation history.
3140 */
3141 messages: {
3142 /**
3143 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
3144 */
3145 role?: string;
3146 content?:
3147 | string
3148 | {
3149 /**
3150 * Type of the content provided
3151 */
3152 type?: string;
3153 text?: string;
3154 image_url?: {
3155 /**
3156 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
3157 */
3158 url?: string;
3159 };
3160 }[];
3161 }[];
3162 functions?: {
3163 name: string;
3164 code: string;
3165 }[];
3166 /**
3167 * A list of tools available for the assistant to use.
3168 */
3169 tools?: (
3170 | {
3171 /**
3172 * The name of the tool. More descriptive the better.
3173 */
3174 name: string;
3175 /**
3176 * A brief description of what the tool does.
3177 */
3178 description: string;
3179 /**
3180 * Schema defining the parameters accepted by the tool.
3181 */
3182 parameters: {
3183 /**
3184 * The type of the parameters object (usually 'object').
3185 */
3186 type: string;
3187 /**
3188 * List of required parameter names.
3189 */
3190 required?: string[];
3191 /**
3192 * Definitions of each parameter.
3193 */
3194 properties: {
3195 [k: string]: {
3196 /**
3197 * The data type of the parameter.
3198 */
3199 type: string;
3200 /**
3201 * A description of the expected parameter.
3202 */
3203 description: string;
3204 };
3205 };
3206 };
3207 }
3208 | {
3209 /**
3210 * Specifies the type of tool (e.g., 'function').
3211 */
3212 type: string;
3213 /**
3214 * Details of the function tool.
3215 */
3216 function: {
3217 /**
3218 * The name of the function.
3219 */
3220 name: string;
3221 /**
3222 * A brief description of what the function does.
3223 */
3224 description: string;
3225 /**
3226 * Schema defining the parameters accepted by the function.
3227 */
3228 parameters: {
3229 /**
3230 * The type of the parameters object (usually 'object').
3231 */
3232 type: string;
3233 /**
3234 * List of required parameter names.
3235 */
3236 required?: string[];
3237 /**
3238 * Definitions of each parameter.
3239 */
3240 properties: {
3241 [k: string]: {
3242 /**
3243 * The data type of the parameter.
3244 */
3245 type: string;
3246 /**
3247 * A description of the expected parameter.
3248 */
3249 description: string;
3250 };
3251 };
3252 };
3253 };
3254 }
3255 )[];
3256 /**
3257 * JSON schema that should be fufilled for the response.
3258 */
3259 guided_json?: object;
3260 /**
3261 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
3262 */
3263 raw?: boolean;
3264 /**
3265 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
3266 */
3267 stream?: boolean;
3268 /**
3269 * The maximum number of tokens to generate in the response.
3270 */
3271 max_tokens?: number;
3272 /**
3273 * Controls the randomness of the output; higher values produce more random results.
3274 */
3275 temperature?: number;
3276 /**
3277 * 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.
3278 */
3279 top_p?: number;
3280 /**
3281 * 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.
3282 */
3283 top_k?: number;
3284 /**
3285 * Random seed for reproducibility of the generation.
3286 */
3287 seed?: number;
3288 /**
3289 * Penalty for repeated tokens; higher values discourage repetition.
3290 */
3291 repetition_penalty?: number;
3292 /**
3293 * Decreases the likelihood of the model repeating the same lines verbatim.
3294 */
3295 frequency_penalty?: number;
3296 /**
3297 * Increases the likelihood of the model introducing new topics.
3298 */
3299 presence_penalty?: number;
3300}
3301export type Ai_Cf_Google_Gemma_3_12B_It_Output = {
3302 /**
3303 * The generated text response from the model
3304 */
3305 response: string;
3306 /**
3307 * Usage statistics for the inference request
3308 */
3309 usage?: {
3310 /**
3311 * Total number of tokens in input
3312 */
3313 prompt_tokens?: number;
3314 /**
3315 * Total number of tokens in output
3316 */
3317 completion_tokens?: number;
3318 /**
3319 * Total number of input and output tokens
3320 */
3321 total_tokens?: number;
3322 };
3323 /**
3324 * An array of tool calls requests made during the response generation
3325 */
3326 tool_calls?: {
3327 /**
3328 * The arguments passed to be passed to the tool call request
3329 */
3330 arguments?: object;
3331 /**
3332 * The name of the tool to be called
3333 */
3334 name?: string;
3335 }[];
3336};
3337export declare abstract class Base_Ai_Cf_Google_Gemma_3_12B_It {
3338 inputs: Ai_Cf_Google_Gemma_3_12B_It_Input;
3339 postProcessedOutputs: Ai_Cf_Google_Gemma_3_12B_It_Output;
3340}
3341export type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input =
3342 | Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt
3343 | Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages
3344 | Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Async_Batch;
3345export interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt {
3346 /**
3347 * The input text prompt for the model to generate a response.
3348 */
3349 prompt: string;
3350 /**
3351 * JSON schema that should be fulfilled for the response.
3352 */
3353 guided_json?: object;
3354 response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode;
3355 /**
3356 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
3357 */
3358 raw?: boolean;
3359 /**
3360 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
3361 */
3362 stream?: boolean;
3363 /**
3364 * The maximum number of tokens to generate in the response.
3365 */
3366 max_tokens?: number;
3367 /**
3368 * Controls the randomness of the output; higher values produce more random results.
3369 */
3370 temperature?: number;
3371 /**
3372 * 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.
3373 */
3374 top_p?: number;
3375 /**
3376 * 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.
3377 */
3378 top_k?: number;
3379 /**
3380 * Random seed for reproducibility of the generation.
3381 */
3382 seed?: number;
3383 /**
3384 * Penalty for repeated tokens; higher values discourage repetition.
3385 */
3386 repetition_penalty?: number;
3387 /**
3388 * Decreases the likelihood of the model repeating the same lines verbatim.
3389 */
3390 frequency_penalty?: number;
3391 /**
3392 * Increases the likelihood of the model introducing new topics.
3393 */
3394 presence_penalty?: number;
3395}
3396export interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode {
3397 type?: "json_object" | "json_schema";
3398 json_schema?: unknown;
3399}
3400export interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages {
3401 /**
3402 * An array of message objects representing the conversation history.
3403 */
3404 messages: {
3405 /**
3406 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
3407 */
3408 role?: string;
3409 /**
3410 * The tool call id. If you don't know what to put here you can fall back to 000000001
3411 */
3412 tool_call_id?: string;
3413 content?:
3414 | string
3415 | {
3416 /**
3417 * Type of the content provided
3418 */
3419 type?: string;
3420 text?: string;
3421 image_url?: {
3422 /**
3423 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
3424 */
3425 url?: string;
3426 };
3427 }[]
3428 | {
3429 /**
3430 * Type of the content provided
3431 */
3432 type?: string;
3433 text?: string;
3434 image_url?: {
3435 /**
3436 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
3437 */
3438 url?: string;
3439 };
3440 };
3441 }[];
3442 functions?: {
3443 name: string;
3444 code: string;
3445 }[];
3446 /**
3447 * A list of tools available for the assistant to use.
3448 */
3449 tools?: (
3450 | {
3451 /**
3452 * The name of the tool. More descriptive the better.
3453 */
3454 name: string;
3455 /**
3456 * A brief description of what the tool does.
3457 */
3458 description: string;
3459 /**
3460 * Schema defining the parameters accepted by the tool.
3461 */
3462 parameters: {
3463 /**
3464 * The type of the parameters object (usually 'object').
3465 */
3466 type: string;
3467 /**
3468 * List of required parameter names.
3469 */
3470 required?: string[];
3471 /**
3472 * Definitions of each parameter.
3473 */
3474 properties: {
3475 [k: string]: {
3476 /**
3477 * The data type of the parameter.
3478 */
3479 type: string;
3480 /**
3481 * A description of the expected parameter.
3482 */
3483 description: string;
3484 };
3485 };
3486 };
3487 }
3488 | {
3489 /**
3490 * Specifies the type of tool (e.g., 'function').
3491 */
3492 type: string;
3493 /**
3494 * Details of the function tool.
3495 */
3496 function: {
3497 /**
3498 * The name of the function.
3499 */
3500 name: string;
3501 /**
3502 * A brief description of what the function does.
3503 */
3504 description: string;
3505 /**
3506 * Schema defining the parameters accepted by the function.
3507 */
3508 parameters: {
3509 /**
3510 * The type of the parameters object (usually 'object').
3511 */
3512 type: string;
3513 /**
3514 * List of required parameter names.
3515 */
3516 required?: string[];
3517 /**
3518 * Definitions of each parameter.
3519 */
3520 properties: {
3521 [k: string]: {
3522 /**
3523 * The data type of the parameter.
3524 */
3525 type: string;
3526 /**
3527 * A description of the expected parameter.
3528 */
3529 description: string;
3530 };
3531 };
3532 };
3533 };
3534 }
3535 )[];
3536 response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode;
3537 /**
3538 * JSON schema that should be fufilled for the response.
3539 */
3540 guided_json?: object;
3541 /**
3542 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
3543 */
3544 raw?: boolean;
3545 /**
3546 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
3547 */
3548 stream?: boolean;
3549 /**
3550 * The maximum number of tokens to generate in the response.
3551 */
3552 max_tokens?: number;
3553 /**
3554 * Controls the randomness of the output; higher values produce more random results.
3555 */
3556 temperature?: number;
3557 /**
3558 * 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.
3559 */
3560 top_p?: number;
3561 /**
3562 * 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.
3563 */
3564 top_k?: number;
3565 /**
3566 * Random seed for reproducibility of the generation.
3567 */
3568 seed?: number;
3569 /**
3570 * Penalty for repeated tokens; higher values discourage repetition.
3571 */
3572 repetition_penalty?: number;
3573 /**
3574 * Decreases the likelihood of the model repeating the same lines verbatim.
3575 */
3576 frequency_penalty?: number;
3577 /**
3578 * Increases the likelihood of the model introducing new topics.
3579 */
3580 presence_penalty?: number;
3581}
3582export interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Async_Batch {
3583 requests: (
3584 | Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt_Inner
3585 | Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages_Inner
3586 )[];
3587}
3588export interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt_Inner {
3589 /**
3590 * The input text prompt for the model to generate a response.
3591 */
3592 prompt: string;
3593 /**
3594 * JSON schema that should be fulfilled for the response.
3595 */
3596 guided_json?: object;
3597 response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode;
3598 /**
3599 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
3600 */
3601 raw?: boolean;
3602 /**
3603 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
3604 */
3605 stream?: boolean;
3606 /**
3607 * The maximum number of tokens to generate in the response.
3608 */
3609 max_tokens?: number;
3610 /**
3611 * Controls the randomness of the output; higher values produce more random results.
3612 */
3613 temperature?: number;
3614 /**
3615 * 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.
3616 */
3617 top_p?: number;
3618 /**
3619 * 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.
3620 */
3621 top_k?: number;
3622 /**
3623 * Random seed for reproducibility of the generation.
3624 */
3625 seed?: number;
3626 /**
3627 * Penalty for repeated tokens; higher values discourage repetition.
3628 */
3629 repetition_penalty?: number;
3630 /**
3631 * Decreases the likelihood of the model repeating the same lines verbatim.
3632 */
3633 frequency_penalty?: number;
3634 /**
3635 * Increases the likelihood of the model introducing new topics.
3636 */
3637 presence_penalty?: number;
3638}
3639export interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages_Inner {
3640 /**
3641 * An array of message objects representing the conversation history.
3642 */
3643 messages: {
3644 /**
3645 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
3646 */
3647 role?: string;
3648 /**
3649 * The tool call id. If you don't know what to put here you can fall back to 000000001
3650 */
3651 tool_call_id?: string;
3652 content?:
3653 | string
3654 | {
3655 /**
3656 * Type of the content provided
3657 */
3658 type?: string;
3659 text?: string;
3660 image_url?: {
3661 /**
3662 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
3663 */
3664 url?: string;
3665 };
3666 }[]
3667 | {
3668 /**
3669 * Type of the content provided
3670 */
3671 type?: string;
3672 text?: string;
3673 image_url?: {
3674 /**
3675 * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
3676 */
3677 url?: string;
3678 };
3679 };
3680 }[];
3681 functions?: {
3682 name: string;
3683 code: string;
3684 }[];
3685 /**
3686 * A list of tools available for the assistant to use.
3687 */
3688 tools?: (
3689 | {
3690 /**
3691 * The name of the tool. More descriptive the better.
3692 */
3693 name: string;
3694 /**
3695 * A brief description of what the tool does.
3696 */
3697 description: string;
3698 /**
3699 * Schema defining the parameters accepted by the tool.
3700 */
3701 parameters: {
3702 /**
3703 * The type of the parameters object (usually 'object').
3704 */
3705 type: string;
3706 /**
3707 * List of required parameter names.
3708 */
3709 required?: string[];
3710 /**
3711 * Definitions of each parameter.
3712 */
3713 properties: {
3714 [k: string]: {
3715 /**
3716 * The data type of the parameter.
3717 */
3718 type: string;
3719 /**
3720 * A description of the expected parameter.
3721 */
3722 description: string;
3723 };
3724 };
3725 };
3726 }
3727 | {
3728 /**
3729 * Specifies the type of tool (e.g., 'function').
3730 */
3731 type: string;
3732 /**
3733 * Details of the function tool.
3734 */
3735 function: {
3736 /**
3737 * The name of the function.
3738 */
3739 name: string;
3740 /**
3741 * A brief description of what the function does.
3742 */
3743 description: string;
3744 /**
3745 * Schema defining the parameters accepted by the function.
3746 */
3747 parameters: {
3748 /**
3749 * The type of the parameters object (usually 'object').
3750 */
3751 type: string;
3752 /**
3753 * List of required parameter names.
3754 */
3755 required?: string[];
3756 /**
3757 * Definitions of each parameter.
3758 */
3759 properties: {
3760 [k: string]: {
3761 /**
3762 * The data type of the parameter.
3763 */
3764 type: string;
3765 /**
3766 * A description of the expected parameter.
3767 */
3768 description: string;
3769 };
3770 };
3771 };
3772 };
3773 }
3774 )[];
3775 response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode;
3776 /**
3777 * JSON schema that should be fufilled for the response.
3778 */
3779 guided_json?: object;
3780 /**
3781 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
3782 */
3783 raw?: boolean;
3784 /**
3785 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
3786 */
3787 stream?: boolean;
3788 /**
3789 * The maximum number of tokens to generate in the response.
3790 */
3791 max_tokens?: number;
3792 /**
3793 * Controls the randomness of the output; higher values produce more random results.
3794 */
3795 temperature?: number;
3796 /**
3797 * 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.
3798 */
3799 top_p?: number;
3800 /**
3801 * 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.
3802 */
3803 top_k?: number;
3804 /**
3805 * Random seed for reproducibility of the generation.
3806 */
3807 seed?: number;
3808 /**
3809 * Penalty for repeated tokens; higher values discourage repetition.
3810 */
3811 repetition_penalty?: number;
3812 /**
3813 * Decreases the likelihood of the model repeating the same lines verbatim.
3814 */
3815 frequency_penalty?: number;
3816 /**
3817 * Increases the likelihood of the model introducing new topics.
3818 */
3819 presence_penalty?: number;
3820}
3821export type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output = {
3822 /**
3823 * The generated text response from the model
3824 */
3825 response: string;
3826 /**
3827 * Usage statistics for the inference request
3828 */
3829 usage?: {
3830 /**
3831 * Total number of tokens in input
3832 */
3833 prompt_tokens?: number;
3834 /**
3835 * Total number of tokens in output
3836 */
3837 completion_tokens?: number;
3838 /**
3839 * Total number of input and output tokens
3840 */
3841 total_tokens?: number;
3842 };
3843 /**
3844 * An array of tool calls requests made during the response generation
3845 */
3846 tool_calls?: {
3847 /**
3848 * The tool call id.
3849 */
3850 id?: string;
3851 /**
3852 * Specifies the type of tool (e.g., 'function').
3853 */
3854 type?: string;
3855 /**
3856 * Details of the function tool.
3857 */
3858 function?: {
3859 /**
3860 * The name of the tool to be called
3861 */
3862 name?: string;
3863 /**
3864 * The arguments passed to be passed to the tool call request
3865 */
3866 arguments?: object;
3867 };
3868 }[];
3869};
3870export declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct {
3871 inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
3872 postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
3873}
3874export type Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Input =
3875 | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt
3876 | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages
3877 | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Async_Batch;
3878export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt {
3879 /**
3880 * The input text prompt for the model to generate a response.
3881 */
3882 prompt: string;
3883 /**
3884 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
3885 */
3886 lora?: string;
3887 response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode;
3888 /**
3889 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
3890 */
3891 raw?: boolean;
3892 /**
3893 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
3894 */
3895 stream?: boolean;
3896 /**
3897 * The maximum number of tokens to generate in the response.
3898 */
3899 max_tokens?: number;
3900 /**
3901 * Controls the randomness of the output; higher values produce more random results.
3902 */
3903 temperature?: number;
3904 /**
3905 * 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.
3906 */
3907 top_p?: number;
3908 /**
3909 * 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.
3910 */
3911 top_k?: number;
3912 /**
3913 * Random seed for reproducibility of the generation.
3914 */
3915 seed?: number;
3916 /**
3917 * Penalty for repeated tokens; higher values discourage repetition.
3918 */
3919 repetition_penalty?: number;
3920 /**
3921 * Decreases the likelihood of the model repeating the same lines verbatim.
3922 */
3923 frequency_penalty?: number;
3924 /**
3925 * Increases the likelihood of the model introducing new topics.
3926 */
3927 presence_penalty?: number;
3928}
3929export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode {
3930 type?: "json_object" | "json_schema";
3931 json_schema?: unknown;
3932}
3933export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages {
3934 /**
3935 * An array of message objects representing the conversation history.
3936 */
3937 messages: {
3938 /**
3939 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
3940 */
3941 role: string;
3942 content:
3943 | string
3944 | {
3945 /**
3946 * Type of the content (text)
3947 */
3948 type?: string;
3949 /**
3950 * Text content
3951 */
3952 text?: string;
3953 }[];
3954 }[];
3955 functions?: {
3956 name: string;
3957 code: string;
3958 }[];
3959 /**
3960 * A list of tools available for the assistant to use.
3961 */
3962 tools?: (
3963 | {
3964 /**
3965 * The name of the tool. More descriptive the better.
3966 */
3967 name: string;
3968 /**
3969 * A brief description of what the tool does.
3970 */
3971 description: string;
3972 /**
3973 * Schema defining the parameters accepted by the tool.
3974 */
3975 parameters: {
3976 /**
3977 * The type of the parameters object (usually 'object').
3978 */
3979 type: string;
3980 /**
3981 * List of required parameter names.
3982 */
3983 required?: string[];
3984 /**
3985 * Definitions of each parameter.
3986 */
3987 properties: {
3988 [k: string]: {
3989 /**
3990 * The data type of the parameter.
3991 */
3992 type: string;
3993 /**
3994 * A description of the expected parameter.
3995 */
3996 description: string;
3997 };
3998 };
3999 };
4000 }
4001 | {
4002 /**
4003 * Specifies the type of tool (e.g., 'function').
4004 */
4005 type: string;
4006 /**
4007 * Details of the function tool.
4008 */
4009 function: {
4010 /**
4011 * The name of the function.
4012 */
4013 name: string;
4014 /**
4015 * A brief description of what the function does.
4016 */
4017 description: string;
4018 /**
4019 * Schema defining the parameters accepted by the function.
4020 */
4021 parameters: {
4022 /**
4023 * The type of the parameters object (usually 'object').
4024 */
4025 type: string;
4026 /**
4027 * List of required parameter names.
4028 */
4029 required?: string[];
4030 /**
4031 * Definitions of each parameter.
4032 */
4033 properties: {
4034 [k: string]: {
4035 /**
4036 * The data type of the parameter.
4037 */
4038 type: string;
4039 /**
4040 * A description of the expected parameter.
4041 */
4042 description: string;
4043 };
4044 };
4045 };
4046 };
4047 }
4048 )[];
4049 response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_1;
4050 /**
4051 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
4052 */
4053 raw?: boolean;
4054 /**
4055 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
4056 */
4057 stream?: boolean;
4058 /**
4059 * The maximum number of tokens to generate in the response.
4060 */
4061 max_tokens?: number;
4062 /**
4063 * Controls the randomness of the output; higher values produce more random results.
4064 */
4065 temperature?: number;
4066 /**
4067 * 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.
4068 */
4069 top_p?: number;
4070 /**
4071 * 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.
4072 */
4073 top_k?: number;
4074 /**
4075 * Random seed for reproducibility of the generation.
4076 */
4077 seed?: number;
4078 /**
4079 * Penalty for repeated tokens; higher values discourage repetition.
4080 */
4081 repetition_penalty?: number;
4082 /**
4083 * Decreases the likelihood of the model repeating the same lines verbatim.
4084 */
4085 frequency_penalty?: number;
4086 /**
4087 * Increases the likelihood of the model introducing new topics.
4088 */
4089 presence_penalty?: number;
4090}
4091export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_1 {
4092 type?: "json_object" | "json_schema";
4093 json_schema?: unknown;
4094}
4095export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Async_Batch {
4096 requests: (Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt_1 | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages_1)[];
4097}
4098export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt_1 {
4099 /**
4100 * The input text prompt for the model to generate a response.
4101 */
4102 prompt: string;
4103 /**
4104 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
4105 */
4106 lora?: string;
4107 response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_2;
4108 /**
4109 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
4110 */
4111 raw?: boolean;
4112 /**
4113 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
4114 */
4115 stream?: boolean;
4116 /**
4117 * The maximum number of tokens to generate in the response.
4118 */
4119 max_tokens?: number;
4120 /**
4121 * Controls the randomness of the output; higher values produce more random results.
4122 */
4123 temperature?: number;
4124 /**
4125 * 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.
4126 */
4127 top_p?: number;
4128 /**
4129 * 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.
4130 */
4131 top_k?: number;
4132 /**
4133 * Random seed for reproducibility of the generation.
4134 */
4135 seed?: number;
4136 /**
4137 * Penalty for repeated tokens; higher values discourage repetition.
4138 */
4139 repetition_penalty?: number;
4140 /**
4141 * Decreases the likelihood of the model repeating the same lines verbatim.
4142 */
4143 frequency_penalty?: number;
4144 /**
4145 * Increases the likelihood of the model introducing new topics.
4146 */
4147 presence_penalty?: number;
4148}
4149export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_2 {
4150 type?: "json_object" | "json_schema";
4151 json_schema?: unknown;
4152}
4153export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages_1 {
4154 /**
4155 * An array of message objects representing the conversation history.
4156 */
4157 messages: {
4158 /**
4159 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
4160 */
4161 role: string;
4162 content:
4163 | string
4164 | {
4165 /**
4166 * Type of the content (text)
4167 */
4168 type?: string;
4169 /**
4170 * Text content
4171 */
4172 text?: string;
4173 }[];
4174 }[];
4175 functions?: {
4176 name: string;
4177 code: string;
4178 }[];
4179 /**
4180 * A list of tools available for the assistant to use.
4181 */
4182 tools?: (
4183 | {
4184 /**
4185 * The name of the tool. More descriptive the better.
4186 */
4187 name: string;
4188 /**
4189 * A brief description of what the tool does.
4190 */
4191 description: string;
4192 /**
4193 * Schema defining the parameters accepted by the tool.
4194 */
4195 parameters: {
4196 /**
4197 * The type of the parameters object (usually 'object').
4198 */
4199 type: string;
4200 /**
4201 * List of required parameter names.
4202 */
4203 required?: string[];
4204 /**
4205 * Definitions of each parameter.
4206 */
4207 properties: {
4208 [k: string]: {
4209 /**
4210 * The data type of the parameter.
4211 */
4212 type: string;
4213 /**
4214 * A description of the expected parameter.
4215 */
4216 description: string;
4217 };
4218 };
4219 };
4220 }
4221 | {
4222 /**
4223 * Specifies the type of tool (e.g., 'function').
4224 */
4225 type: string;
4226 /**
4227 * Details of the function tool.
4228 */
4229 function: {
4230 /**
4231 * The name of the function.
4232 */
4233 name: string;
4234 /**
4235 * A brief description of what the function does.
4236 */
4237 description: string;
4238 /**
4239 * Schema defining the parameters accepted by the function.
4240 */
4241 parameters: {
4242 /**
4243 * The type of the parameters object (usually 'object').
4244 */
4245 type: string;
4246 /**
4247 * List of required parameter names.
4248 */
4249 required?: string[];
4250 /**
4251 * Definitions of each parameter.
4252 */
4253 properties: {
4254 [k: string]: {
4255 /**
4256 * The data type of the parameter.
4257 */
4258 type: string;
4259 /**
4260 * A description of the expected parameter.
4261 */
4262 description: string;
4263 };
4264 };
4265 };
4266 };
4267 }
4268 )[];
4269 response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_3;
4270 /**
4271 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
4272 */
4273 raw?: boolean;
4274 /**
4275 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
4276 */
4277 stream?: boolean;
4278 /**
4279 * The maximum number of tokens to generate in the response.
4280 */
4281 max_tokens?: number;
4282 /**
4283 * Controls the randomness of the output; higher values produce more random results.
4284 */
4285 temperature?: number;
4286 /**
4287 * 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.
4288 */
4289 top_p?: number;
4290 /**
4291 * 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.
4292 */
4293 top_k?: number;
4294 /**
4295 * Random seed for reproducibility of the generation.
4296 */
4297 seed?: number;
4298 /**
4299 * Penalty for repeated tokens; higher values discourage repetition.
4300 */
4301 repetition_penalty?: number;
4302 /**
4303 * Decreases the likelihood of the model repeating the same lines verbatim.
4304 */
4305 frequency_penalty?: number;
4306 /**
4307 * Increases the likelihood of the model introducing new topics.
4308 */
4309 presence_penalty?: number;
4310}
4311export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_3 {
4312 type?: "json_object" | "json_schema";
4313 json_schema?: unknown;
4314}
4315export type Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Output =
4316 | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Chat_Completion_Response
4317 | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Text_Completion_Response
4318 | string
4319 | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_AsyncResponse;
4320export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Chat_Completion_Response {
4321 /**
4322 * Unique identifier for the completion
4323 */
4324 id?: string;
4325 /**
4326 * Object type identifier
4327 */
4328 object?: "chat.completion";
4329 /**
4330 * Unix timestamp of when the completion was created
4331 */
4332 created?: number;
4333 /**
4334 * Model used for the completion
4335 */
4336 model?: string;
4337 /**
4338 * List of completion choices
4339 */
4340 choices?: {
4341 /**
4342 * Index of the choice in the list
4343 */
4344 index?: number;
4345 /**
4346 * The message generated by the model
4347 */
4348 message?: {
4349 /**
4350 * Role of the message author
4351 */
4352 role: string;
4353 /**
4354 * The content of the message
4355 */
4356 content: string;
4357 /**
4358 * Internal reasoning content (if available)
4359 */
4360 reasoning_content?: string;
4361 /**
4362 * Tool calls made by the assistant
4363 */
4364 tool_calls?: {
4365 /**
4366 * Unique identifier for the tool call
4367 */
4368 id: string;
4369 /**
4370 * Type of tool call
4371 */
4372 type: "function";
4373 function: {
4374 /**
4375 * Name of the function to call
4376 */
4377 name: string;
4378 /**
4379 * JSON string of arguments for the function
4380 */
4381 arguments: string;
4382 };
4383 }[];
4384 };
4385 /**
4386 * Reason why the model stopped generating
4387 */
4388 finish_reason?: string;
4389 /**
4390 * Stop reason (may be null)
4391 */
4392 stop_reason?: string | null;
4393 /**
4394 * Log probabilities (if requested)
4395 */
4396 logprobs?: {} | null;
4397 }[];
4398 /**
4399 * Usage statistics for the inference request
4400 */
4401 usage?: {
4402 /**
4403 * Total number of tokens in input
4404 */
4405 prompt_tokens?: number;
4406 /**
4407 * Total number of tokens in output
4408 */
4409 completion_tokens?: number;
4410 /**
4411 * Total number of input and output tokens
4412 */
4413 total_tokens?: number;
4414 };
4415 /**
4416 * Log probabilities for the prompt (if requested)
4417 */
4418 prompt_logprobs?: {} | null;
4419}
4420export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Text_Completion_Response {
4421 /**
4422 * Unique identifier for the completion
4423 */
4424 id?: string;
4425 /**
4426 * Object type identifier
4427 */
4428 object?: "text_completion";
4429 /**
4430 * Unix timestamp of when the completion was created
4431 */
4432 created?: number;
4433 /**
4434 * Model used for the completion
4435 */
4436 model?: string;
4437 /**
4438 * List of completion choices
4439 */
4440 choices?: {
4441 /**
4442 * Index of the choice in the list
4443 */
4444 index: number;
4445 /**
4446 * The generated text completion
4447 */
4448 text: string;
4449 /**
4450 * Reason why the model stopped generating
4451 */
4452 finish_reason: string;
4453 /**
4454 * Stop reason (may be null)
4455 */
4456 stop_reason?: string | null;
4457 /**
4458 * Log probabilities (if requested)
4459 */
4460 logprobs?: {} | null;
4461 /**
4462 * Log probabilities for the prompt (if requested)
4463 */
4464 prompt_logprobs?: {} | null;
4465 }[];
4466 /**
4467 * Usage statistics for the inference request
4468 */
4469 usage?: {
4470 /**
4471 * Total number of tokens in input
4472 */
4473 prompt_tokens?: number;
4474 /**
4475 * Total number of tokens in output
4476 */
4477 completion_tokens?: number;
4478 /**
4479 * Total number of input and output tokens
4480 */
4481 total_tokens?: number;
4482 };
4483}
4484export interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_AsyncResponse {
4485 /**
4486 * The async request id that can be used to obtain the results.
4487 */
4488 request_id?: string;
4489}
4490export declare abstract class Base_Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8 {
4491 inputs: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Input;
4492 postProcessedOutputs: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Output;
4493}
4494export interface Ai_Cf_Deepgram_Nova_3_Input {
4495 audio: {
4496 body: object;
4497 contentType: string;
4498 };
4499 /**
4500 * 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.
4501 */
4502 custom_topic_mode?: "extended" | "strict";
4503 /**
4504 * Custom topics you want the model to detect within your input audio or text if present Submit up to 100
4505 */
4506 custom_topic?: string;
4507 /**
4508 * 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
4509 */
4510 custom_intent_mode?: "extended" | "strict";
4511 /**
4512 * Custom intents you want the model to detect within your input audio if present
4513 */
4514 custom_intent?: string;
4515 /**
4516 * Identifies and extracts key entities from content in submitted audio
4517 */
4518 detect_entities?: boolean;
4519 /**
4520 * Identifies the dominant language spoken in submitted audio
4521 */
4522 detect_language?: boolean;
4523 /**
4524 * Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0
4525 */
4526 diarize?: boolean;
4527 /**
4528 * Identify and extract key entities from content in submitted audio
4529 */
4530 dictation?: boolean;
4531 /**
4532 * Specify the expected encoding of your submitted audio
4533 */
4534 encoding?: "linear16" | "flac" | "mulaw" | "amr-nb" | "amr-wb" | "opus" | "speex" | "g729";
4535 /**
4536 * Arbitrary key-value pairs that are attached to the API response for usage in downstream processing
4537 */
4538 extra?: string;
4539 /**
4540 * Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um'
4541 */
4542 filler_words?: boolean;
4543 /**
4544 * Key term prompting can boost or suppress specialized terminology and brands.
4545 */
4546 keyterm?: string;
4547 /**
4548 * Keywords can boost or suppress specialized terminology and brands.
4549 */
4550 keywords?: string;
4551 /**
4552 * 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.
4553 */
4554 language?: string;
4555 /**
4556 * Spoken measurements will be converted to their corresponding abbreviations.
4557 */
4558 measurements?: boolean;
4559 /**
4560 * 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.
4561 */
4562 mip_opt_out?: boolean;
4563 /**
4564 * Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio
4565 */
4566 mode?: "general" | "medical" | "finance";
4567 /**
4568 * Transcribe each audio channel independently.
4569 */
4570 multichannel?: boolean;
4571 /**
4572 * Numerals converts numbers from written format to numerical format.
4573 */
4574 numerals?: boolean;
4575 /**
4576 * Splits audio into paragraphs to improve transcript readability.
4577 */
4578 paragraphs?: boolean;
4579 /**
4580 * Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely.
4581 */
4582 profanity_filter?: boolean;
4583 /**
4584 * Add punctuation and capitalization to the transcript.
4585 */
4586 punctuate?: boolean;
4587 /**
4588 * Redaction removes sensitive information from your transcripts.
4589 */
4590 redact?: string;
4591 /**
4592 * Search for terms or phrases in submitted audio and replaces them.
4593 */
4594 replace?: string;
4595 /**
4596 * Search for terms or phrases in submitted audio.
4597 */
4598 search?: string;
4599 /**
4600 * Recognizes the sentiment throughout a transcript or text.
4601 */
4602 sentiment?: boolean;
4603 /**
4604 * Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability.
4605 */
4606 smart_format?: boolean;
4607 /**
4608 * Detect topics throughout a transcript or text.
4609 */
4610 topics?: boolean;
4611 /**
4612 * Segments speech into meaningful semantic units.
4613 */
4614 utterances?: boolean;
4615 /**
4616 * Seconds to wait before detecting a pause between words in submitted audio.
4617 */
4618 utt_split?: number;
4619 /**
4620 * The number of channels in the submitted audio
4621 */
4622 channels?: number;
4623 /**
4624 * 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.
4625 */
4626 interim_results?: boolean;
4627 /**
4628 * 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
4629 */
4630 endpointing?: string;
4631 /**
4632 * Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.
4633 */
4634 vad_events?: boolean;
4635 /**
4636 * 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.
4637 */
4638 utterance_end_ms?: boolean;
4639}
4640export interface Ai_Cf_Deepgram_Nova_3_Output {
4641 results?: {
4642 channels?: {
4643 alternatives?: {
4644 confidence?: number;
4645 transcript?: string;
4646 words?: {
4647 confidence?: number;
4648 end?: number;
4649 start?: number;
4650 word?: string;
4651 }[];
4652 }[];
4653 }[];
4654 summary?: {
4655 result?: string;
4656 short?: string;
4657 };
4658 sentiments?: {
4659 segments?: {
4660 text?: string;
4661 start_word?: number;
4662 end_word?: number;
4663 sentiment?: string;
4664 sentiment_score?: number;
4665 }[];
4666 average?: {
4667 sentiment?: string;
4668 sentiment_score?: number;
4669 };
4670 };
4671 };
4672}
4673export declare abstract class Base_Ai_Cf_Deepgram_Nova_3 {
4674 inputs: Ai_Cf_Deepgram_Nova_3_Input;
4675 postProcessedOutputs: Ai_Cf_Deepgram_Nova_3_Output;
4676}
4677export interface Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Input {
4678 queries?: string | string[];
4679 /**
4680 * Optional instruction for the task
4681 */
4682 instruction?: string;
4683 documents?: string | string[];
4684 text?: string | string[];
4685}
4686export interface Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Output {
4687 data?: number[][];
4688 shape?: number[];
4689}
4690export declare abstract class Base_Ai_Cf_Qwen_Qwen3_Embedding_0_6B {
4691 inputs: Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Input;
4692 postProcessedOutputs: Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Output;
4693}
4694export type Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input =
4695 | {
4696 /**
4697 * readable stream with audio data and content-type specified for that data
4698 */
4699 audio: {
4700 body: object;
4701 contentType: string;
4702 };
4703 /**
4704 * type of data PCM data that's sent to the inference server as raw array
4705 */
4706 dtype?: "uint8" | "float32" | "float64";
4707 }
4708 | {
4709 /**
4710 * base64 encoded audio data
4711 */
4712 audio: string;
4713 /**
4714 * type of data PCM data that's sent to the inference server as raw array
4715 */
4716 dtype?: "uint8" | "float32" | "float64";
4717 };
4718export interface Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output {
4719 /**
4720 * if true, end-of-turn was detected
4721 */
4722 is_complete?: boolean;
4723 /**
4724 * probability of the end-of-turn detection
4725 */
4726 probability?: number;
4727}
4728export declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
4729 inputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input;
4730 postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
4731}
4732export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
4733 inputs: XOR<ResponsesInput, ChatCompletionsInput>;
4734 postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
4735}
4736export declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
4737 inputs: XOR<ResponsesInput, ChatCompletionsInput>;
4738 postProcessedOutputs: XOR<ResponsesOutput, ChatCompletionsOutput>;
4739}
4740export interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
4741 /**
4742 * A text description of the image you want to generate.
4743 */
4744 prompt: string;
4745 /**
4746 * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
4747 */
4748 guidance?: number;
4749 /**
4750 * Random seed for reproducibility of the image generation
4751 */
4752 seed?: number;
4753 /**
4754 * The height of the generated image in pixels
4755 */
4756 height?: number;
4757 /**
4758 * The width of the generated image in pixels
4759 */
4760 width?: number;
4761 /**
4762 * The number of diffusion steps; higher values can improve quality but take longer
4763 */
4764 num_steps?: number;
4765 /**
4766 * Specify what to exclude from the generated images
4767 */
4768 negative_prompt?: string;
4769}
4770/**
4771 * The generated image in JPEG format
4772 */
4773export type Ai_Cf_Leonardo_Phoenix_1_0_Output = string;
4774export declare abstract class Base_Ai_Cf_Leonardo_Phoenix_1_0 {
4775 inputs: Ai_Cf_Leonardo_Phoenix_1_0_Input;
4776 postProcessedOutputs: Ai_Cf_Leonardo_Phoenix_1_0_Output;
4777}
4778export interface Ai_Cf_Leonardo_Lucid_Origin_Input {
4779 /**
4780 * A text description of the image you want to generate.
4781 */
4782 prompt: string;
4783 /**
4784 * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
4785 */
4786 guidance?: number;
4787 /**
4788 * Random seed for reproducibility of the image generation
4789 */
4790 seed?: number;
4791 /**
4792 * The height of the generated image in pixels
4793 */
4794 height?: number;
4795 /**
4796 * The width of the generated image in pixels
4797 */
4798 width?: number;
4799 /**
4800 * The number of diffusion steps; higher values can improve quality but take longer
4801 */
4802 num_steps?: number;
4803 /**
4804 * The number of diffusion steps; higher values can improve quality but take longer
4805 */
4806 steps?: number;
4807}
4808export interface Ai_Cf_Leonardo_Lucid_Origin_Output {
4809 /**
4810 * The generated image in Base64 format.
4811 */
4812 image?: string;
4813}
4814export declare abstract class Base_Ai_Cf_Leonardo_Lucid_Origin {
4815 inputs: Ai_Cf_Leonardo_Lucid_Origin_Input;
4816 postProcessedOutputs: Ai_Cf_Leonardo_Lucid_Origin_Output;
4817}
4818export interface Ai_Cf_Deepgram_Aura_1_Input {
4819 /**
4820 * Speaker used to produce the audio.
4821 */
4822 speaker?:
4823 | "angus"
4824 | "asteria"
4825 | "arcas"
4826 | "orion"
4827 | "orpheus"
4828 | "athena"
4829 | "luna"
4830 | "zeus"
4831 | "perseus"
4832 | "helios"
4833 | "hera"
4834 | "stella";
4835 /**
4836 * Encoding of the output audio.
4837 */
4838 encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
4839 /**
4840 * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
4841 */
4842 container?: "none" | "wav" | "ogg";
4843 /**
4844 * The text content to be converted to speech
4845 */
4846 text: string;
4847 /**
4848 * 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
4849 */
4850 sample_rate?: number;
4851 /**
4852 * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
4853 */
4854 bit_rate?: number;
4855}
4856/**
4857 * The generated audio in MP3 format
4858 */
4859export type Ai_Cf_Deepgram_Aura_1_Output = string;
4860export declare abstract class Base_Ai_Cf_Deepgram_Aura_1 {
4861 inputs: Ai_Cf_Deepgram_Aura_1_Input;
4862 postProcessedOutputs: Ai_Cf_Deepgram_Aura_1_Output;
4863}
4864export interface Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input {
4865 /**
4866 * Input text to translate. Can be a single string or a list of strings.
4867 */
4868 text: string | string[];
4869 /**
4870 * Target langauge to translate to
4871 */
4872 target_language:
4873 | "asm_Beng"
4874 | "awa_Deva"
4875 | "ben_Beng"
4876 | "bho_Deva"
4877 | "brx_Deva"
4878 | "doi_Deva"
4879 | "eng_Latn"
4880 | "gom_Deva"
4881 | "gon_Deva"
4882 | "guj_Gujr"
4883 | "hin_Deva"
4884 | "hne_Deva"
4885 | "kan_Knda"
4886 | "kas_Arab"
4887 | "kas_Deva"
4888 | "kha_Latn"
4889 | "lus_Latn"
4890 | "mag_Deva"
4891 | "mai_Deva"
4892 | "mal_Mlym"
4893 | "mar_Deva"
4894 | "mni_Beng"
4895 | "mni_Mtei"
4896 | "npi_Deva"
4897 | "ory_Orya"
4898 | "pan_Guru"
4899 | "san_Deva"
4900 | "sat_Olck"
4901 | "snd_Arab"
4902 | "snd_Deva"
4903 | "tam_Taml"
4904 | "tel_Telu"
4905 | "urd_Arab"
4906 | "unr_Deva";
4907}
4908export interface Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Output {
4909 /**
4910 * Translated texts
4911 */
4912 translations: string[];
4913}
4914export declare abstract class Base_Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B {
4915 inputs: Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input;
4916 postProcessedOutputs: Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Output;
4917}
4918export type Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Input =
4919 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt
4920 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages
4921 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Async_Batch;
4922export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt {
4923 /**
4924 * The input text prompt for the model to generate a response.
4925 */
4926 prompt: string;
4927 /**
4928 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
4929 */
4930 lora?: string;
4931 response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode;
4932 /**
4933 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
4934 */
4935 raw?: boolean;
4936 /**
4937 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
4938 */
4939 stream?: boolean;
4940 /**
4941 * The maximum number of tokens to generate in the response.
4942 */
4943 max_tokens?: number;
4944 /**
4945 * Controls the randomness of the output; higher values produce more random results.
4946 */
4947 temperature?: number;
4948 /**
4949 * 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.
4950 */
4951 top_p?: number;
4952 /**
4953 * 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.
4954 */
4955 top_k?: number;
4956 /**
4957 * Random seed for reproducibility of the generation.
4958 */
4959 seed?: number;
4960 /**
4961 * Penalty for repeated tokens; higher values discourage repetition.
4962 */
4963 repetition_penalty?: number;
4964 /**
4965 * Decreases the likelihood of the model repeating the same lines verbatim.
4966 */
4967 frequency_penalty?: number;
4968 /**
4969 * Increases the likelihood of the model introducing new topics.
4970 */
4971 presence_penalty?: number;
4972}
4973export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode {
4974 type?: "json_object" | "json_schema";
4975 json_schema?: unknown;
4976}
4977export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages {
4978 /**
4979 * An array of message objects representing the conversation history.
4980 */
4981 messages: {
4982 /**
4983 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
4984 */
4985 role: string;
4986 content:
4987 | string
4988 | {
4989 /**
4990 * Type of the content (text)
4991 */
4992 type?: string;
4993 /**
4994 * Text content
4995 */
4996 text?: string;
4997 }[];
4998 }[];
4999 functions?: {
5000 name: string;
5001 code: string;
5002 }[];
5003 /**
5004 * A list of tools available for the assistant to use.
5005 */
5006 tools?: (
5007 | {
5008 /**
5009 * The name of the tool. More descriptive the better.
5010 */
5011 name: string;
5012 /**
5013 * A brief description of what the tool does.
5014 */
5015 description: string;
5016 /**
5017 * Schema defining the parameters accepted by the tool.
5018 */
5019 parameters: {
5020 /**
5021 * The type of the parameters object (usually 'object').
5022 */
5023 type: string;
5024 /**
5025 * List of required parameter names.
5026 */
5027 required?: string[];
5028 /**
5029 * Definitions of each parameter.
5030 */
5031 properties: {
5032 [k: string]: {
5033 /**
5034 * The data type of the parameter.
5035 */
5036 type: string;
5037 /**
5038 * A description of the expected parameter.
5039 */
5040 description: string;
5041 };
5042 };
5043 };
5044 }
5045 | {
5046 /**
5047 * Specifies the type of tool (e.g., 'function').
5048 */
5049 type: string;
5050 /**
5051 * Details of the function tool.
5052 */
5053 function: {
5054 /**
5055 * The name of the function.
5056 */
5057 name: string;
5058 /**
5059 * A brief description of what the function does.
5060 */
5061 description: string;
5062 /**
5063 * Schema defining the parameters accepted by the function.
5064 */
5065 parameters: {
5066 /**
5067 * The type of the parameters object (usually 'object').
5068 */
5069 type: string;
5070 /**
5071 * List of required parameter names.
5072 */
5073 required?: string[];
5074 /**
5075 * Definitions of each parameter.
5076 */
5077 properties: {
5078 [k: string]: {
5079 /**
5080 * The data type of the parameter.
5081 */
5082 type: string;
5083 /**
5084 * A description of the expected parameter.
5085 */
5086 description: string;
5087 };
5088 };
5089 };
5090 };
5091 }
5092 )[];
5093 response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_1;
5094 /**
5095 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
5096 */
5097 raw?: boolean;
5098 /**
5099 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
5100 */
5101 stream?: boolean;
5102 /**
5103 * The maximum number of tokens to generate in the response.
5104 */
5105 max_tokens?: number;
5106 /**
5107 * Controls the randomness of the output; higher values produce more random results.
5108 */
5109 temperature?: number;
5110 /**
5111 * 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.
5112 */
5113 top_p?: number;
5114 /**
5115 * 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.
5116 */
5117 top_k?: number;
5118 /**
5119 * Random seed for reproducibility of the generation.
5120 */
5121 seed?: number;
5122 /**
5123 * Penalty for repeated tokens; higher values discourage repetition.
5124 */
5125 repetition_penalty?: number;
5126 /**
5127 * Decreases the likelihood of the model repeating the same lines verbatim.
5128 */
5129 frequency_penalty?: number;
5130 /**
5131 * Increases the likelihood of the model introducing new topics.
5132 */
5133 presence_penalty?: number;
5134}
5135export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_1 {
5136 type?: "json_object" | "json_schema";
5137 json_schema?: unknown;
5138}
5139export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Async_Batch {
5140 requests: (
5141 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt_1
5142 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages_1
5143 )[];
5144}
5145export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt_1 {
5146 /**
5147 * The input text prompt for the model to generate a response.
5148 */
5149 prompt: string;
5150 /**
5151 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
5152 */
5153 lora?: string;
5154 response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_2;
5155 /**
5156 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
5157 */
5158 raw?: boolean;
5159 /**
5160 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
5161 */
5162 stream?: boolean;
5163 /**
5164 * The maximum number of tokens to generate in the response.
5165 */
5166 max_tokens?: number;
5167 /**
5168 * Controls the randomness of the output; higher values produce more random results.
5169 */
5170 temperature?: number;
5171 /**
5172 * 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.
5173 */
5174 top_p?: number;
5175 /**
5176 * 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.
5177 */
5178 top_k?: number;
5179 /**
5180 * Random seed for reproducibility of the generation.
5181 */
5182 seed?: number;
5183 /**
5184 * Penalty for repeated tokens; higher values discourage repetition.
5185 */
5186 repetition_penalty?: number;
5187 /**
5188 * Decreases the likelihood of the model repeating the same lines verbatim.
5189 */
5190 frequency_penalty?: number;
5191 /**
5192 * Increases the likelihood of the model introducing new topics.
5193 */
5194 presence_penalty?: number;
5195}
5196export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_2 {
5197 type?: "json_object" | "json_schema";
5198 json_schema?: unknown;
5199}
5200export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages_1 {
5201 /**
5202 * An array of message objects representing the conversation history.
5203 */
5204 messages: {
5205 /**
5206 * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
5207 */
5208 role: string;
5209 content:
5210 | string
5211 | {
5212 /**
5213 * Type of the content (text)
5214 */
5215 type?: string;
5216 /**
5217 * Text content
5218 */
5219 text?: string;
5220 }[];
5221 }[];
5222 functions?: {
5223 name: string;
5224 code: string;
5225 }[];
5226 /**
5227 * A list of tools available for the assistant to use.
5228 */
5229 tools?: (
5230 | {
5231 /**
5232 * The name of the tool. More descriptive the better.
5233 */
5234 name: string;
5235 /**
5236 * A brief description of what the tool does.
5237 */
5238 description: string;
5239 /**
5240 * Schema defining the parameters accepted by the tool.
5241 */
5242 parameters: {
5243 /**
5244 * The type of the parameters object (usually 'object').
5245 */
5246 type: string;
5247 /**
5248 * List of required parameter names.
5249 */
5250 required?: string[];
5251 /**
5252 * Definitions of each parameter.
5253 */
5254 properties: {
5255 [k: string]: {
5256 /**
5257 * The data type of the parameter.
5258 */
5259 type: string;
5260 /**
5261 * A description of the expected parameter.
5262 */
5263 description: string;
5264 };
5265 };
5266 };
5267 }
5268 | {
5269 /**
5270 * Specifies the type of tool (e.g., 'function').
5271 */
5272 type: string;
5273 /**
5274 * Details of the function tool.
5275 */
5276 function: {
5277 /**
5278 * The name of the function.
5279 */
5280 name: string;
5281 /**
5282 * A brief description of what the function does.
5283 */
5284 description: string;
5285 /**
5286 * Schema defining the parameters accepted by the function.
5287 */
5288 parameters: {
5289 /**
5290 * The type of the parameters object (usually 'object').
5291 */
5292 type: string;
5293 /**
5294 * List of required parameter names.
5295 */
5296 required?: string[];
5297 /**
5298 * Definitions of each parameter.
5299 */
5300 properties: {
5301 [k: string]: {
5302 /**
5303 * The data type of the parameter.
5304 */
5305 type: string;
5306 /**
5307 * A description of the expected parameter.
5308 */
5309 description: string;
5310 };
5311 };
5312 };
5313 };
5314 }
5315 )[];
5316 response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_3;
5317 /**
5318 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
5319 */
5320 raw?: boolean;
5321 /**
5322 * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
5323 */
5324 stream?: boolean;
5325 /**
5326 * The maximum number of tokens to generate in the response.
5327 */
5328 max_tokens?: number;
5329 /**
5330 * Controls the randomness of the output; higher values produce more random results.
5331 */
5332 temperature?: number;
5333 /**
5334 * 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.
5335 */
5336 top_p?: number;
5337 /**
5338 * 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.
5339 */
5340 top_k?: number;
5341 /**
5342 * Random seed for reproducibility of the generation.
5343 */
5344 seed?: number;
5345 /**
5346 * Penalty for repeated tokens; higher values discourage repetition.
5347 */
5348 repetition_penalty?: number;
5349 /**
5350 * Decreases the likelihood of the model repeating the same lines verbatim.
5351 */
5352 frequency_penalty?: number;
5353 /**
5354 * Increases the likelihood of the model introducing new topics.
5355 */
5356 presence_penalty?: number;
5357}
5358export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_3 {
5359 type?: "json_object" | "json_schema";
5360 json_schema?: unknown;
5361}
5362export type Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Output =
5363 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Chat_Completion_Response
5364 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Text_Completion_Response
5365 | string
5366 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_AsyncResponse;
5367export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Chat_Completion_Response {
5368 /**
5369 * Unique identifier for the completion
5370 */
5371 id?: string;
5372 /**
5373 * Object type identifier
5374 */
5375 object?: "chat.completion";
5376 /**
5377 * Unix timestamp of when the completion was created
5378 */
5379 created?: number;
5380 /**
5381 * Model used for the completion
5382 */
5383 model?: string;
5384 /**
5385 * List of completion choices
5386 */
5387 choices?: {
5388 /**
5389 * Index of the choice in the list
5390 */
5391 index?: number;
5392 /**
5393 * The message generated by the model
5394 */
5395 message?: {
5396 /**
5397 * Role of the message author
5398 */
5399 role: string;
5400 /**
5401 * The content of the message
5402 */
5403 content: string;
5404 /**
5405 * Internal reasoning content (if available)
5406 */
5407 reasoning_content?: string;
5408 /**
5409 * Tool calls made by the assistant
5410 */
5411 tool_calls?: {
5412 /**
5413 * Unique identifier for the tool call
5414 */
5415 id: string;
5416 /**
5417 * Type of tool call
5418 */
5419 type: "function";
5420 function: {
5421 /**
5422 * Name of the function to call
5423 */
5424 name: string;
5425 /**
5426 * JSON string of arguments for the function
5427 */
5428 arguments: string;
5429 };
5430 }[];
5431 };
5432 /**
5433 * Reason why the model stopped generating
5434 */
5435 finish_reason?: string;
5436 /**
5437 * Stop reason (may be null)
5438 */
5439 stop_reason?: string | null;
5440 /**
5441 * Log probabilities (if requested)
5442 */
5443 logprobs?: {} | null;
5444 }[];
5445 /**
5446 * Usage statistics for the inference request
5447 */
5448 usage?: {
5449 /**
5450 * Total number of tokens in input
5451 */
5452 prompt_tokens?: number;
5453 /**
5454 * Total number of tokens in output
5455 */
5456 completion_tokens?: number;
5457 /**
5458 * Total number of input and output tokens
5459 */
5460 total_tokens?: number;
5461 };
5462 /**
5463 * Log probabilities for the prompt (if requested)
5464 */
5465 prompt_logprobs?: {} | null;
5466}
5467export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Text_Completion_Response {
5468 /**
5469 * Unique identifier for the completion
5470 */
5471 id?: string;
5472 /**
5473 * Object type identifier
5474 */
5475 object?: "text_completion";
5476 /**
5477 * Unix timestamp of when the completion was created
5478 */
5479 created?: number;
5480 /**
5481 * Model used for the completion
5482 */
5483 model?: string;
5484 /**
5485 * List of completion choices
5486 */
5487 choices?: {
5488 /**
5489 * Index of the choice in the list
5490 */
5491 index: number;
5492 /**
5493 * The generated text completion
5494 */
5495 text: string;
5496 /**
5497 * Reason why the model stopped generating
5498 */
5499 finish_reason: string;
5500 /**
5501 * Stop reason (may be null)
5502 */
5503 stop_reason?: string | null;
5504 /**
5505 * Log probabilities (if requested)
5506 */
5507 logprobs?: {} | null;
5508 /**
5509 * Log probabilities for the prompt (if requested)
5510 */
5511 prompt_logprobs?: {} | null;
5512 }[];
5513 /**
5514 * Usage statistics for the inference request
5515 */
5516 usage?: {
5517 /**
5518 * Total number of tokens in input
5519 */
5520 prompt_tokens?: number;
5521 /**
5522 * Total number of tokens in output
5523 */
5524 completion_tokens?: number;
5525 /**
5526 * Total number of input and output tokens
5527 */
5528 total_tokens?: number;
5529 };
5530}
5531export interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_AsyncResponse {
5532 /**
5533 * The async request id that can be used to obtain the results.
5534 */
5535 request_id?: string;
5536}
5537export declare abstract class Base_Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It {
5538 inputs: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Input;
5539 postProcessedOutputs: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Output;
5540}
5541export interface Ai_Cf_Pfnet_Plamo_Embedding_1B_Input {
5542 /**
5543 * Input text to embed. Can be a single string or a list of strings.
5544 */
5545 text: string | string[];
5546}
5547export interface Ai_Cf_Pfnet_Plamo_Embedding_1B_Output {
5548 /**
5549 * Embedding vectors, where each vector is a list of floats.
5550 */
5551 data: number[][];
5552 /**
5553 * Shape of the embedding data as [number_of_embeddings, embedding_dimension].
5554 *
5555 * @minItems 2
5556 * @maxItems 2
5557 */
5558 shape: [number, number];
5559}
5560export declare abstract class Base_Ai_Cf_Pfnet_Plamo_Embedding_1B {
5561 inputs: Ai_Cf_Pfnet_Plamo_Embedding_1B_Input;
5562 postProcessedOutputs: Ai_Cf_Pfnet_Plamo_Embedding_1B_Output;
5563}
5564export interface Ai_Cf_Deepgram_Flux_Input {
5565 /**
5566 * Encoding of the audio stream. Currently only supports raw signed little-endian 16-bit PCM.
5567 */
5568 encoding: "linear16";
5569 /**
5570 * Sample rate of the audio stream in Hz.
5571 */
5572 sample_rate: string;
5573 /**
5574 * End-of-turn confidence required to fire an eager end-of-turn event. When set, enables EagerEndOfTurn and TurnResumed events. Valid Values 0.3 - 0.9.
5575 */
5576 eager_eot_threshold?: string;
5577 /**
5578 * End-of-turn confidence required to finish a turn. Valid Values 0.5 - 0.9.
5579 */
5580 eot_threshold?: string;
5581 /**
5582 * A turn will be finished when this much time has passed after speech, regardless of EOT confidence.
5583 */
5584 eot_timeout_ms?: string;
5585 /**
5586 * Keyterm prompting can improve recognition of specialized terminology. Pass multiple keyterm query parameters to boost multiple keyterms.
5587 */
5588 keyterm?: string;
5589 /**
5590 * Opts out requests from the Deepgram Model Improvement Program. Refer to Deepgram Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip
5591 */
5592 mip_opt_out?: "true" | "false";
5593 /**
5594 * Label your requests for the purpose of identification during usage reporting
5595 */
5596 tag?: string;
5597}
5598/**
5599 * Output will be returned as websocket messages.
5600 */
5601export interface Ai_Cf_Deepgram_Flux_Output {
5602 /**
5603 * The unique identifier of the request (uuid)
5604 */
5605 request_id?: string;
5606 /**
5607 * Starts at 0 and increments for each message the server sends to the client.
5608 */
5609 sequence_id?: number;
5610 /**
5611 * The type of event being reported.
5612 */
5613 event?: "Update" | "StartOfTurn" | "EagerEndOfTurn" | "TurnResumed" | "EndOfTurn";
5614 /**
5615 * The index of the current turn
5616 */
5617 turn_index?: number;
5618 /**
5619 * Start time in seconds of the audio range that was transcribed
5620 */
5621 audio_window_start?: number;
5622 /**
5623 * End time in seconds of the audio range that was transcribed
5624 */
5625 audio_window_end?: number;
5626 /**
5627 * Text that was said over the course of the current turn
5628 */
5629 transcript?: string;
5630 /**
5631 * The words in the transcript
5632 */
5633 words?: {
5634 /**
5635 * The individual punctuated, properly-cased word from the transcript
5636 */
5637 word: string;
5638 /**
5639 * Confidence that this word was transcribed correctly
5640 */
5641 confidence: number;
5642 }[];
5643 /**
5644 * Confidence that no more speech is coming in this turn
5645 */
5646 end_of_turn_confidence?: number;
5647}
5648export declare abstract class Base_Ai_Cf_Deepgram_Flux {
5649 inputs: Ai_Cf_Deepgram_Flux_Input;
5650 postProcessedOutputs: Ai_Cf_Deepgram_Flux_Output;
5651}
5652export interface Ai_Cf_Deepgram_Aura_2_En_Input {
5653 /**
5654 * Speaker used to produce the audio.
5655 */
5656 speaker?:
5657 | "amalthea"
5658 | "andromeda"
5659 | "apollo"
5660 | "arcas"
5661 | "aries"
5662 | "asteria"
5663 | "athena"
5664 | "atlas"
5665 | "aurora"
5666 | "callista"
5667 | "cora"
5668 | "cordelia"
5669 | "delia"
5670 | "draco"
5671 | "electra"
5672 | "harmonia"
5673 | "helena"
5674 | "hera"
5675 | "hermes"
5676 | "hyperion"
5677 | "iris"
5678 | "janus"
5679 | "juno"
5680 | "jupiter"
5681 | "luna"
5682 | "mars"
5683 | "minerva"
5684 | "neptune"
5685 | "odysseus"
5686 | "ophelia"
5687 | "orion"
5688 | "orpheus"
5689 | "pandora"
5690 | "phoebe"
5691 | "pluto"
5692 | "saturn"
5693 | "thalia"
5694 | "theia"
5695 | "vesta"
5696 | "zeus";
5697 /**
5698 * Encoding of the output audio.
5699 */
5700 encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
5701 /**
5702 * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
5703 */
5704 container?: "none" | "wav" | "ogg";
5705 /**
5706 * The text content to be converted to speech
5707 */
5708 text: string;
5709 /**
5710 * 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
5711 */
5712 sample_rate?: number;
5713 /**
5714 * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
5715 */
5716 bit_rate?: number;
5717}
5718/**
5719 * The generated audio in MP3 format
5720 */
5721export type Ai_Cf_Deepgram_Aura_2_En_Output = string;
5722export declare abstract class Base_Ai_Cf_Deepgram_Aura_2_En {
5723 inputs: Ai_Cf_Deepgram_Aura_2_En_Input;
5724 postProcessedOutputs: Ai_Cf_Deepgram_Aura_2_En_Output;
5725}
5726export interface Ai_Cf_Deepgram_Aura_2_Es_Input {
5727 /**
5728 * Speaker used to produce the audio.
5729 */
5730 speaker?:
5731 | "sirio"
5732 | "nestor"
5733 | "carina"
5734 | "celeste"
5735 | "alvaro"
5736 | "diana"
5737 | "aquila"
5738 | "selena"
5739 | "estrella"
5740 | "javier";
5741 /**
5742 * Encoding of the output audio.
5743 */
5744 encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
5745 /**
5746 * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
5747 */
5748 container?: "none" | "wav" | "ogg";
5749 /**
5750 * The text content to be converted to speech
5751 */
5752 text: string;
5753 /**
5754 * 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
5755 */
5756 sample_rate?: number;
5757 /**
5758 * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
5759 */
5760 bit_rate?: number;
5761}
5762/**
5763 * The generated audio in MP3 format
5764 */
5765export type Ai_Cf_Deepgram_Aura_2_Es_Output = string;
5766export declare abstract class Base_Ai_Cf_Deepgram_Aura_2_Es {
5767 inputs: Ai_Cf_Deepgram_Aura_2_Es_Input;
5768 postProcessedOutputs: Ai_Cf_Deepgram_Aura_2_Es_Output;
5769}
5770export interface Ai_Cf_Black_Forest_Labs_Flux_2_Dev_Input {
5771 multipart: {
5772 body?: object;
5773 contentType?: string;
5774 };
5775}
5776export interface Ai_Cf_Black_Forest_Labs_Flux_2_Dev_Output {
5777 /**
5778 * Generated image as Base64 string.
5779 */
5780 image?: string;
5781}
5782export declare abstract class Base_Ai_Cf_Black_Forest_Labs_Flux_2_Dev {
5783 inputs: Ai_Cf_Black_Forest_Labs_Flux_2_Dev_Input;
5784 postProcessedOutputs: Ai_Cf_Black_Forest_Labs_Flux_2_Dev_Output;
5785}
5786export interface Ai_Cf_Black_Forest_Labs_Flux_2_Klein_4B_Input {
5787 multipart: {
5788 body?: object;
5789 contentType?: string;
5790 };
5791}
5792export interface Ai_Cf_Black_Forest_Labs_Flux_2_Klein_4B_Output {
5793 /**
5794 * Generated image as Base64 string.
5795 */
5796 image?: string;
5797}
5798export declare abstract class Base_Ai_Cf_Black_Forest_Labs_Flux_2_Klein_4B {
5799 inputs: Ai_Cf_Black_Forest_Labs_Flux_2_Klein_4B_Input;
5800 postProcessedOutputs: Ai_Cf_Black_Forest_Labs_Flux_2_Klein_4B_Output;
5801}
5802export interface Ai_Cf_Black_Forest_Labs_Flux_2_Klein_9B_Input {
5803 multipart: {
5804 body?: object;
5805 contentType?: string;
5806 };
5807}
5808export interface Ai_Cf_Black_Forest_Labs_Flux_2_Klein_9B_Output {
5809 /**
5810 * Generated image as Base64 string.
5811 */
5812 image?: string;
5813}
5814export declare abstract class Base_Ai_Cf_Black_Forest_Labs_Flux_2_Klein_9B {
5815 inputs: Ai_Cf_Black_Forest_Labs_Flux_2_Klein_9B_Input;
5816 postProcessedOutputs: Ai_Cf_Black_Forest_Labs_Flux_2_Klein_9B_Output;
5817}
5818export declare abstract class Base_Ai_Cf_Zai_Org_Glm_4_7_Flash {
5819 inputs: ChatCompletionsInput;
5820 postProcessedOutputs: ChatCompletionsOutput;
5821}
5822export declare abstract class Base_Ai_Cf_Moonshotai_Kimi_K2_5 {
5823 inputs: ChatCompletionsInput;
5824 postProcessedOutputs: ChatCompletionsOutput;
5825}
5826export declare abstract class Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B {
5827 inputs: ChatCompletionsInput;
5828 postProcessedOutputs: ChatCompletionsOutput;
5829}
5830export declare abstract class Base_Ai_Cf_Google_Gemma_4_26B_A4B_IT {
5831 inputs: ChatCompletionsInput;
5832 postProcessedOutputs: ChatCompletionsOutput;
5833}
5834export interface AiModels {
5835 "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
5836 "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
5837 "@cf/runwayml/stable-diffusion-v1-5-inpainting": BaseAiTextToImage;
5838 "@cf/runwayml/stable-diffusion-v1-5-img2img": BaseAiTextToImage;
5839 "@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage;
5840 "@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage;
5841 "@cf/myshell-ai/melotts": BaseAiTextToSpeech;
5842 "@cf/google/embeddinggemma-300m": BaseAiTextEmbeddings;
5843 "@cf/microsoft/resnet-50": BaseAiImageClassification;
5844 "@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration;
5845 "@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration;
5846 "@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration;
5847 "@hf/thebloke/llama-2-13b-chat-awq": BaseAiTextGeneration;
5848 "@hf/thebloke/mistral-7b-instruct-v0.1-awq": BaseAiTextGeneration;
5849 "@hf/thebloke/zephyr-7b-beta-awq": BaseAiTextGeneration;
5850 "@hf/thebloke/openhermes-2.5-mistral-7b-awq": BaseAiTextGeneration;
5851 "@hf/thebloke/neural-chat-7b-v3-1-awq": BaseAiTextGeneration;
5852 "@hf/thebloke/deepseek-coder-6.7b-base-awq": BaseAiTextGeneration;
5853 "@hf/thebloke/deepseek-coder-6.7b-instruct-awq": BaseAiTextGeneration;
5854 "@cf/deepseek-ai/deepseek-math-7b-instruct": BaseAiTextGeneration;
5855 "@cf/defog/sqlcoder-7b-2": BaseAiTextGeneration;
5856 "@cf/openchat/openchat-3.5-0106": BaseAiTextGeneration;
5857 "@cf/tiiuae/falcon-7b-instruct": BaseAiTextGeneration;
5858 "@cf/thebloke/discolm-german-7b-v1-awq": BaseAiTextGeneration;
5859 "@cf/qwen/qwen1.5-0.5b-chat": BaseAiTextGeneration;
5860 "@cf/qwen/qwen1.5-7b-chat-awq": BaseAiTextGeneration;
5861 "@cf/qwen/qwen1.5-14b-chat-awq": BaseAiTextGeneration;
5862 "@cf/tinyllama/tinyllama-1.1b-chat-v1.0": BaseAiTextGeneration;
5863 "@cf/microsoft/phi-2": BaseAiTextGeneration;
5864 "@cf/qwen/qwen1.5-1.8b-chat": BaseAiTextGeneration;
5865 "@cf/mistral/mistral-7b-instruct-v0.2-lora": BaseAiTextGeneration;
5866 "@hf/nousresearch/hermes-2-pro-mistral-7b": BaseAiTextGeneration;
5867 "@hf/nexusflow/starling-lm-7b-beta": BaseAiTextGeneration;
5868 "@hf/google/gemma-7b-it": BaseAiTextGeneration;
5869 "@cf/meta-llama/llama-2-7b-chat-hf-lora": BaseAiTextGeneration;
5870 "@cf/google/gemma-2b-it-lora": BaseAiTextGeneration;
5871 "@cf/google/gemma-7b-it-lora": BaseAiTextGeneration;
5872 "@hf/mistral/mistral-7b-instruct-v0.2": BaseAiTextGeneration;
5873 "@cf/meta/llama-3-8b-instruct": BaseAiTextGeneration;
5874 "@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration;
5875 "@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration;
5876 "@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration;
5877 "@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration;
5878 "@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration;
5879 "@cf/meta/llama-3.2-1b-instruct": BaseAiTextGeneration;
5880 "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": BaseAiTextGeneration;
5881 "@cf/ibm-granite/granite-4.0-h-micro": BaseAiTextGeneration;
5882 "@cf/facebook/bart-large-cnn": BaseAiSummarization;
5883 "@cf/llava-hf/llava-1.5-7b-hf": BaseAiImageToText;
5884 "@cf/baai/bge-base-en-v1.5": Base_Ai_Cf_Baai_Bge_Base_En_V1_5;
5885 "@cf/openai/whisper": Base_Ai_Cf_Openai_Whisper;
5886 "@cf/meta/m2m100-1.2b": Base_Ai_Cf_Meta_M2M100_1_2B;
5887 "@cf/baai/bge-small-en-v1.5": Base_Ai_Cf_Baai_Bge_Small_En_V1_5;
5888 "@cf/baai/bge-large-en-v1.5": Base_Ai_Cf_Baai_Bge_Large_En_V1_5;
5889 "@cf/unum/uform-gen2-qwen-500m": Base_Ai_Cf_Unum_Uform_Gen2_Qwen_500M;
5890 "@cf/openai/whisper-tiny-en": Base_Ai_Cf_Openai_Whisper_Tiny_En;
5891 "@cf/openai/whisper-large-v3-turbo": Base_Ai_Cf_Openai_Whisper_Large_V3_Turbo;
5892 "@cf/baai/bge-m3": Base_Ai_Cf_Baai_Bge_M3;
5893 "@cf/black-forest-labs/flux-1-schnell": Base_Ai_Cf_Black_Forest_Labs_Flux_1_Schnell;
5894 "@cf/meta/llama-3.2-11b-vision-instruct": Base_Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct;
5895 "@cf/meta/llama-3.3-70b-instruct-fp8-fast": Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast;
5896 "@cf/meta/llama-guard-3-8b": Base_Ai_Cf_Meta_Llama_Guard_3_8B;
5897 "@cf/baai/bge-reranker-base": Base_Ai_Cf_Baai_Bge_Reranker_Base;
5898 "@cf/qwen/qwen2.5-coder-32b-instruct": Base_Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct;
5899 "@cf/qwen/qwq-32b": Base_Ai_Cf_Qwen_Qwq_32B;
5900 "@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct;
5901 "@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It;
5902 "@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
5903 "@cf/qwen/qwen3-30b-a3b-fp8": Base_Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8;
5904 "@cf/deepgram/nova-3": Base_Ai_Cf_Deepgram_Nova_3;
5905 "@cf/qwen/qwen3-embedding-0.6b": Base_Ai_Cf_Qwen_Qwen3_Embedding_0_6B;
5906 "@cf/pipecat-ai/smart-turn-v2": Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2;
5907 "@cf/openai/gpt-oss-120b": Base_Ai_Cf_Openai_Gpt_Oss_120B;
5908 "@cf/openai/gpt-oss-20b": Base_Ai_Cf_Openai_Gpt_Oss_20B;
5909 "@cf/leonardo/phoenix-1.0": Base_Ai_Cf_Leonardo_Phoenix_1_0;
5910 "@cf/leonardo/lucid-origin": Base_Ai_Cf_Leonardo_Lucid_Origin;
5911 "@cf/deepgram/aura-1": Base_Ai_Cf_Deepgram_Aura_1;
5912 "@cf/ai4bharat/indictrans2-en-indic-1B": Base_Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B;
5913 "@cf/aisingapore/gemma-sea-lion-v4-27b-it": Base_Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It;
5914 "@cf/pfnet/plamo-embedding-1b": Base_Ai_Cf_Pfnet_Plamo_Embedding_1B;
5915 "@cf/deepgram/flux": Base_Ai_Cf_Deepgram_Flux;
5916 "@cf/deepgram/aura-2-en": Base_Ai_Cf_Deepgram_Aura_2_En;
5917 "@cf/deepgram/aura-2-es": Base_Ai_Cf_Deepgram_Aura_2_Es;
5918 "@cf/black-forest-labs/flux-2-dev": Base_Ai_Cf_Black_Forest_Labs_Flux_2_Dev;
5919 "@cf/black-forest-labs/flux-2-klein-4b": Base_Ai_Cf_Black_Forest_Labs_Flux_2_Klein_4B;
5920 "@cf/black-forest-labs/flux-2-klein-9b": Base_Ai_Cf_Black_Forest_Labs_Flux_2_Klein_9B;
5921 "@cf/zai-org/glm-4.7-flash": Base_Ai_Cf_Zai_Org_Glm_4_7_Flash;
5922 "@cf/moonshotai/kimi-k2.5": Base_Ai_Cf_Moonshotai_Kimi_K2_5;
5923 "@cf/nvidia/nemotron-3-120b-a12b": Base_Ai_Cf_Nvidia_Nemotron_3_120B_A12B;
5924}
5925export type AiOptions = {
5926 /**
5927 * Send requests as an asynchronous batch job, only works for supported models
5928 * https://developers.cloudflare.com/workers-ai/features/batch-api
5929 */
5930 queueRequest?: boolean;
5931 /**
5932 * Establish websocket connections, only works for supported models
5933 */
5934 websocket?: boolean;
5935 /**
5936 * Tag your requests to group and view them in Cloudflare dashboard.
5937 *
5938 * Rules:
5939 * Tags must only contain letters, numbers, and the symbols: : - . / @
5940 * Each tag can have maximum 50 characters.
5941 * Maximum 5 tags are allowed each request.
5942 * Duplicate tags will removed.
5943 */
5944 tags?: string[];
5945 gateway?: GatewayOptions;
5946 returnRawResponse?: boolean;
5947 prefix?: string;
5948 extraHeaders?: object;
5949 signal?: AbortSignal;
5950};
5951export type AiModelsSearchParams = {
5952 author?: string;
5953 hide_experimental?: boolean;
5954 page?: number;
5955 per_page?: number;
5956 search?: string;
5957 source?: number;
5958 task?: string;
5959};
5960export type AiModelsSearchObject = {
5961 id: string;
5962 source: number;
5963 name: string;
5964 description: string;
5965 task: {
5966 id: string;
5967 name: string;
5968 description: string;
5969 };
5970 tags: string[];
5971 properties: {
5972 property_id: string;
5973 value: string;
5974 }[];
5975};
5976export type ChatCompletionsBase = XOR<ChatCompletionsPromptInput, ChatCompletionsMessagesInput>;
5977export type ChatCompletionsInput = XOR<
5978 ChatCompletionsBase,
5979 {
5980 requests: ChatCompletionsBase[];
5981 }
5982>;
5983export interface InferenceUpstreamError extends Error {}
5984export interface AiInternalError extends Error {}
5985export type AiModelListType = Record<string, any>;
5986export type AiAsyncBatchResponse = { request_id: string };
5987export declare abstract class Ai<
5988 AiModelList extends AiModelListType = AiModels,
5989> {
5990 aiGatewayLogId: string | null;
5991 gateway(gatewayId: string): AiGateway;
5992 
5993 /**
5994 * @deprecated Use the standalone `ai_search_namespaces` or `ai_search` Workers bindings instead.
5995 * See https://developers.cloudflare.com/ai-search/usage/workers-binding/
5996 */
5997 aiSearch(): AiSearchNamespace;
5998 
5999 /**
6000 * @deprecated AutoRAG has been replaced by AI Search.
6001 * Use the standalone `ai_search_namespaces` or `ai_search` Workers bindings instead.
6002 * See https://developers.cloudflare.com/ai-search/usage/workers-binding/
6003 *
6004 * @param autoragId Instance ID
6005 */
6006 autorag(autoragId: string): AutoRAG;
6007 
6008 // Batch request
6009 run<Name extends keyof AiModelList>(
6010 model: Name,
6011 inputs: { requests: AiModelList[Name]['inputs'][] },
6012 options: AiOptions & { queueRequest: true }
6013 ): Promise<AiAsyncBatchResponse>;
6014 
6015 // Raw response
6016 run<Name extends keyof AiModelList>(
6017 model: Name,
6018 inputs: AiModelList[Name]['inputs'],
6019 options: AiOptions & { returnRawResponse: true }
6020 ): Promise<Response>;
6021 
6022 // WebSocket
6023 run<Name extends keyof AiModelList>(
6024 model: Name,
6025 inputs: AiModelList[Name]['inputs'],
6026 options: AiOptions & { websocket: true }
6027 ): Promise<Response>;
6028 
6029 // Streaming
6030 run<Name extends keyof AiModelList>(
6031 model: Name,
6032 inputs: AiModelList[Name]['inputs'] & { stream: true },
6033 options?: AiOptions
6034 ): Promise<ReadableStream>;
6035 
6036 // Normal (default) - known model
6037 run<Name extends keyof AiModelList>(
6038 model: Name,
6039 inputs: AiModelList[Name]['inputs'],
6040 options?: AiOptions
6041 ): Promise<AiModelList[Name]['postProcessedOutputs']>;
6042 
6043 // Unknown model (gateway fallback)
6044 run(
6045 model: string & {},
6046 inputs: Record<string, unknown>,
6047 options?: AiOptions
6048 ): Promise<Record<string, unknown>>;
6049 
6050 models(params?: AiModelsSearchParams): Promise<AiModelsSearchObject[]>;
6051 toMarkdown(): ToMarkdownService;
6052 toMarkdown(
6053 files: MarkdownDocument[],
6054 options?: ConversionRequestOptions,
6055 ): Promise<ConversionResponse[]>;
6056 toMarkdown(
6057 files: MarkdownDocument,
6058 options?: ConversionRequestOptions,
6059 ): Promise<ConversionResponse>;
6060}