import { APIResource } from "../../core/resource.js";
import * as AuthorsAPI from "./authors.js";
import { AuthorListParams, AuthorListResponse, AuthorListResponsesSinglePage, Authors, BaseAuthors } from "./authors.js";
import * as TasksAPI from "./tasks.js";
import { BaseTasks, TaskListParams, TaskListResponse, TaskListResponsesSinglePage, Tasks } from "./tasks.js";
import * as ToMarkdownAPI from "./to-markdown.js";
import { BaseToMarkdown, ToMarkdown, ToMarkdownSupportedParams, ToMarkdownSupportedResponse, ToMarkdownSupportedResponsesSinglePage, ToMarkdownTransformParams, ToMarkdownTransformResponse, ToMarkdownTransformResponsesSinglePage } from "./to-markdown.js";
import * as FinetunesAPI from "./finetunes/finetunes.js";
import { BaseFinetunes, FinetuneCreateParams, FinetuneCreateResponse, FinetuneListParams, FinetuneListResponse, Finetunes } from "./finetunes/finetunes.js";
import * as ModelsAPI from "./models/models.js";
import { BaseModels, ModelListParams, ModelListResponse, ModelListResponsesV4PagePaginationArray, Models } from "./models/models.js";
import { APIPromise } from "../../core/api-promise.js";
import { type Uploadable } from "../../core/uploads.js";
import { RequestOptions } from "../../internal/request-options.js";
export declare class BaseAI extends APIResource {
    static readonly _key: readonly ['ai'];
    /**
     * Runs the Workers AI model specified in the URL path. Send the model's inputs
     * directly in the request body, without a model/input/options wrapper.
     *
     * Accepts model-specific JSON or binary input. The response format depends on the
     * model and the requested output.
     *
     * See the [model catalog](https://developers.cloudflare.com/workers-ai/models/)
     * for supported models and their input formats.
     */
    run(modelName: string, params: AIRunParams, options?: RequestOptions): APIPromise<AIRunResponse>;
}
export declare class AI extends BaseAI {
    finetunes: FinetunesAPI.Finetunes;
    authors: AuthorsAPI.Authors;
    tasks: TasksAPI.Tasks;
    models: ModelsAPI.Models;
    toMarkdown: ToMarkdownAPI.ToMarkdown;
}
/**
 * An array of classification results for the input text
 */
export type AIRunResponse = Array<AIRunResponse.TextClassification> | Uploadable | AIRunResponse.Audio | Uploadable | AIRunResponse.TextEmbeddings | AIRunResponse.AutomaticSpeechRecognition | Array<AIRunResponse.ImageClassification> | Array<AIRunResponse.ObjectDetection> | AIRunResponse.UnionMember8 | Uploadable | AIRunResponse.Translation | AIRunResponse.Summarization | AIRunResponse.ImageToText | AIRunResponse.ImageTextToText | AIRunResponse.MultimodalEmbeddings;
export declare namespace AIRunResponse {
    interface TextClassification {
        /**
         * The classification label assigned to the text (e.g., 'POSITIVE' or 'NEGATIVE')
         */
        label?: string;
        /**
         * Confidence score indicating the likelihood that the text belongs to the
         * specified label
         */
        score?: number;
    }
    interface Audio {
        /**
         * The generated audio in MP3 format, base64-encoded
         */
        audio?: string;
    }
    interface TextEmbeddings {
        /**
         * Embeddings of the requested text values
         */
        data?: Array<Array<number>>;
        shape?: Array<number>;
    }
    interface AutomaticSpeechRecognition {
        /**
         * The transcription
         */
        text: string;
        vtt?: string;
        word_count?: number;
        words?: Array<AutomaticSpeechRecognition.Word>;
    }
    namespace AutomaticSpeechRecognition {
        interface Word {
            /**
             * The ending second when the word completes
             */
            end?: number;
            /**
             * The second this word begins in the recording
             */
            start?: number;
            word?: string;
        }
    }
    interface ImageClassification {
        /**
         * The predicted category or class for the input image based on analysis
         */
        label?: string;
        /**
         * A confidence value, between 0 and 1, indicating how certain the model is about
         * the predicted label
         */
        score?: number;
    }
    interface ObjectDetection {
        /**
         * Coordinates defining the bounding box around the detected object
         */
        box?: ObjectDetection.Box;
        /**
         * The class label or name of the detected object
         */
        label?: string;
        /**
         * Confidence score indicating the likelihood that the detection is correct
         */
        score?: number;
    }
    namespace ObjectDetection {
        /**
         * Coordinates defining the bounding box around the detected object
         */
        interface Box {
            /**
             * The x-coordinate of the bottom-right corner of the bounding box
             */
            xmax?: number;
            /**
             * The x-coordinate of the top-left corner of the bounding box
             */
            xmin?: number;
            /**
             * The y-coordinate of the bottom-right corner of the bounding box
             */
            ymax?: number;
            /**
             * The y-coordinate of the top-left corner of the bounding box
             */
            ymin?: number;
        }
    }
    interface UnionMember8 {
        /**
         * The generated text response from the model
         */
        response: string;
        /**
         * An array of tool calls requests made during the response generation
         */
        tool_calls?: Array<UnionMember8.ToolCall>;
        /**
         * Usage statistics for the inference request
         */
        usage?: UnionMember8.Usage;
    }
    namespace UnionMember8 {
        interface ToolCall {
            /**
             * The arguments passed to be passed to the tool call request
             */
            arguments?: unknown;
            /**
             * The name of the tool to be called
             */
            name?: string;
        }
        /**
         * Usage statistics for the inference request
         */
        interface Usage {
            /**
             * Total number of tokens in output
             */
            completion_tokens?: number;
            /**
             * Total number of tokens in input
             */
            prompt_tokens?: number;
            /**
             * Total number of input and output tokens
             */
            total_tokens?: number;
        }
    }
    interface Translation {
        /**
         * The translated text in the target language
         */
        translated_text?: string;
    }
    interface Summarization {
        /**
         * The summarized version of the input text
         */
        summary?: string;
    }
    interface ImageToText {
        description?: string;
    }
    interface ImageTextToText {
        description?: string;
    }
    interface MultimodalEmbeddings {
        data?: Array<Array<number>>;
        shape?: Array<number>;
    }
}
export type AIRunParams = AIRunParams.TextClassification | AIRunParams.TextToImage | AIRunParams.TextToSpeech | AIRunParams.TextEmbeddings | AIRunParams.AutomaticSpeechRecognition | AIRunParams.ImageClassification | AIRunParams.ObjectDetection | AIRunParams.Prompt | AIRunParams.Messages | AIRunParams.Translation | AIRunParams.Summarization | AIRunParams.ImageToText | AIRunParams.Variant12 | AIRunParams.Variant13 | AIRunParams.MultimodalEmbeddings;
export declare namespace AIRunParams {
    interface TextClassification {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: The text that you want to classify
         */
        text: string;
    }
    interface TextToImage {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: A text description of the image you want to generate
         */
        prompt: string;
        /**
         * Body param: Controls how closely the generated image should adhere to the
         * prompt; higher values make the image more aligned with the prompt
         */
        guidance?: number;
        /**
         * Body param: The height of the generated image in pixels
         */
        height?: number;
        /**
         * Body param: For use with img2img tasks. An array of integers that represent the
         * image data constrained to 8-bit unsigned integer values
         */
        image?: Array<number>;
        /**
         * Body param: For use with img2img tasks. A base64-encoded string of the input
         * image
         */
        image_b64?: string;
        /**
         * Body param: An array representing An array of integers that represent mask image
         * data for inpainting constrained to 8-bit unsigned integer values
         */
        mask?: Array<number>;
        /**
         * Body param: Text describing elements to avoid in the generated image
         */
        negative_prompt?: string;
        /**
         * Body param: The number of diffusion steps; higher values can improve quality but
         * take longer
         */
        num_steps?: number;
        /**
         * Body param: Random seed for reproducibility of the image generation
         */
        seed?: number;
        /**
         * Body param: A value between 0 and 1 indicating how strongly to apply the
         * transformation during img2img tasks; lower values make the output closer to the
         * input image
         */
        strength?: number;
        /**
         * Body param: The width of the generated image in pixels
         */
        width?: number;
    }
    interface TextToSpeech {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: A text description of the audio you want to generate
         */
        prompt: string;
        /**
         * Body param: The speech language (e.g., 'en' for English, 'fr' for French).
         * Defaults to 'en' if not specified
         */
        lang?: string;
    }
    interface TextEmbeddings {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: The text to embed
         */
        text: string | Array<string>;
    }
    interface AutomaticSpeechRecognition {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: An array of integers that represent the audio data constrained to
         * 8-bit unsigned integer values
         */
        audio: Array<number>;
        /**
         * Body param: The language of the recorded audio
         */
        source_lang?: string;
        /**
         * Body param: The language to translate the transcription into. Currently only
         * English is supported.
         */
        target_lang?: string;
    }
    interface ImageClassification {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: An array of integers that represent the image data constrained to
         * 8-bit unsigned integer values
         */
        image: Array<number>;
    }
    interface ObjectDetection {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: An array of integers that represent the image data constrained to
         * 8-bit unsigned integer values
         */
        image?: Array<number>;
    }
    interface Prompt {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: The input text prompt for the model to generate a response.
         */
        prompt: string;
        /**
         * Body param: Decreases the likelihood of the model repeating the same lines
         * verbatim.
         */
        frequency_penalty?: number;
        /**
         * Body param: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base
         * model.
         */
        lora?: string;
        /**
         * Body param: The maximum number of tokens to generate in the response.
         */
        max_tokens?: number;
        /**
         * Body param: Increases the likelihood of the model introducing new topics.
         */
        presence_penalty?: number;
        /**
         * Body param: If true, a chat template is not applied and you must adhere to the
         * specific model's expected formatting.
         */
        raw?: boolean;
        /**
         * Body param: Penalty for repeated tokens; higher values discourage repetition.
         */
        repetition_penalty?: number;
        /**
         * Body param
         */
        response_format?: Prompt.ResponseFormat;
        /**
         * Body param: Random seed for reproducibility of the generation.
         */
        seed?: number;
        /**
         * Body param: If true, the response will be streamed back incrementally using SSE,
         * Server Sent Events.
         */
        stream?: boolean;
        /**
         * Body param: Controls the randomness of the output; higher values produce more
         * random results.
         */
        temperature?: number;
        /**
         * Body param: 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.
         */
        top_k?: number;
        /**
         * Body param: 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.
         */
        top_p?: number;
    }
    namespace Prompt {
        interface ResponseFormat {
            json_schema?: unknown;
            type?: 'json_object' | 'json_schema';
        }
    }
    interface Messages {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: An array of message objects representing the conversation history.
         */
        messages: Array<Messages.Message>;
        /**
         * Body param: Decreases the likelihood of the model repeating the same lines
         * verbatim.
         */
        frequency_penalty?: number;
        /**
         * Body param
         */
        functions?: Array<Messages.Function>;
        /**
         * Body param: The maximum number of tokens to generate in the response.
         */
        max_tokens?: number;
        /**
         * Body param: Increases the likelihood of the model introducing new topics.
         */
        presence_penalty?: number;
        /**
         * Body param: If true, a chat template is not applied and you must adhere to the
         * specific model's expected formatting.
         */
        raw?: boolean;
        /**
         * Body param: Penalty for repeated tokens; higher values discourage repetition.
         */
        repetition_penalty?: number;
        /**
         * Body param
         */
        response_format?: Messages.ResponseFormat;
        /**
         * Body param: Random seed for reproducibility of the generation.
         */
        seed?: number;
        /**
         * Body param: If true, the response will be streamed back incrementally using SSE,
         * Server Sent Events.
         */
        stream?: boolean;
        /**
         * Body param: Controls the randomness of the output; higher values produce more
         * random results.
         */
        temperature?: number;
        /**
         * Body param: A list of tools available for the assistant to use.
         */
        tools?: Array<Messages.UnionMember0 | Messages.Function>;
        /**
         * Body param: 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.
         */
        top_k?: number;
        /**
         * Body param: 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.
         */
        top_p?: number;
    }
    namespace Messages {
        interface Message {
            /**
             * The content of the message as a string.
             */
            content: string | Array<Message.UnionMember1>;
            /**
             * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
             */
            role: string;
        }
        namespace Message {
            interface UnionMember1 {
                /**
                 * Text content
                 */
                text?: string;
                /**
                 * Type of the content (text)
                 */
                type?: string;
            }
        }
        interface Function {
            code: string;
            name: string;
        }
        interface ResponseFormat {
            json_schema?: unknown;
            type?: 'json_object' | 'json_schema';
        }
        interface UnionMember0 {
            /**
             * A brief description of what the tool does.
             */
            description: string;
            /**
             * The name of the tool. More descriptive the better.
             */
            name: string;
            /**
             * Schema defining the parameters accepted by the tool.
             */
            parameters: UnionMember0.Parameters;
        }
        namespace UnionMember0 {
            /**
             * Schema defining the parameters accepted by the tool.
             */
            interface Parameters {
                /**
                 * Definitions of each parameter.
                 */
                properties: {
                    [key: string]: Parameters.Properties;
                };
                /**
                 * The type of the parameters object (usually 'object').
                 */
                type: string;
                /**
                 * List of required parameter names.
                 */
                required?: Array<string>;
            }
            namespace Parameters {
                interface Properties {
                    /**
                     * A description of the expected parameter.
                     */
                    description: string;
                    /**
                     * The data type of the parameter.
                     */
                    type: string;
                }
            }
        }
        interface Function {
            /**
             * Details of the function tool.
             */
            function: Function.Function;
            /**
             * Specifies the type of tool (e.g., 'function').
             */
            type: string;
        }
        namespace Function {
            /**
             * Details of the function tool.
             */
            interface Function {
                /**
                 * A brief description of what the function does.
                 */
                description: string;
                /**
                 * The name of the function.
                 */
                name: string;
                /**
                 * Schema defining the parameters accepted by the function.
                 */
                parameters: Function.Parameters;
            }
            namespace Function {
                /**
                 * Schema defining the parameters accepted by the function.
                 */
                interface Parameters {
                    /**
                     * Definitions of each parameter.
                     */
                    properties: {
                        [key: string]: Parameters.Properties;
                    };
                    /**
                     * The type of the parameters object (usually 'object').
                     */
                    type: string;
                    /**
                     * List of required parameter names.
                     */
                    required?: Array<string>;
                }
                namespace Parameters {
                    interface Properties {
                        /**
                         * A description of the expected parameter.
                         */
                        description: string;
                        /**
                         * The data type of the parameter.
                         */
                        type: string;
                    }
                }
            }
        }
    }
    interface Translation {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: The language code to translate the text into (e.g., 'es' for
         * Spanish)
         */
        target_lang: string;
        /**
         * Body param: The text to be translated
         */
        text: string;
        /**
         * Body param: The language code of the source text (e.g., 'en' for English).
         * Defaults to 'en' if not specified
         */
        source_lang?: string;
    }
    interface Summarization {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: The text that you want the model to summarize
         */
        input_text: string;
        /**
         * Body param: The maximum length of the generated summary in tokens
         */
        max_length?: number;
    }
    interface ImageToText {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: An array of integers that represent the image data constrained to
         * 8-bit unsigned integer values
         */
        image: Array<number>;
        /**
         * Body param: Decreases the likelihood of the model repeating the same lines
         * verbatim.
         */
        frequency_penalty?: number;
        /**
         * Body param: The maximum number of tokens to generate in the response.
         */
        max_tokens?: number;
        /**
         * Body param: Increases the likelihood of the model introducing new topics.
         */
        presence_penalty?: number;
        /**
         * Body param: The input text prompt for the model to generate a response.
         */
        prompt?: string;
        /**
         * Body param: If true, a chat template is not applied and you must adhere to the
         * specific model's expected formatting.
         */
        raw?: boolean;
        /**
         * Body param: Penalty for repeated tokens; higher values discourage repetition.
         */
        repetition_penalty?: number;
        /**
         * Body param: Random seed for reproducibility of the generation.
         */
        seed?: number;
        /**
         * Body param: Controls the randomness of the output; higher values produce more
         * random results.
         */
        temperature?: number;
        /**
         * Body param: 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.
         */
        top_k?: number;
        /**
         * Body param: 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.
         */
        top_p?: number;
    }
    interface Variant12 {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: Image in base64 encoded format.
         */
        image: string;
        /**
         * Body param: The input text prompt for the model to generate a response.
         */
        prompt: string;
        /**
         * Body param: Decreases the likelihood of the model repeating the same lines
         * verbatim.
         */
        frequency_penalty?: number;
        /**
         * Body param: Whether to ignore the EOS token and continue generating tokens after
         * the EOS token is generated.
         */
        ignore_eos?: boolean;
        /**
         * Body param: The maximum number of tokens to generate in the response.
         */
        max_tokens?: number;
        /**
         * Body param: Increases the likelihood of the model introducing new topics.
         */
        presence_penalty?: number;
        /**
         * Body param: Penalty for repeated tokens; higher values discourage repetition.
         */
        repetition_penalty?: number;
        /**
         * Body param: Random seed for reproducibility of the generation.
         */
        seed?: number;
        /**
         * Body param: Controls the randomness of the output; higher values produce more
         * random results.
         */
        temperature?: number;
        /**
         * Body param: 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.
         */
        top_k?: number;
        /**
         * Body param: 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.
         */
        top_p?: number;
    }
    interface Variant13 {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: Image in base64 encoded format.
         */
        image: string;
        /**
         * Body param: An array of message objects representing the conversation history.
         */
        messages: Array<Variant13.Message>;
        /**
         * Body param: Decreases the likelihood of the model repeating the same lines
         * verbatim.
         */
        frequency_penalty?: number;
        /**
         * Body param: Whether to ignore the EOS token and continue generating tokens after
         * the EOS token is generated.
         */
        ignore_eos?: boolean;
        /**
         * Body param: The maximum number of tokens to generate in the response.
         */
        max_tokens?: number;
        /**
         * Body param: Increases the likelihood of the model introducing new topics.
         */
        presence_penalty?: number;
        /**
         * Body param: Penalty for repeated tokens; higher values discourage repetition.
         */
        repetition_penalty?: number;
        /**
         * Body param: Random seed for reproducibility of the generation.
         */
        seed?: number;
        /**
         * Body param: Controls the randomness of the output; higher values produce more
         * random results.
         */
        temperature?: number;
        /**
         * Body param: 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.
         */
        top_k?: number;
        /**
         * Body param: 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.
         */
        top_p?: number;
    }
    namespace Variant13 {
        interface Message {
            /**
             * The content of the message as a string.
             */
            content: string | Array<Message.UnionMember1>;
            /**
             * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
             */
            role: string;
        }
        namespace Message {
            interface UnionMember1 {
                /**
                 * Type of the content part (e.g. 'text', 'image_url').
                 */
                type: string;
                /**
                 * Image URL object (when type is 'image_url').
                 */
                image_url?: UnionMember1.ImageURL;
                /**
                 * Text content (when type is 'text').
                 */
                text?: string;
            }
            namespace UnionMember1 {
                /**
                 * Image URL object (when type is 'image_url').
                 */
                interface ImageURL {
                    /**
                     * Image URI with data (e.g. data:image/jpeg;base64,/9j/...).
                     */
                    url: string;
                }
            }
        }
    }
    interface MultimodalEmbeddings {
        /**
         * Path param: Cloudflare account ID used for this AI model request.
         */
        account_id: string;
        /**
         * Body param: Image in base64 encoded format.
         */
        image?: string;
        /**
         * Body param
         */
        text?: Array<string>;
    }
}
export declare namespace AI {
    export { type AIRunResponse as AIRunResponse, type AIRunParams as AIRunParams };
    export { Finetunes as Finetunes, BaseFinetunes as BaseFinetunes, type FinetuneCreateResponse as FinetuneCreateResponse, type FinetuneListResponse as FinetuneListResponse, type FinetuneCreateParams as FinetuneCreateParams, type FinetuneListParams as FinetuneListParams, };
    export { Authors as Authors, BaseAuthors as BaseAuthors, type AuthorListResponse as AuthorListResponse, type AuthorListResponsesSinglePage as AuthorListResponsesSinglePage, type AuthorListParams as AuthorListParams, };
    export { Tasks as Tasks, BaseTasks as BaseTasks, type TaskListResponse as TaskListResponse, type TaskListResponsesSinglePage as TaskListResponsesSinglePage, type TaskListParams as TaskListParams, };
    export { Models as Models, BaseModels as BaseModels, type ModelListResponse as ModelListResponse, type ModelListResponsesV4PagePaginationArray as ModelListResponsesV4PagePaginationArray, type ModelListParams as ModelListParams, };
    export { ToMarkdown as ToMarkdown, BaseToMarkdown as BaseToMarkdown, type ToMarkdownSupportedResponse as ToMarkdownSupportedResponse, type ToMarkdownTransformResponse as ToMarkdownTransformResponse, type ToMarkdownSupportedResponsesSinglePage as ToMarkdownSupportedResponsesSinglePage, type ToMarkdownTransformResponsesSinglePage as ToMarkdownTransformResponsesSinglePage, type ToMarkdownSupportedParams as ToMarkdownSupportedParams, type ToMarkdownTransformParams as ToMarkdownTransformParams, };
}
//# sourceMappingURL=ai.d.ts.map