Nexus One AI ๐Ÿ”” Basic Tier
โšก
โ† All Tools

FastAPI

Build REST APIs that connect your existing applications to the AI models on this server.
Open API Docs โ†— ReDoc View โ†— ๐Ÿ”Œ http://ai.local:8080
What is it?

In plain terms

FastAPI is a Python framework for building web APIs. In the context of Nexus One AI, it's used to create custom API endpoints that your existing applications (ERP, portals, internal tools) can call to get AI responses โ€” without those applications knowing anything about Ollama or LangChain directly.

When you'd use it

  • You have an existing application that should be "AI-enabled"
  • You want a custom endpoint like /api/summarise-complaint
  • You want to add authentication, rate limiting, or logging on top of AI calls
  • Your team builds in Java, .NET, or another language (they call FastAPI, not Python directly)
  • You want to expose a specific AI workflow as a simple API
๐Ÿ’ก Already using Ollama? Ollama itself exposes a REST API at http://localhost:11434/api/chat that's compatible with the OpenAI API format. Many applications can connect to this directly โ€” check if you need FastAPI at all before building a custom layer.
Ollama's built-in API (try this first)

Direct API โ€” no FastAPI needed

Base URL http://[server-ip]:11434
Chat POST /api/chat
Generate POST /api/generate
OpenAI compat POST /v1/chat/completions
When to build a FastAPI layer
1

Custom business logic

If your AI workflow needs pre-processing (validate input, look up a record) or post-processing (format the output, log the result, trigger an action), FastAPI is where that logic lives.

2

Document Q&A endpoint

You want POST /api/query-documents that takes a question, queries ChromaDB, and returns an answer with source references. This combines LangChain + ChromaDB + Ollama behind one clean endpoint.

3

Authentication and access control

If you need API keys, user-based rate limits, or audit logs on AI usage, FastAPI is where you enforce those policies before passing the request to Ollama.

4

Multi-step workflows

If answering a request requires calling the AI multiple times (classify, then summarise, then extract), FastAPI orchestrates those steps and returns a single clean response.

Works with
๐Ÿฆ™ Ollama ๐Ÿ”— LangChain ๐Ÿ—‚๏ธ ChromaDB ๐Ÿ““ Jupyter