cloudflare
Version:
The official TypeScript library for the Cloudflare API
39 lines • 1.75 kB
text/typescript
import { APIResource } from "../../../core/resource.mjs";
import { PagePromise, SinglePage } from "../../../core/pagination.mjs";
import { type Uploadable } from "../../../core/uploads.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class BaseToMarkdown extends APIResource {
static readonly _key: readonly ['radar', 'ai', 'toMarkdown'];
/**
* Converts files uploaded as multipart form data into Markdown using Workers AI.
* Returns a conversion result for each file. Use the supported-formats endpoint to
* check accepted file types.
*
* @deprecated Use [AI > To Markdown](https://developers.cloudflare.com/api/resources/ai/subresources/to_markdown/) instead.
*/
create(params: ToMarkdownCreateParams, options?: RequestOptions): PagePromise<ToMarkdownCreateResponsesSinglePage, ToMarkdownCreateResponse>;
}
export declare class ToMarkdown extends BaseToMarkdown {
}
export type ToMarkdownCreateResponsesSinglePage = SinglePage<ToMarkdownCreateResponse>;
export interface ToMarkdownCreateResponse {
data: string;
format: string;
mimeType: string;
name: string;
tokens: string;
}
export interface ToMarkdownCreateParams {
/**
* Path param: Cloudflare account ID used for this AI model request.
*/
account_id: string;
/**
* Body param: Files to convert, supplied as multipart file uploads.
*/
files: Array<Uploadable>;
}
export declare namespace ToMarkdown {
export { type ToMarkdownCreateResponse as ToMarkdownCreateResponse, type ToMarkdownCreateResponsesSinglePage as ToMarkdownCreateResponsesSinglePage, type ToMarkdownCreateParams as ToMarkdownCreateParams, };
}
//# sourceMappingURL=to-markdown.d.mts.map