ClimateClimate Foundation Models

AI Weather Forecasting in Your Browser: A 2026 Developer Guide

How to run AI weather forecasts in your browser via API. Any lat/lon, any variable, 240-hour horizon.

SciRouter Team
April 11, 2026
11 min read

The surprising thing about AI weather forecasting in 2026 is that you can do it from a web page. No supercomputer, no CUDA install, no ERA5 download. You call a hosted Aurora endpoint through SciRouter's climate lab, pass an initial atmospheric state and a forecast horizon, and get a forecast back in seconds. This guide walks through the whole thing.

Note
Aurora runs on GPU on our side. Your browser code is just an HTTP client. That is what makes this pattern possible — all the heavy lifting is server-side, and the client only has to render the result.

What you need

  • A free SciRouter API key from the dashboard.
  • A web project. Any framework or vanilla JS works.
  • A small backend proxy — do not put your API key directly in browser JavaScript.

The proxy is important. Never expose a SciRouter API key client-side. Put a tiny serverless function in front of the call, inject the key from an environment variable, and forward the request.

Step 1: Build a minimal backend proxy

Here is the smallest possible proxy in Node, suitable for Vercel or any serverless host. The proxy receives a forecast request from the browser, attaches the API key, calls SciRouter, and returns the response.

javascript
// api/forecast.js
export default async function handler(req, res) {
  if (req.method !== "POST") {
    return res.status(405).json({ error: "method not allowed" });
  }

  const { initial_state, horizon_hours } = req.body;

  const upstream = await fetch(
    "https://scirouter-gateway-production.up.railway.app/v1/climate/aurora",
    {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${process.env.SCIROUTER_API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ initial_state, horizon_hours }),
    }
  );

  const data = await upstream.json();
  return res.status(upstream.status).json(data);
}

That is it. No state, no logic, no database. Set SCIROUTER_API_KEY in the host's environment and deploy.

Step 2: Call it from the browser

From browser JavaScript, call your proxy instead of calling SciRouter directly. The proxy attaches the API key for you.

javascript
async function getAuroraForecast(initialState, hoursAhead) {
  const resp = await fetch("/api/forecast", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      initial_state: initialState,
      horizon_hours: hoursAhead,
    }),
  });

  if (!resp.ok) {
    throw new Error(`Forecast failed: ${resp.status}`);
  }

  return resp.json();
}

// Example: forecast 24 hours ahead from the current atmospheric state
const forecast = await getAuroraForecast(initialState, 24);
console.log("Forecast:", forecast);

The initialState object is the starting atmospheric state Aurora will forecast forward. For development you can use the example initial state shipped with the climate lab. For production you want to feed in a recent real state.

Step 3: Render the forecast

Aurora returns fields on a global grid. What you do with them depends on the application.

  • Simple dashboards. Pick a single variable (temperature, wind) and render it as a 2D heatmap using deck.gl or Leaflet.
  • Cyclone tracking UIs. Call the cyclone-tracking head and render predicted storm positions as a path on a map.
  • Air quality overlays. Call the air-quality head and render pollutant concentrations over a city or region.

The response from Aurora is just numbers on a grid. Rendering is entirely up to you. For the climate lab UI we use deck.gl for raster overlays and d3 for time-series charts.

Step 4: Handle latency gracefully

Aurora is fast — typically a few seconds end to end — but that is still long enough that you need a loading state. Three tips:

  • Show a skeleton or spinner. Users wait more happily when they know something is happening.
  • Cache aggressively. If the same initial state and horizon are requested twice, return the cached result. Many user interactions only change one parameter at a time.
  • Precompute the common cases. If your app always forecasts 24 and 72 hours ahead from the same base state, precompute those on a timer and serve them from a simple key-value store.
Warning
Do not call Aurora from every user keystroke. Debounce at least 300 ms. A browser event storm can rack up API calls very quickly, which is both slow and expensive.

Common pitfalls

Exposing the API key

The single biggest mistake. Even on a personal project, put a proxy in front. It takes ten minutes and it is the difference between a leaked key and a secure app.

Wrong initial state format

Aurora expects atmospheric variables at specific pressure levels in a specific order. Check the schema before sending. The climate lab documentation has the exact field layout.

Treating Aurora like a forecast API

Aurora is an inference model. It forecasts from whatever state you give it. If you pass a stale initial state, your forecast is stale. For production applications, refresh the initial state on a schedule that matches your freshness requirements.

Using it for safety-critical decisions

Aurora is a research-grade tool, and it is very good, but it is not the operational forecast that an emergency manager should be making evacuation decisions from. Combine it with official forecasts and expert review for anything where a wrong answer has real consequences.

Where to go next

Once you have a working forecast in the browser, the natural next step is to wire it into a broader climate or sustainability workflow. The SciRouter climate lab exposes Aurora alongside air quality prediction and cyclone tracking. For a deeper dive into how Aurora works under the hood, see Aurora Explained.

Bottom line

AI weather forecasting in the browser is a three-step job: set up a tiny backend proxy, call the proxy from client code, and render the result. Aurora through SciRouter removes all of the infrastructure pain that used to make this kind of app impossible for anyone who was not an atmospheric scientist. Now it is a weekend project.

Open the Climate Lab →

Frequently Asked Questions

Can I really run a weather model from the browser?

You do not run the model in the browser — Aurora needs GPU inference. What you do is call a hosted Aurora endpoint from browser JavaScript. SciRouter exposes Aurora through the climate lab with CORS enabled, so a fetch() from a web app returns a forecast in seconds. The model itself runs on GPU on our side.

Do I need an API key?

Yes. Sign up for SciRouter and grab a free-tier API key from the dashboard. The free tier is enough to build and test a browser-based weather app. For production usage with higher traffic, upgrade to a paid tier.

How fresh is the forecast data?

Aurora is an inference model — it takes an atmospheric initial condition and forecasts forward. The freshness of the output depends on the initial condition you pass in. SciRouter supports passing ERA5-like states directly, and we are adding live initial conditions through the climate lab so you can forecast from 'now.'

What variables does Aurora predict?

Standard atmospheric fields: temperature, wind components, geopotential, humidity, and pressure at multiple vertical levels. Depending on the fine-tuning head you call, additional outputs like surface precipitation, air quality pollutants, and cyclone positions are available.

Can I put this in a production web app?

Yes, with the usual caveats. Rate-limit your users, cache responses, and do not expose your SciRouter API key directly in browser JavaScript — proxy through your own small backend. The Aurora endpoint is fast enough for user-facing applications. For life-safety or operational use, combine with traditional forecasts and expert review.

What is the latency?

Typically a few seconds end-to-end for a standard forecast through SciRouter. The hosted Aurora inference itself runs in well under a second on GPU; most of the latency is request handling, cold start if the worker just spun up, and network round trips.

What if my user has no internet?

Aurora is a server-side model, so a network connection is required. For offline-first applications, cache recent forecasts and serve them until the user reconnects. Do not try to run the model in the browser — the weights are far too large for client-side inference.

Try this yourself

500 free credits. No credit card required.