Weather Ruse
API Reference

LLM Endpoints

Machine-readable API description and natural language forecast queries.

GET /llm.txt

Machine-readable description of the entire API, formatted for LLMs. No authentication required.

curl https://api.weather-ruse.com/llm.txt

Returns plain text covering all endpoints, parameters, variable names, models, units, and error codes — structured so any LLM can parse and use the API without reading these docs.

Use this to give Claude, GPT, or any AI assistant full context before making API calls:

import anthropic, httpx

api_desc = httpx.get("https://api.weather-ruse.com/llm.txt").text

client = anthropic.Anthropic()
response = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=1024,
    system=f"You are a weather assistant. Use this API:\n\n{api_desc}",
    messages=[{"role": "user", "content": "Get me the temperature forecast for Berlin for the next 48h using ICON-EU."}],
)

GET /llm

Natural language weather query. Requires a paid plan.

Parses a plain-English question, fetches forecast data from the requested NWP model, and returns both structured data and a human-readable answer.

GET /llm?q=<question>&model=<model>

Parameters

ParameterTypeRequiredDescription
qstringYesNatural language weather question
modelstringNoNWP model. Default: gfs
latfloatNoOverride extracted latitude
lonfloatNoOverride extracted longitude

Example

curl -H "Authorization: Bearer $WR_KEY" \
  "https://api.weather-ruse.com/llm?q=What+is+the+wind+speed+in+Paris+tomorrow%3F&model=ecmwf-ifs"

Response

{
  "query": "What is the wind speed in Paris tomorrow?",
  "model": "ecmwf-ifs",
  "parsed": {
    "location": "Paris, France",
    "lat": 48.8566,
    "lon": 2.3522,
    "variables": ["wind_u_10m", "wind_v_10m"],
    "lead_from": 24,
    "lead_to": 48
  },
  "data": {
    "wind_u_10m": {
      "units": "m s-1",
      "lead_hours": [24, 25, 26, 27],
      "values": [3.2, 4.1, 5.0, 4.7],
      "init_time": "2026-06-23T00:00:00"
    },
    "wind_v_10m": {
      "units": "m s-1",
      "lead_hours": [24, 25, 26, 27],
      "values": [-1.8, -2.1, -2.5, -2.3]
    }
  },
  "answer": "Tomorrow in Paris, wind speeds will reach 18–25 km/h from the southwest, peaking in the afternoon."
}

How it works

  1. Claude Haiku parses q → extracts location (lat/lon), relevant CF variables, and forecast window
  2. Forecast data is fetched from the NWP model via /point internally
  3. Claude Haiku composes a concise human-readable answer from the raw data

The NWP data is real — the LLM handles natural language I/O only. Unit conversions (K→°C, m/s→km/h) are applied in the answer text.

Errors

StatusMeaning
402Paid plan required
404No data for requested model / init time
422Unknown model
502Upstream LLM error
503ANTHROPIC_API_KEY not configured on this server

On this page