Skip to main content
Post

Reconstruct Hamilton’s Abu Dhabi Pit Stop with the OpenF1 API

Quickchat has a walkthrough for building a race-stint explainer. It's a Quickchat AI Agent called Stint Notebook that reads the public OpenF1 API and reconstructs Lewis Hamilton's first pit stop at the 2025 Abu Dhabi Grand Prix.

You set up the Agent manually, paste in a Main Prompt, and add custom API Actions. Two of them pin the session (the race, session_key 9839) and confirm the driver (number 44). Three more fetch his pit events, his tyre stints, and a bounded range of laps. The pit record picks the window. Hamilton stopped on laps 8 and 31, so asking for three laps either side of the first stop returns laps 5 to 11, seven timed laps. The Agent then shows a table of lap times and tyres with links to the OpenF1 records behind it.

The example separates two numbers from the same stop. Hamilton spent 21.601 seconds in the pit lane, but his Ferrari was stationary for 2.4 seconds. The Agent also shows the change from soft to hard tyres.

OpenF1's records can be read without an OpenF1 account or token. You do need a Quickchat AI account, and credits for AI replies and tests. Quickchat also offers a downloadable kit with the five Action recipes, the Main Prompt, saved OpenF1 responses, and a small Python worksheet. OpenF1's historical data starts in 2023 and is for personal use.

Loading replies