Horizon AI

REST API & AI Platform

At a glance

11 min read19 min listen

The problem
Space data is scattered across agencies, news services and feeds that were never designed to work together.
My role
I designed and built the API, the data pipeline and the AI system.
What I built
One REST API for launches, events, news, blogs, ISS reports and NASA's picture of the day, with an AI that can use Web Search, Lens and Deep Scan.
The result
One key gives developers clean, summarized and translated space data, plus an AI grounded in it.
Technologies
Node.js, Express, MongoDB, Redis and Gemini.

HorizonAIisaspaceintelligenceplatform:aRESTAPIforlivespacedata,withanAIthatknowshowtouseit.Onekeygivesdeveloperslaunches,events,news,blogs,ISSreportsandNASA'spictureoftheday,alreadycleaned,summarizedandtranslated.

Built with

  • Node.js
  • Express
  • MongoDB
  • Redis
  • Gemini

One API for what is happening above us

Space data is scattered across agencies, news services and feeds that were never designed to work together. Horizon brings it into one place, behind six simple endpoints: Launches, Events, Articles, Blogs, Reports and APOD.

Every endpoint speaks the same language. The response has the same structure, the same pagination and the same way of asking for a translation, so once you have used one, you already know the other five.

GET /events?search=RS-25

200 OK

{"hrz_id": "HRZ-E-1444","title": "RS-25 Engine Test","type": "Static Fire","time": "2026-11-18T19:15:00.000Z","duration": 1915,"location": "Fred Haise Test Stand, NASA’s Stennis Space Center","ai_summary": "NASA is conducting a critical static fire test of an RS-25 engine at the Fred Haise Test Stand located within Stennis Space Center. Scheduled for November 18, 2026, this 1,915-second hot fire is a vital part of ongoing certification testing for future Space Launch System rockets. This rigorous evaluation ensures the extreme reliability and performance required for humanity's return to deep space exploration.","img": "https://thespacedevs-prod.nyc3.digitaloceanspaces.com/media/images/rs-25_engine_te_image_20240111163044.jpeg","live": "https://www.youtube.com/watch?v=2z0AgWIL17Q","livestatus": false}
A real response from the Events endpoint.

Made for developers

Authentication is a single Bearer key. From there you can search by keyword or ID, page through up to 50 results at a time, ask for Greek, French or German, and narrow the data by what you need, such as upcoming launches, mission type, status or news category.

Responses are cached, so popular requests come back quickly and the database stays calm. A good API should feel obvious from the first request.

Data that has already been read

Behind those endpoints, automated jobs follow NASA, NOAA and spaceflight news services, each at a rhythm that suits its subject. New information is compared with what Horizon already knows and stored in MongoDB, so a small correction from a source does not turn into false news.

Then the AI reads it. Through a Redis-backed queue, Gemini summarizes each item, classifies it and translates it. You do not receive a raw feed that still needs work. You receive something a person can already read.

Horizon Brain

Ask Horizon about the next Starship flight, and something quiet happens before a single word is written. A small, fast model reads your question, follows any "it" or "that one" back through the conversation, and decides what this moment needs. Launches? News? Space weather? An astronaut? Or nothing at all, because you only said hello?

It then reaches into MongoDB and pulls only those pieces, all at once. A casual message touches no data. A precise question arrives at the main model with the few records that matter and nothing else competing for its attention.

Then Horizon remembers who is asking. Recent conversations are folded into a living summary, and lasting interests stay with you between chats. Mention your new telescope once, and a later question about Saturn can become a question about what you will see through it.

So I told it about a new telescope, closed that chat and started a clean one. This was my only message.

What should I look for on Saturn?

Internal monologue

Horizon

With an 8-inch Dobsonian, Saturn is an absolute showstopper, though right now in late 2026, you are in for a unique treat. Saturn's magnificent ring system underwent an edge-on crossing in 2025, meaning the rings are still tilted at a relatively narrow, slender angle from our vantage point.

Start by hunting for the Cassini Division, that famous dark gap separating the outer A ring from the brighter B ring. Because the tilt is relatively shallow, catching it will test your atmospheric seeing conditions, but during moments of steady air, it snaps into crisp focus like a fine pencil line.

A real answer from Horizon, shortened.

It also listens to how you asked. Someone who is new and a little embarrassed to ask should feel welcome before they feel taught.

why is space dark? sorry i know nothing about this stuff

Internal monologue

Horizon

Never apologize for asking that. In fact, that exact question kept the greatest astronomers and thinkers awake at night for centuries. It even has an official name: Olbers' Paradox.

The darkness isn't an absence of wonder, it is the quiet proof that our universe had a beginning.

A real answer from Horizon, shortened.

Someone who already speaks the language gets no introduction at all, and when they ask for a short answer, that is what they get.

Why did Raptor go full-flow staged combustion on methalox instead of hydrolox? Short answer please.

Internal monologue

Horizon

Raptor chose methalox over hydrolox because it hits the ultimate engineering sweet spot between density, reusable operations, and interplanetary logistics.

While hydrogen offers unbeatable raw specific impulse, its minuscule density requires massive, heavy tanks, suffers from severe boil-off, and causes metal embrittlement. Liquid methane is roughly six times denser, drastically shrinking the rocket's structural mass. Crucially, unlike kerosene, methane burns exceptionally clean without severe coking (soot buildup), making the intense twin-preburner architecture of a full-flow staged combustion cycle practical for rapid, repeated reuse without teardowns.

A real answer from Horizon, shortened.

The universe stays the same, but the conversation is shaped around the person in it.

Behind an answer, the model can also keep a private internal monologue: a note on what it was asked, what it checked and how it chose to respond. Nobody normally reads it, and the server throws it away as soon as the answer is ready.

From there, the live data outranks the model's own memory. Horizon knows the current time, so it can tell when something it once learned as the future has already become the past. Much of intelligence, it turns out, is knowing where to look.

Here is one of those rare moments, kept before it disappeared.

Is the next launch still on schedule, and what would make you doubt it?

Internal monologue

Horizon

The immediate next mission on the pad is indeed on schedule. Arianespace is set to launch the Ariane 64 Block 2 carrying the Amazon Leo (LE-04) broadband payload tomorrow, November 23, 2026, at 11:09 UTC, from the Guiana Space Centre in French Guiana. Officially, the flight status is confirmed as Go for Launch.

As for what could spark hesitation or doubt? In orbital rocketry, skepticism until ignition is simply respect for physics. A modern launch vehicle is a masterpiece of balance, where thousands of parameters must stay within hair-thin operational windows.

Until the hold-down clamps release and raw thrust overcomes gravity, healthy caution is the very shield that keeps these impressive machines safe.

A real answer from Horizon, shortened.

Sometimes the answer lives outside the database. Here is one real request, followed through the backend. I gave Horizon a link from its own news feed and asked why it matters.

Read this and tell me why it matters: nasa.gov/…/65-years-of-human-spaceflight-at-nasa-johnson

Horizon Brain

  1. Link detected

    2 ms

    The search step is skipped, because the source is already known.

  2. Page opened

    643 ms

    nasa.gov, reached through Horizon's own proxy.

  3. Noise removed

    Menus and clutter are gone. Only the article's useful text remains.

  4. Source passed to the AI

    “For 65 years, NASA’s Johnson Space Center in Houston has helped shape human spaceflight…”

Horizon

That article marks a profound milestone: sixty-five years since the establishment of NASA's Johnson Space Center on November 1, 1961.

Why does this matter? Because Houston became the literal heartbeat of humanity's venture into the void. Rockets and engines provide the raw physics of escape velocity, but JSC provided the human nervous system.

From Gemini and Apollo to Skylab, the thirty-year Space Shuttle era, and over a quarter-century of continuous human habitation aboard the International Space Station, JSC transformed human spaceflight from a perilous sprint into a permanent presence.

A real trace from Horizon's backend, shortened.

Features

Around the brain sit the tools it can reach for when the database is not enough.

Horizon Web Search

When a question is too recent for any model to know, Horizon searches the web itself. It chooses the right timeframe, moves to another search route if one stops responding, then opens the strongest results and reads them before it answers. Give it a link, and it reads the page directly.

Those pages are fetched through our own proxy on Cloudflare's network, so the API never has to connect to them itself. What reaches the AI is the useful text of the page, without the menus and noise around it.

Horizon Lens

Send Horizon a photo and it does more than describe what it sees. Lens runs a reverse image search to learn what the image is and where else it appears on the web, then checks whether it belongs to an article, blog or report already in Horizon's own database. If it does, the AI answers with the real story behind the picture.

It also knows the limits of its eyes. Many nebulae look almost identical, so unless the evidence names one clearly, Horizon describes what it can see instead of inventing a confident answer.

Image optimization

Every image is optimized before the AI sees it. It is scaled down, converted to WebP when it comes from outside and cached, so the same picture is never processed twice and each request stays fast and far cheaper to run.

Horizon Deep Scan

Sometimes a good answer is not enough. Deep Scan takes an image and combines everything at once: Lens, a live web search and a far more precise mode of the model. The tone shifts from a friendly conversation to a technical analysis, built on what the system could actually find.

Here is one real scan, followed through the brain.

The Cosmic Cliffs in the Carina Nebula, seen by the James Webb Space Telescope.
NASA, ESA, CSA, STScI

Deep scan this image. What is it, and what have astronomers recently found here?

Horizon Deep Scan

  1. Image prepared

    Scaled down and converted to WebP before the AI sees it.

  2. Horizon Lens

    1.8 s

    Reverse image search. Best guess: “james webb carina nebula”. Matching pages include NASA Science and ESA/Webb.

  3. Question understood

    3.0 s

    “Recently” means memory may not be enough, so it turns to Horizon Web Search and the Horizon DB and writes its own search: “Carina Nebula Cosmic Cliffs latest discoveries James Webb Space Telescope”.

  4. Deep analysis

    14.0 s

    The model moves to its precise mode and describes what is visible in this image before naming the object.

Internal monologue

Horizon

Running a Horizon Deep Scan through Horizon Lens on this visual field. Scanning the frame reveals an exceptionally crisp, high-resolution infrared composite. There are no overlaid watermarks or scale bars present, but the physical signature is unmistakable: intense six-point diffraction spikes flanked by two fainter horizontal spikes, the textbook optical footprint of the James Webb Space Telescope's hexagonal primary mirror array and secondary mirror support struts.

This is the edge of the giant gaseous cavity inside NGC 3324, famously known as the Cosmic Cliffs of the Carina Nebula, located roughly 7,600 light-years away. What appears as craggy stone peaks is actually a titanic front of molecular hydrogen and dust, sculpted and eroded by intense ultraviolet radiation and stellar winds blazing from extremely massive, hot young stars located just above the upper boundary of the frame.

Webb's near-infrared instrumentation pierced these opaque dust curtains for the first time, unveiling dozens of energetic protostellar jets and outflows from newborn stars that were completely hidden from Hubble's optical gaze.

A real Deep Scan from Horizon's backend, shortened.

Core, Plus and Pro

Horizon is designed to work across three editions. Core covers conversation and live space data. Plus adds Lens and Web Search. Pro adds Deep Scan, voice messages, document analysis, a longer memory and a custom personality for each community. If a request fails, its credits come back.

Anyone can unlock an edition from their own dashboard, with checkout handled by Polar.sh.

The Horizon dashboard, where an edition is unlocked.
The Horizon dashboard, where an edition is unlocked.

Credits follow the work a request actually takes. A simple question costs little, and each extra tool adds only its own share. If Horizon already has the answer in its cache, the credits come back, because nothing new had to be done.

Credits per request

MessageConversation and live space data
10
Web SearchAdded only when Horizon needs to search
+2
Horizon LensAdded when you send an image
+5
Deep ScanAdded for a full image analysis, Lens included
+15
Voice messageAdded when you send audio
+10
DocumentReading and analyzing a PDF
30–35
Answer from cacheAlready known, so the credits come back
0
Failed requestThe credits come back
0

A voice, not a search box

Horizon answers in the language you wrote in. It stays brief for small talk, becomes rigorous for physics, and saves its sense of wonder for the moments that deserve it. It remembers lasting interests, like a favorite rocket, and is told never to keep personal details.

Everything above has a source: a record, a page, a photograph. So I asked it something no database can answer.

If every atom in me was forged in a star that died, what part of me is actually mine?

Horizon

The matter is just on loan from the cosmos, passing through you like water through a net.

What actually belongs to you is the pattern.

The stars forged the carbon, nitrogen, and iron, but they had no blueprint for how those elements would organize to remember a melody, hold a conviction, or care about another living being. The universe supplied the raw alphabet, but the syntax, the memories, and the conscious direction you give to those borrowed particles across time - that is entirely, undeniably yours.

A real answer from Horizon, shortened.

Protected by design

An AI that talks to the public will be tested. Everything a person writes is treated as untrusted, so instructions hidden inside a message cannot rewrite the rules. Repeated attempts to manipulate it are noticed and sent for human review instead of being punished blindly.

Personal data gets the same care. Horizon's memory is built for what you love, not for who you are. It can keep a favorite rocket or the telescope you own, and it is instructed never to store names, ages, locations, addresses, professions, gender or medical details. Conversations fade after a period of silence, lasting interests expire if you stop coming back, and a person's memory can be erased completely.

Around that sit the quieter defenses: rate limits, strict checks on uploaded files and a refusal to reach into private networks. Nobody notices this part when it works, which is exactly the point.

What I learned

Building an API changes who you are writing for. Every field name, every error and every limit becomes a small promise to someone you may never meet. And yet, from the very first response, they can tell how much you cared.

Horizon taught me that intelligence is not knowing everything. It is understanding what you do not know, going out to find it, and telling the truth when you cannot. The hard part was never a single piece. It was everything that holds the pieces together: a delayed launch, a summary traveling into another language, an answer that must still be true at the moment you read it.

Space has a way of making you humble. The light we see tonight began its journey long before us, and it will keep going long after. The least we can do, while we are here, is keep asking.

Somewhere above us, a rocket is counting down. Somewhere below it, someone looks up and wonders what that light is.

With one request, you can tell them.

Most of Horizon's data is collected by The Space Devs.

Access by request.