Skip to main content

Quickstart

Route Handler that receives an upload and returns Markdown

app/api/convert/route.ts
This exposes POST /api/convert ready to receive multipart/form-data with a file field from your form, without you having to write the parsing yourself.
app/upload-form.tsx

Server Action equivalente

app/actions.ts
app/upload-form.tsx
In both cases the API key lives only on the server (environment variable without NEXT_PUBLIC_ prefix). The browser never sees it.

Siguiente paso