explaingit

ogx-ai/ogx

8,373PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

A self-hosted API server that works as a drop-in replacement for OpenAI, letting you swap between AI models from Ollama, OpenAI, Gemini, Mistral, and others without changing your application code.

Mindmap

mindmap
  root((repo))
    What it does
      Unified AI API server
      OpenAI drop-in replacement
      Multi-provider routing
    Supported providers
      Ollama local models
      OpenAI GPT
      Gemini Mistral
    Features
      Vector document store
      Batch processing
      MCP server support
    SDK compatibility
      OpenAI SDK
      Anthropic SDK
      Google GenAI SDK
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Point any existing OpenAI-compatible app or tool at your own OGX server so you can swap AI models without rewriting a single line of code.

USE CASE 2

Use a local Llama model via Ollama during development and switch to a cloud-hosted model in production, all through one server.

USE CASE 3

Store and search documents through OGX's vector store endpoints so your AI app can answer questions about files you upload.

USE CASE 4

Let a team using different AI SDKs, OpenAI, Anthropic, and Google, all connect to one shared internal server with one set of credentials.

Tech stack

PythonOllama

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Ollama or API keys for cloud providers depending on which backend you configure.

License not specified in the explanation.

In plain English

OGX is an open-source API server that you run yourself, giving you a single interface for working with AI language models from different providers. It is designed to be a drop-in replacement for the OpenAI API, which means any code or tool already written to talk to OpenAI can be pointed at an OGX server instead, with no code changes required. The main benefit is flexibility around which AI model actually runs behind the scenes. You can configure OGX to use a locally-running model through Ollama during development, then swap to a faster production-grade setup or a cloud-hosted model when deploying, without touching your application code. Models like Llama, GPT, Gemini, and Mistral are all supported through a pluggable provider system. Beyond basic chat and text generation, OGX offers a Responses API that handles more complex sequences of actions: calling external tools, connecting to MCP servers, and searching through uploaded documents, all within a single API call. It also provides endpoints for storing and searching documents (vector stores), handling uploaded files, and running large processing jobs in batch mode. The server supports not just the OpenAI API format but also the Anthropic SDK format and the Google GenAI SDK format, so clients written for any of those three providers can connect to the same OGX server. This means a team using different AI libraries can all point at one internal server rather than managing multiple API keys and endpoints. OGX started life as a project called Llama Stack and was renamed when the scope expanded beyond Llama models. Client libraries are available in Python and TypeScript. The project is open source and actively maintained with a public community call each week.

Copy-paste prompts

Prompt 1
I have an existing Python script that calls OpenAI's chat completion endpoint. Show me the minimal change needed to point it at my OGX server instead, running Llama locally via Ollama.
Prompt 2
How do I configure OGX to use Ollama as the backend for local development and switch to a different provider for production? Show me the config file.
Prompt 3
I want to upload a PDF to OGX and then ask questions about it using the Responses API. Give me Python code that uploads the file and sends a query.
Prompt 4
Walk me through running OGX locally: what command starts the server, and how do I verify it is accepting requests with a quick curl test?
Prompt 5
My team uses both the Anthropic SDK and the OpenAI SDK. How does OGX let both sets of client code connect to the same server without changing anything on the client side?
Open on GitHub → Explain another repo

← ogx-ai on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.