Local REST API
The Privane CLI bundles a highly efficient REST server that matches the OpenAI API specification. This allows you to use Privane as a drop-in replacement for any tool that expects OpenAI endpoints (like LangChain, Cursor IDE, or AutoGen).
OpenAI-Compatible by Design
Exposing an OpenAI-compatible API gateway allows existing AI frameworks, development environments, and software agents to run fully locally with exactly zero code changes.
This completely eliminates vendor lock-in and allows you to transition your existing cloud-dependent apps to a private, localized ecosystem overnight.
Privane functions as a seamless drop-in replacement for:
- Orchestration Frameworks: LangChain, AutoGen, CrewAI, LlamaIndex
- Agentic Ecosystems: OpenHands, AutoGPT
- AI Coding Interfaces: Cursor, Continue.dev, VSCode extensions
- Standard Clients: Official OpenAI SDKs (Python, Node.js, Go, Rust)
Starting the Server
privane serveThis starts a local instance running on http://localhost:8080.
Example: cURL
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gemma-2b",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Explain quantum computing in simple terms."
}
]
}'Example: LangChain
You can easily configure the official LangChain OpenAI wrappers to point to your local Privane instance.
from langchain_openai import ChatOpenAI
# Point the base_url to the Privane Local API
llm = ChatOpenAI(
base_url="http://localhost:8080/v1",
api_key="not-needed",
model="gemma-2b"
)
response = llm.invoke("What is the capital of France?")
print(response.content)