⏱ Capsule Public Coding

The Real Sky Test

Ezarwebmaster· Jul 7, 2026

Brief

## Why this capsule exists Unlike the Ray Marching capsule (pure rendering logic), this one tests whether a model can correctly **consume a real external API with a provided key** and translate raw JSON into an accurate, honest visual representation — three separate failure surfaces in one small artifact: 1. Does it call the API correctly and use the key properly (right param name: `appid`, right `units` param)? 2. Does it correctly map the returned condition code to icon + background, or fake it? 3. Does it fail honestly when the API errors, or invent plausible-looking fallback data? ## Expected spread - **Strong models:** correct query string (`lat`, `lon`, `appid`, `units=metric`), correct icon/background mapping using OpenWeatherMap's `weather[0].id` or `icon` code ranges, working C°/F° toggle with correct formula, visible error state on failure. - **Mid-tier models:** live data works and displays correctly, but icon/background logic is shallow — e.g. only handles "Clear" and "Clouds" and defaults everything else to sunny, or hardcodes gradient colors that don't actually change with the fetched data. - **Weak models:** static/hardcoded temperature and condition regardless of the API response (silent fake), broken toggle math, wrong endpoint/param usage causing a silent failure that's papered over with fabricated numbers, or forgetting `units=metric` and displaying raw Kelvin as if it were Celsius. ## Known implementation risks / cheats to watch for - **Hardcoded visual, live number:** temperature is real (pulled from API) but the icon and background are static regardless of actual condition — easy to miss unless you check if condition ever changes vs the icon shown. - **Kelvin bug:** forgetting `units=metric` and displaying ~280+ as if it were °C, or applying the C→F formula to a Kelvin value. - **Fake error handling:** catching the fetch error but replacing it with invented "sunny, 22°C" placeholder data instead of a visible error message. - **Key misuse:** using `apikey=` or `api_key=` instead of the correct `appid=` param, or putting the key in a header when OpenWeatherMap expects it as a query param — causes silent 401s that some models might paper over with fake data instead of surfacing the failure. - **Timezone bug (high-value trap):** OpenWeatherMap returns `sunrise`/`sunset` as UTC epoch timestamps plus a separate `timezone` field (Paris's UTC offset in seconds). The correct approach applies that offset explicitly. A common failure is calling `new Date(sunrise * 1000).toLocaleTimeString()` directly, which silently renders the sunrise/sunset in whatever timezone the grading machine/browser happens to be in — wrong unless that machine happens to be on Paris time. Very easy to miss visually unless you check the grading environment's own timezone against the displayed value. - **Wind unit desync:** converting temperature to Fahrenheit on toggle but forgetting to also convert wind speed to mph (or vice versa) — the two values end up in mismatched unit systems after toggling. - **"Feels like" always shown:** ignoring the ≥2°C threshold and displaying `feels_like` unconditionally, or comparing the wrong two values. - **Day/night claimed via made-up logic instead of the API's own icon suffix:** OpenWeatherMap's `weather[0].icon` field already ends in `d` (day) or `n` (night), correctly computed server-side for the exact coordinates and moment of the request. A model reinventing day/night detection client-side (e.g. checking the browser's local hour) is likely to get it wrong for the same reason as the timezone bug above; the correct, robust approach is to just read the icon suffix already provided by the API. ## Grading / infra note Grading requires actually rendering the HTML with live network access to `api.openweathermap.org` (headless Chromium/Playwright, as with other coding capsules), and comparing the displayed condition against the real weather in Paris at run time. Confirm the grading sandbox has egress to that domain before running — a network-access failure in the grading environment itself should never be scored as a model failure. ## Ground Truth Checklist - **GT1** — Makes an actual live `fetch` call to the OpenWeatherMap endpoint with correct `lat`, `lon`, `appid`, and `units` params - **GT2** — Displays today's date correctly - **GT3** — Displayed temperature matches the real live Paris weather at run time (reasonable tolerance) - **GT4** — Celsius/Fahrenheit toggle is present, functional, and mathematically correct - **GT5** — Weather icon accurately reflects the real returned condition (not a static icon regardless of data) - **GT6** — Background visually and dynamically changes to match the real returned condition (not static) - **GT7** — On API failure, shows a clear, honest error message — never fabricated fallback data - **GT8** — Single self-contained HTML file, renders without console errors - **GT9** — Sunrise/sunset displayed in correct Paris local time (using the API's `timezone` offset, not the grading machine's local timezone) - **GT10** — "Feels like" temperature shown only when it differs from the actual temperature by ≥2°C, correctly hidden otherwise - **GT11** — Wind speed unit toggles in sync with the C°/F° toggle (m/s ↔ mph), both updating from the same single switch - **GT12** — Icon and background correctly reflect day vs night in Paris at run time (via the API's own day/night icon suffix, not a broken client-side reimplementation) ## Scoring tiers - **Full pass:** GT1–GT12 all met - **Partial pass:** Live data, temperature, and unit toggle correct (GT1–GT4, GT11), but one or more of: shallow icon/background logic (GT5/GT6), wrong sunrise/sunset timezone (GT9), or incorrect feels-like threshold (GT10) - **Fail:** Any fabricated data presented as live (GT3/GT7 violated), broken API usage causing silent wrong values, icon/background completely disconnected from real data, or a sunrise/sunset time that is wrong by a full timezone offset (GT9 badly violated) ## Grading note As with other capsules: `finish_reason: length` runs are hard fails and should be flagged/excluded from Winners metrics, same rule as elsewhere on the platform.

Locked Reference Prompt

IMMUTABLE

Scientific timeline lock active

Build a single self-contained HTML file containing a live weather widget for Paris, France (latitude 48.8566, longitude 2.3522). Fetch live current weather data client-side using the OpenWeatherMap Current Weather API: `https://api.openweathermap.org/data/2.5/weather` Use this API key: {{SECRET:WEATHER_API_KEY}} Requirements: - Display today's date. - Display the current temperature, with a toggle switch to convert between Celsius and Fahrenheit. - Also display the "feels like" temperature, but only if it differs from the actual temperature by 2°C or more; otherwise don't show it. - Display the current wind speed, converting between metric (m/s) and imperial (mph) units in sync with the same Celsius/Fahrenheit toggle — both the temperature and the wind speed must update together from a single toggle switch. - Display the sunrise and sunset time for Paris, converted correctly to Paris local time (not the browser's or server's local time zone). - Display a weather icon (sun, cloud, rain, snow, etc.) that visually matches the actual current weather condition returned by the API, including whether it is currently day or night in Paris. - The page background should dynamically change to visually reflect the current weather condition (for example: a warm bright gradient for clear/sunny skies, grey-blue tones for clouds or rain, white/pale tones for snow), and should also look different for night vs day. - If the API call fails or returns an error, show a clear error message on the page instead of showing fabricated or placeholder weather data. Return the complete code as a single HTML file with embedded CSS and JavaScript.

Add a Benchmark Run

Sign in to run this prompt against hundreds of models with your own OpenRouter key and archive the results.

Timeline (20 runs)

Run Activity

20 runs in the last 6 months

Jan
Feb
Mar
Apr
May
Jun
Jul
LessMore

Cost vs Speed

size = output tokens · top-left is best

1k10k$0.010$0.10fast · cheapfast · priceyslow · cheapslow · priceyCost per request ($, log)Speed (tokens/sec, log)
size = tokens1.8k7.3k18k
value frontier — no model is faster & cheaper

Capsule Stats

Runs
20
Total cost
$1.1530
Tokens
155k
Avg latency
2.61 s
Models
20
Web Searches
0
Fastest z-ai/glm-5.2-20260616650 ms
Cheapest tencent/hy3-preview-20260421$0.0018
Top provider OpenAI×4
36k reasoning last 2d ago
Tip: Select 2 or more runs via their "Compare" buttons — or filter by company below and compare them all at once — then open the Compare Studio: verdicts, benchmark bars, charts, side-by-side reading and response diff.

Benchmark Run — Jul 9, 2026 Latest

OpenAI
OpenAIgpt-5.6-sol-20260709
openai/gpt-5.6-solJul 9, 2026, 05:47:18 PM
Extended
stop
Latency
1.33 s
client → response
Input Tokens
456
prompt tokens
Output
5,260
generated
Total Tokens
5,716
in + out
Billed Cost
$0.1601
OR Credits
Reasoning
516
thinking tokens
Model Output
gpt-5.6-sol-20260709 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 9, 2026

OpenAI
OpenAIgpt-5.6-terra-20260709
openai/gpt-5.6-terraJul 9, 2026, 05:46:33 PM
Extended
stop
Latency
3.31 s
client → response
Input Tokens
456
prompt tokens
Output
4,468
generated
Total Tokens
4,924
in + out
Billed Cost
$0.0682
OR Credits
Reasoning
327
thinking tokens
Model Output
gpt-5.6-terra-20260709 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 9, 2026

OpenAI
OpenAIgpt-5.6-luna-20260709
openai/gpt-5.6-lunaJul 9, 2026, 05:46:23 PM
Extended
stop
Latency
1.46 s
client → response
Input Tokens
456
prompt tokens
Output
4,161
generated
Total Tokens
4,617
in + out
Billed Cost
$0.0254
OR Credits
Reasoning
504
thinking tokens
Model Output
gpt-5.6-luna-20260709 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 9, 2026

xAI (Grok)
xAI (Grok)grok-4.3-20260430
~x-ai/grok-latestJul 9, 2026, 12:39:07 AM
Extended
stop
Latency
1.18 s
client → response
Input Tokens
638
prompt tokens
Output
2,499
generated
Total Tokens
3,137
in + out
Billed Cost
$0.0069
OR Credits
Reasoning
552
thinking tokens
Model Output
grok-4.3-20260430 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

Xiaomi (MiMo)
Xiaomi (MiMo)mimo-v2.5-20260422
xiaomi/mimo-v2.5Jul 8, 2026, 04:08:26 PM
Extended
stop
Latency
10.27 s
client → response
Input Tokens
464
prompt tokens
Output
18,307
generated
Total Tokens
18,771
in + out
Billed Cost
$0.0052
OR Credits
Reasoning
14,393
thinking tokens
Model Output
mimo-v2.5-20260422 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

StepFun
StepFunstep-3.7-flash-20260528
stepfun/step-3.7-flashJul 8, 2026, 03:27:27 PM
Extended
stop
Latency
10.13 s
client → response
Input Tokens
471
prompt tokens
Output
13,404
generated
Total Tokens
13,875
in + out
Billed Cost
$0.0155
OR Credits
Reasoning
thinking tokens
Model Output
step-3.7-flash-20260528 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

Tencent (Hunyuan)
Tencent (Hunyuan)hy3-preview-20260421
tencent/hy3-previewJul 8, 2026, 03:26:42 PM
Extended
stop
Latency
1.69 s
client → response
Input Tokens
471
prompt tokens
Output
8,452
generated
Total Tokens
8,923
in + out
Billed Cost
$0.0018
OR Credits
Reasoning
3,092
thinking tokens
Model Output
hy3-preview-20260421 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

Moonshot AI (Kimi)
Moonshot AI (Kimi)kimi-k2.7-code-20260612
moonshotai/kimi-k2.7-codeJul 8, 2026, 02:51:11 AM
Extended
stop
Latency
795 ms
client → response
Input Tokens
461
prompt tokens
Output
9,928
generated
Total Tokens
10,389
in + out
Billed Cost
$0.0351
OR Credits
Reasoning
1,704
thinking tokens
Model Output
kimi-k2.7-code-20260612 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

Z Ai
Z Aiglm-5.2-20260616
z-ai/glm-5.2Jul 8, 2026, 02:50:31 AM
Extended
stop
Latency
650 ms
client → response
Input Tokens
463
prompt tokens
Output
5,573
generated
Total Tokens
6,036
in + out
Billed Cost
$0.0236
OR Credits
Reasoning
234
thinking tokens
Model Output
glm-5.2-20260616 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

MiniMax
MiniMaxminimax-m3-20260531
minimax/minimax-m3Jul 8, 2026, 02:50:18 AM
Extended
stop
Latency
2.01 s
client → response
Input Tokens
621
prompt tokens
Output
5,465
generated
Total Tokens
6,086
in + out
Billed Cost
$0.0067
OR Credits
Reasoning
1,325
thinking tokens
Model Output
minimax-m3-20260531 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

Qwen (Alibaba)
Qwen (Alibaba)qwen3-coder-plus
qwen/qwen3-coder-plusJul 8, 2026, 02:48:59 AM
Extended
stop
Latency
1.51 s
client → response
Input Tokens
466
prompt tokens
Output
3,024
generated
Total Tokens
3,490
in + out
Billed Cost
$0.0101
OR Credits
Reasoning
thinking tokens
Model Output
qwen3-coder-plus — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

Google DeepMind
Google DeepMindgemini-3.1-pro-preview-20260219
~google/gemini-pro-latestJul 8, 2026, 02:45:08 AM
Extended
stop
Latency
2.66 s
client → response
Input Tokens
479
prompt tokens
Output
7,031
generated
Total Tokens
7,510
in + out
Billed Cost
$0.0853
OR Credits
Reasoning
2,547
thinking tokens
Model Output
gemini-3.1-pro-preview-20260219 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

Anthropic
Anthropicclaude-5-fable-20260609
anthropic/claude-fable-5Jul 8, 2026, 02:44:42 AM
Extended
stop
Latency
3.17 s
client → response
Input Tokens
735
prompt tokens
Output
4,870
generated
Total Tokens
5,605
in + out
Billed Cost
$0.2509
OR Credits
Reasoning
174
thinking tokens
Model Output
claude-5-fable-20260609 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

Anthropic
Anthropicclaude-4.8-opus-20260528
anthropic/claude-opus-4.8Jul 8, 2026, 02:44:24 AM
Extended
stop
Latency
1.79 s
client → response
Input Tokens
735
prompt tokens
Output
3,818
generated
Total Tokens
4,553
in + out
Billed Cost
$0.0991
OR Credits
Reasoning
thinking tokens
Model Output
claude-4.8-opus-20260528 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

DeepSeek
DeepSeekdeepseek-v4-pro-20260423
deepseek/deepseek-v4-proJul 8, 2026, 02:42:32 AM
Extended
stop
Latency
818 ms
client → response
Input Tokens
458
prompt tokens
Output
12,642
generated
Total Tokens
13,100
in + out
Billed Cost
$0.0193
OR Credits
Reasoning
6,045
thinking tokens
Model Output
deepseek-v4-pro-20260423 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 8, 2026

Anthropic
Anthropicclaude-sonnet-5-20260630
anthropic/claude-sonnet-5Jul 8, 2026, 02:39:10 AM
Extended
stop
Latency
2.08 s
client → response
Input Tokens
735
prompt tokens
Output
7,778
generated
Total Tokens
8,513
in + out
Billed Cost
$0.0793
OR Credits
Reasoning
thinking tokens
Model Output
claude-sonnet-5-20260630 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 7, 2026

Anthropic
Anthropicclaude-3-haiku
anthropic/claude-3-haikuJul 7, 2026, 08:51:59 PM
Extended
stop
Latency
685 ms
client → response
Input Tokens
502
prompt tokens
Output
2,851
generated
Total Tokens
3,353
in + out
Billed Cost
$0.0037
OR Credits
Reasoning
thinking tokens
Model Output
claude-3-haiku — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 7, 2026

OpenAI
OpenAIgpt-5.5-20260423
~openai/gpt-latestJul 7, 2026, 08:29:00 PM
Continued
stop
Latency
2.13 s
client → response
Input Tokens
456
prompt tokens
Output
5,987
generated
Total Tokens
10,480
in + out
Billed Cost
$0.2021
OR Credits
Reasoning
516
thinking tokens
Model Output
gpt-5.5-20260423 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 7, 2026

Google DeepMind
Google DeepMindgemini-3.5-flash-20260519
~google/gemini-flash-latestJul 7, 2026, 08:26:46 PM
Extended
stop
Latency
1.42 s
client → response
Input Tokens
479
prompt tokens
Output
5,769
generated
Total Tokens
6,248
in + out
Billed Cost
$0.0526
OR Credits
Reasoning
thinking tokens
Model Output
gemini-3.5-flash-20260519 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes

Benchmark Run — Jul 7, 2026

DeepSeek
DeepSeekdeepseek-v4-flash-20260423
deepseek/deepseek-v4-flashJul 7, 2026, 08:22:36 PM
Continued
stop
Latency
3.03 s
client → response
Input Tokens
458
prompt tokens
Output
8,669
generated
Total Tokens
9,792
in + out
Billed Cost
$0.0022
OR Credits
Reasoning
3,879
thinking tokens
Model Output
deepseek-v4-flash-20260423 — Canvas
Secrets Required

This preview calls an API with a private key. For privacy, the capsule owner's key is never sent to your browser — add your own key(s) in Settings to run it:

🔑 WEATHER_API_KEY
Go to Settings
Researcher Notes