import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as AIAPI from 'cloudflare/resources/workers/ai';
import { type Uploadable } from 'cloudflare/core';
export declare class AI extends APIResource {
    /**
     * This endpoint provides users with the capability to run specific AI models
     * on-demand.
     *
     * By submitting the required input data, users can receive real-time predictions
     * or results generated by the chosen AI model. The endpoint supports various AI
     * model types, ensuring flexibility and adaptability for diverse use cases.
     *
     * Model specific inputs available in
     * [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
     */
    run(modelName: string, params: AIRunParams, options?: Core.RequestOptions): Core.APIPromise<AIRunResponse>;
}
export type AIRunResponse = Array<AIRunResponse.TextClassification> | Uploadable | Array<number> | AIRunResponse.TextEmbeddings | AIRunResponse.SpeechRecognition | Array<AIRunResponse.ImageClassification> | Array<AIRunResponse.ObjectDetection> | AIRunResponse.Response | Uploadable | AIRunResponse.Translation | AIRunResponse.Summarization | AIRunResponse.ImageToText;
export declare namespace AIRunResponse {
    interface TextClassification {
        label?: string;
        score?: number;
    }
    interface TextEmbeddings {
        data?: Array<Array<number>>;
        shape?: Array<number>;
    }
    interface SpeechRecognition {
        text: string;
        word_count?: number;
        words?: Array<SpeechRecognition.Word>;
    }
    namespace SpeechRecognition {
        interface Word {
            end?: number;
            start?: number;
            word?: string;
        }
    }
    interface ImageClassification {
        label?: string;
        score?: number;
    }
    interface ObjectDetection {
        box?: ObjectDetection.Box;
        label?: string;
        score?: number;
    }
    namespace ObjectDetection {
        interface Box {
            xmax?: number;
            xmin?: number;
            ymax?: number;
            ymin?: number;
        }
    }
    interface Response {
        response?: string;
    }
    interface Translation {
        translated_text?: string;
    }
    interface Summarization {
        summary?: string;
    }
    interface ImageToText {
        description?: string;
    }
}
export interface AIRunParams {
    /**
     * Path param:
     */
    account_id: string;
    /**
     * Body param:
     */
    body: AIRunParams.TextClassification | AIRunParams.TextToImage | AIRunParams.SentenceSimilarity | AIRunParams.TextEmbeddings | Uploadable | AIRunParams.Audio | Uploadable | AIRunParams.Image | Uploadable | AIRunParams.Image | AIRunParams.UnionMember10 | AIRunParams.UnionMember11 | AIRunParams.Translation | AIRunParams.Summarization | Uploadable | AIRunParams.UnionMember15;
}
export declare namespace AIRunParams {
    interface TextClassification {
        text: string;
    }
    interface TextToImage {
        prompt: string;
        guidance?: number;
        image?: Array<number>;
        mask?: Array<number>;
        num_steps?: number;
        strength?: number;
    }
    interface SentenceSimilarity {
        sentences: Array<string>;
        source: string;
    }
    interface TextEmbeddings {
        text: string | Array<string>;
    }
    interface Audio {
        audio?: Array<number>;
    }
    interface Image {
        image?: Array<number>;
    }
    interface Image {
        image?: Array<number>;
    }
    interface UnionMember10 {
        prompt: string;
        max_tokens?: number;
        raw?: boolean;
        stream?: boolean;
    }
    interface UnionMember11 {
        messages: Array<UnionMember11.Message>;
        max_tokens?: number;
        stream?: boolean;
    }
    namespace UnionMember11 {
        interface Message {
            content: string;
            role: string;
        }
    }
    interface Translation {
        target_lang: string;
        text: string;
        source_lang?: string;
    }
    interface Summarization {
        input_text: string;
        max_length?: number;
    }
    interface UnionMember15 {
        image?: Array<number>;
        max_tokens?: number;
        prompt?: string;
    }
}
export declare namespace AI {
    export import AIRunResponse = AIAPI.AIRunResponse;
    export import AIRunParams = AIAPI.AIRunParams;
}
//# sourceMappingURL=ai.d.ts.map