Aspen / Guide
OpenAI-compatible local API
Aspen exposes a local gateway that speaks the OpenAI API format. That lets software written for an OpenAI-style client use a model running on your own computer by changing the base URL and API key rather than rewriting the application.
The local endpoint
On the machine running Aspen, the OpenAI-compatible base URL is:
http://localhost:4000/v1Use an Aspen API key rather than a cloud-provider key. Because the gateway is local, requests can be handled by the model running on your own hardware.
OpenAI Python SDK example
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:4000/v1",
api_key="YOUR-ASPEN-KEY",
)
response = client.chat.completions.create(
model="your-local-model",
messages=[{"role": "user", "content": "Explain this code."}],
)
print(response.choices[0].message.content)The important integration change is the base_url and API key. Model names depend on what you have installed and selected in Aspen.
What can connect?
Any tool that can target an OpenAI-compatible endpoint can potentially use the gateway. Aspen’s documentation specifically covers OpenAI-style clients and integrations such as LangChain, Cursor, Continue.dev, n8n and Zapier. Compatibility can vary by the exact features a third-party tool expects, so test the endpoints your application actually uses.
Why use a local API?
- Keep inference on hardware you control.
- Develop without a per-token cloud bill for local requests.
- Reuse OpenAI-style client libraries and tooling.
- Run application workflows even when internet access is unavailable, as long as the workflow itself does not depend on online tools.
Remote access and keys
Aspen can also expose a private HTTPS URL so your own devices or applications can reach the AI running on your computer remotely. Aspen supports different key types for different trust levels. Treat an Owner key as highly privileged and use the least-privileged key appropriate for a client.
See the Aspen documentation for current API and key details, or start with the local LLM guide.
Frequently asked questions
What is Aspen’s OpenAI-compatible base URL?
For local access on the machine running Aspen, use http://localhost:4000/v1.
Do I use my OpenAI API key?
No. Point the client at Aspen’s base URL and use an Aspen API key.
Can existing OpenAI-style apps use Aspen?
Many can. If the application lets you configure an OpenAI-compatible base URL and API key, it can often point at Aspen without a major rewrite. Test the specific API features your app relies on.
Run AI on your own hardware
Aspen is free on Mac, Windows and iPhone. No subscription or account required.
Get Aspen free →