/**
 * Cloudflare AI API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service ai
 */
import * as Schema from "effect/Schema";
import type * as HttpClient from "effect/unstable/http/HttpClient";
import * as API from "../client/api.ts";
import type { Credentials } from "../credentials.ts";
import { type DefaultErrors } from "../errors.ts";
declare const AccountNotFound_base: Schema.Class<AccountNotFound, Schema.TaggedStruct<"AccountNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class AccountNotFound extends AccountNotFound_base {
}
declare const ModelNotFound_base: Schema.Class<ModelNotFound, Schema.TaggedStruct<"ModelNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class ModelNotFound extends ModelNotFound_base {
}
declare const ModelNotSupported_base: Schema.Class<ModelNotSupported, Schema.TaggedStruct<"ModelNotSupported", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class ModelNotSupported extends ModelNotSupported_base {
}
declare const ModelSchemaNotFound_base: Schema.Class<ModelSchemaNotFound, Schema.TaggedStruct<"ModelSchemaNotFound", {
    readonly code: Schema.Number;
    readonly message: Schema.String;
}>, import("effect/Cause").YieldableError>;
export declare class ModelSchemaNotFound extends ModelSchemaNotFound_base {
}
export interface RunAiRequest {
    modelName: string;
    /** Path param */
    accountId: string;
    /** Body param: The text that you want to classify */
    text?: string | 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?: number[] | string;
    /** Body param: For use with img2img tasks. A base64-encoded string of the input image */
    imageB64?: 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?: number[];
    /** Body param: Text describing elements to avoid in the generated image */
    negativePrompt?: string;
    /** Body param: The number of diffusion steps; higher values can improve quality but take longer */
    numSteps?: 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;
    /** Body param: The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en' if not specified */
    lang?: string;
    /** Body param: An array of integers that represent the audio data constrained to 8-bit unsigned integer values */
    audio?: number[];
    /** Body param: The language of the recorded audio */
    sourceLang?: string;
    /** Body param: The language to translate the transcription into. Currently only English is supported. */
    targetLang?: string;
    /** Body param: Decreases the likelihood of the model repeating the same lines verbatim. */
    frequencyPenalty?: 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. */
    maxTokens?: number;
    /** Body param: Increases the likelihood of the model introducing new topics. */
    presencePenalty?: 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. */
    repetitionPenalty?: number;
    /** Body param */
    responseFormat?: {
        jsonSchema?: unknown;
        type?: "json_object" | "json_schema" | (string & {});
    };
    /** 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. */
    topK?: 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 creati */
    topP?: number;
    /** Body param: An array of message objects representing the conversation history. */
    messages?: {
        content: string | {
            text?: string;
            type?: string;
        }[];
        role: string;
    }[] | {
        content: string | {
            type: string;
            imageUrl?: {
                url: string;
            };
            text?: string;
        }[];
        role: string;
    }[];
    /** Body param */
    functions?: {
        code: string;
        name: string;
    }[];
    /** Body param: A list of tools available for the assistant to use. */
    tools?: ({
        description: string;
        name: string;
        parameters: {
            properties: Record<string, unknown>;
            type: string;
            required?: string[];
        };
    } | {
        code: string;
        name: string;
    })[];
    /** Body param: The text that you want the model to summarize */
    inputText?: string;
    /** Body param: The maximum length of the generated summary in tokens */
    maxLength?: number;
    /** Body param: Whether to ignore the EOS token and continue generating tokens after the EOS token is generated. */
    ignoreEos?: boolean;
}
export declare const RunAiRequest: Schema.Schema<RunAiRequest>;
export type RunAiResponse = {
    label?: string | null;
    score?: number | null;
}[] | File | Blob | {
    audio?: string | null;
} | {
    data?: number[][] | null;
    shape?: number[] | null;
} | {
    text: string;
    vtt?: string | null;
    wordCount?: number | null;
    words?: {
        end?: number | null;
        start?: number | null;
        word?: string | null;
    }[] | null;
} | {
    box?: {
        xmax?: number | null;
        xmin?: number | null;
        ymax?: number | null;
        ymin?: number | null;
    } | null;
    label?: string | null;
    score?: number | null;
}[] | {
    response: string;
    toolCalls?: {
        arguments?: unknown | null;
        name?: string | null;
    }[] | null;
    usage?: {
        completionTokens?: number | null;
        promptTokens?: number | null;
        totalTokens?: number | null;
    } | null;
} | {
    translatedText?: string | null;
} | {
    summary?: string | null;
} | {
    description?: string | null;
};
export declare const RunAiResponse: Schema.Schema<RunAiResponse>;
export type RunAiError = DefaultErrors | ModelNotFound;
export declare const runAi: API.OperationMethod<RunAiRequest, RunAiResponse, RunAiError, Credentials | HttpClient.HttpClient>;
export interface ListAuthorsRequest {
    accountId: string;
}
export declare const ListAuthorsRequest: Schema.Schema<ListAuthorsRequest>;
export interface ListAuthorsResponse {
    result: unknown[];
}
export declare const ListAuthorsResponse: Schema.Schema<ListAuthorsResponse>;
export type ListAuthorsError = DefaultErrors;
export declare const listAuthors: API.PaginatedOperationMethod<ListAuthorsRequest, ListAuthorsResponse, ListAuthorsError, Credentials | HttpClient.HttpClient>;
export interface ListFinetunesRequest {
    accountId: string;
}
export declare const ListFinetunesRequest: Schema.Schema<ListFinetunesRequest>;
export type ListFinetunesResponse = {
    id: string;
    createdAt: string;
    model: string;
    modifiedAt: string;
    name: string;
    description?: string | null;
}[];
export declare const ListFinetunesResponse: Schema.Schema<ListFinetunesResponse>;
export type ListFinetunesError = DefaultErrors | AccountNotFound;
export declare const listFinetunes: API.OperationMethod<ListFinetunesRequest, ListFinetunesResponse, ListFinetunesError, Credentials | HttpClient.HttpClient>;
export interface CreateFinetuneRequest {
    /** Path param */
    accountId: string;
    /** Body param */
    model: string;
    /** Body param */
    name: string;
    /** Body param */
    description?: string;
    /** Body param */
    public?: boolean;
}
export declare const CreateFinetuneRequest: Schema.Schema<CreateFinetuneRequest>;
export interface CreateFinetuneResponse {
    id: string;
    createdAt: string;
    model: string;
    modifiedAt: string;
    name: string;
    public: boolean;
    description?: string | null;
}
export declare const CreateFinetuneResponse: Schema.Schema<CreateFinetuneResponse>;
export type CreateFinetuneError = DefaultErrors | ModelNotSupported | AccountNotFound;
export declare const createFinetune: API.OperationMethod<CreateFinetuneRequest, CreateFinetuneResponse, CreateFinetuneError, Credentials | HttpClient.HttpClient>;
export interface CreateFinetuneAssetRequest {
    finetuneId: string;
    /** Path param */
    accountId: string;
    /** Body param: File to upload */
    file: File | Blob;
    /** Body param: Name of the file (adapter_config.json or adapter_model.safetensors) */
    fileName: string;
}
export declare const CreateFinetuneAssetRequest: Schema.Schema<CreateFinetuneAssetRequest>;
export interface CreateFinetuneAssetResponse {
    success: boolean;
}
export declare const CreateFinetuneAssetResponse: Schema.Schema<CreateFinetuneAssetResponse>;
export type CreateFinetuneAssetError = DefaultErrors | ModelNotSupported | AccountNotFound;
export declare const createFinetuneAsset: API.OperationMethod<CreateFinetuneAssetRequest, CreateFinetuneAssetResponse, CreateFinetuneAssetError, Credentials | HttpClient.HttpClient>;
export interface ListFinetunePublicsRequest {
    /** Path param */
    accountId: string;
    /** Query param: Pagination Limit */
    limit?: number;
    /** Query param: Pagination Offset */
    offset?: number;
    /** Query param: Order By Column Name */
    orderBy?: string;
}
export declare const ListFinetunePublicsRequest: Schema.Schema<ListFinetunePublicsRequest>;
export interface ListFinetunePublicsResponse {
    result: {
        id: string;
        createdAt: string;
        model: string;
        modifiedAt: string;
        name: string;
        public: boolean;
        description?: string | null;
    }[];
}
export declare const ListFinetunePublicsResponse: Schema.Schema<ListFinetunePublicsResponse>;
export type ListFinetunePublicsError = DefaultErrors;
export declare const listFinetunePublics: API.PaginatedOperationMethod<ListFinetunePublicsRequest, ListFinetunePublicsResponse, ListFinetunePublicsError, Credentials | HttpClient.HttpClient>;
export interface ListModelsRequest {
    /** Path param */
    accountId: string;
    page?: number;
    perPage?: number;
    /** Query param: Filter by Author */
    author?: string;
    /** Query param: If set, return models in the requested marketplace format instead of the default response. */
    format?: "openrouter";
    /** Query param: Filter to hide experimental models */
    hideExperimental?: boolean;
    /** Query param: Search */
    search?: string;
    /** Query param: Filter by Source Id */
    source?: number;
    /** Query param: Filter by Task Name */
    task?: string;
}
export declare const ListModelsRequest: Schema.Schema<ListModelsRequest>;
export interface ListModelsResponse {
    result: unknown[];
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListModelsResponse: Schema.Schema<ListModelsResponse>;
export type ListModelsError = DefaultErrors;
export declare const listModels: API.PaginatedOperationMethod<ListModelsRequest, ListModelsResponse, ListModelsError, Credentials | HttpClient.HttpClient>;
export interface GetModelSchemaRequest {
    /** Path param */
    accountId: string;
    /** Query param: Model Name */
    model: string;
}
export declare const GetModelSchemaRequest: Schema.Schema<GetModelSchemaRequest>;
export interface GetModelSchemaResponse {
    input: {
        additionalProperties: boolean;
        description: string;
        type: string;
    };
    output: {
        additionalProperties: boolean;
        description: string;
        type: string;
    };
}
export declare const GetModelSchemaResponse: Schema.Schema<GetModelSchemaResponse>;
export type GetModelSchemaError = DefaultErrors | ModelNotSupported | ModelSchemaNotFound | AccountNotFound;
export declare const getModelSchema: API.OperationMethod<GetModelSchemaRequest, GetModelSchemaResponse, GetModelSchemaError, Credentials | HttpClient.HttpClient>;
export interface ListTasksRequest {
    accountId: string;
}
export declare const ListTasksRequest: Schema.Schema<ListTasksRequest>;
export interface ListTasksResponse {
    result: unknown[];
}
export declare const ListTasksResponse: Schema.Schema<ListTasksResponse>;
export type ListTasksError = DefaultErrors;
export declare const listTasks: API.PaginatedOperationMethod<ListTasksRequest, ListTasksResponse, ListTasksError, Credentials | HttpClient.HttpClient>;
export interface SupportedToMarkdownRequest {
    accountId: string;
}
export declare const SupportedToMarkdownRequest: Schema.Schema<SupportedToMarkdownRequest>;
export interface SupportedToMarkdownResponse {
    result: {
        extension: string;
        mimeType: string;
    }[];
}
export declare const SupportedToMarkdownResponse: Schema.Schema<SupportedToMarkdownResponse>;
export type SupportedToMarkdownError = DefaultErrors;
export declare const supportedToMarkdown: API.PaginatedOperationMethod<SupportedToMarkdownRequest, SupportedToMarkdownResponse, SupportedToMarkdownError, Credentials | HttpClient.HttpClient>;
export interface TransformToMarkdownRequest {
    /** Path param */
    accountId: string;
    /** Body param */
    file: {
        files: (File | Blob)[];
    };
}
export declare const TransformToMarkdownRequest: Schema.Schema<TransformToMarkdownRequest>;
export type TransformToMarkdownResponse = {
    data: string;
    format: string;
    mimeType: string;
    name: string;
    tokens: string;
}[];
export declare const TransformToMarkdownResponse: Schema.Schema<TransformToMarkdownResponse>;
export type TransformToMarkdownError = DefaultErrors;
export declare const transformToMarkdown: API.OperationMethod<TransformToMarkdownRequest, TransformToMarkdownResponse, TransformToMarkdownError, Credentials | HttpClient.HttpClient>;
export {};
//# sourceMappingURL=ai.d.ts.map