What’s In a Name: A Simple Web App Using Perplexity’s Sonar API

Whats In A Name is a simple Flask app that uses the Sonar API from Perplexity.ai to fetch interesting, cultural, and historical facts about names.

Enter a name, get a fun fact. That’s it!


If you're getting started with Perplexity’s Sonar API, this is a very basic example you can try by just placing your own Perplexity Sonar API key at the point specified in the code shared on GitHub.

Based on the scenario, you can use any of the following Sonar models:

  1. sonar (lightweight search) 
  2. sonar-pro (advanced search)
  3. sonar-deep-research (exhaustive research)
  4. sonar-reasoning (fast reasoning)
  5. sonar-reasoning-pro (premier reasoning)

You can deploy Flask apps on the web using one of the many options like Anaconda's PythonAnywhere. With a limited Beginner account, you can host one web app at your-username.pythonanywhere.com with restricted outbound Internet access from your apps at low CPU/bandwidth. 

Comments

Popular posts from this blog

Kai-Fu Lee on China-US AI Race - Q&A Transcript from a Bloomberg Interview

The Mercurial Grok AI Assistant Understands & Speaks Indian Languages

40 Talks from the Google Web AI Summit 2025