You can now customize how the Markdown Conversion service processes different file types by passing a conversionOptions object.
Available options:
- Images: Set the language for AI-generated image descriptions
- HTML: Use CSS selectors to extract specific content, or provide a hostname to resolve relative links
- PDF: Exclude metadata from the output
Use the env.AI binding:
JavaScript
await env.AI.toMarkdown({ name: "page.html", blob: new Blob([html]) },{conversionOptions: {html: { cssSelector: "article.content" },image: { descriptionLanguage: "es" },},},);TypeScript
await env.AI.toMarkdown({ name: "page.html", blob: new Blob([html]) },{conversionOptions: {html: { cssSelector: "article.content" },image: { descriptionLanguage: "es" },},},);
Or call the REST API:
curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/tomarkdown \ -H 'Authorization: Bearer {API_TOKEN}' \ -F 'conversionOptions={"html": {"cssSelector": "article.content"}}'For more details, refer to Conversion Options.
Source: Cloudflare
Latest Posts
- Amazon EC2 I8g instances now available in AWS Europe (Paris), Asia Pacific (Jakarta) regions

- MC1427972: SharePoint Enhances Restricted Content Discovery to Limit Copilot and Microsoft 365 Search Visibility

- MC1309747: Planner Becomes Available in Outlook and Microsoft 365 Copilot for Integrated Task Management

- MC1330891: Microsoft Teams Supports Breakout Rooms in Meetings with Up to 1,000 Attendees







