documents.stream creates the document and gives you its events as they happen.
display.es: a short text (“Revisando…”, “¡Listo!”) meant to be shown as is in your interface.
On your site
The API key cannot go to the browser, so your server acts as a bridge: it receives the events with the SDK and forwards them to your page. For example, with a Next.js route:app/api/report/route.ts
signal cuts the stream. The document keeps being created anyway; you can get it with
documents.get(id).