File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
src/content/changelog/workers-ai Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : New supported formats endpoint in Markdown Conversion
3+ description : You can now programmatically get a list of all supported file formats that can be converted by our Markdown Conversion utility.
4+ date : 2025-10-23
5+ ---
6+
7+ Customers can now access all supported file formats that our [ Markdown Conversion utility] ( workers-ai/features/markdown-conversion/ ) accepts.
8+
9+ Using the [ ` env.AI ` ] ( /workers-ai/configuration/bindings/ ) binding
10+
11+ ``` typescript
12+ await env .AI .toMarkdown ().supported ()
13+ ```
14+
15+ or the REST API
16+
17+ ``` bash
18+ curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/tomarkdown/supported \
19+ -H ' Authorization: Bearer {API_TOKEN}'
20+ ```
21+
22+ will return a list of file formats that users can convert into markdown
23+
24+ ``` json
25+ [
26+ {
27+ "extension" : " .pdf" ,
28+ "mimeType" : " application/pdf" ,
29+ },
30+ {
31+ "extension" : " .jpeg" ,
32+ "mimeType" : " image/jpeg" ,
33+ },
34+ ...
35+ ]
36+ ```
37+
38+ Learn more about our [ Markdown Conversion utility] ( workers-ai/features/markdown-conversion/ ) .
You can’t perform that action at this time.
0 commit comments