Client fit
Keep your chat app, editor or terminal and connect through a client that accepts a custom OpenAI-compatible endpoint. For a direct Chat Completions connection, use the base URL http://127.0.0.1:18081/v1, the model identifier tokspur and the key in .tokspur/state/api-key.
The clients below document these connection options. Streaming, tool calls and cancellation need to pass the connection checks with the exact client, model and runtime versions.
Choose your tools
| App, editor or agent | Connection |
|---|---|
| Chat apps | OpenAI-compatible provider |
| VS Code | Custom Endpoint, Cline or Continue |
| Cursor | Cline extension |
| JetBrains IDEs | AI Assistant or Continue |
| Zed | OpenAI-compatible provider |
| Roo Code and Kilo Code | OpenAI-compatible provider |
| Neovim and Emacs | CodeCompanion or gptel |
| Aider | Direct Chat Completions |
| OpenCode | Direct Chat Completions |
| Claude Code | Messages through the local gateway |
| Codex CLI | Responses through the local gateway |
The guides follow each client’s documented provider settings. Use the connection checks to confirm the route with your client version. Tokspur serves text and tool calls. These connections do not add image input, embeddings or inline completion support.
Load the key
Run this from the tokspur checkout in the shell that will launch your client. It loads the configured key without printing it:
export TOKSPUR_API_KEY="$(cat .tokspur/state/api-key)"For a graphical editor, use its provider key field or credential storage. Keep keys out of shared configuration files. The direct API base is http://127.0.0.1:18081/v1.
Chat apps
A chat app that lets you add an OpenAI-compatible provider can use tokspur as a private assistant. Add a provider with the base URL http://127.0.0.1:18081/v1, the model tokspur and the key from .tokspur/state/api-key. Set the context length to 65536 and turn off image and file uploads, because tokspur works with text only.
Run the app on the same Mac, because the server listens on the loopback interface only. tokspur answers requests in turn, so it suits a personal assistant rather than a shared service. It refuses requests that carry a browser Origin header, so use a desktop or terminal app, or a web app whose own server makes the requests.
Cursor
For a local connection inside Cursor, use the Cline extension and configure its OpenAI Compatible provider. Cline lists Cursor among its supported editors. This uses Cline as the agent inside Cursor.
Cursor's built-in model requests pass through Cursor's servers, including requests made with your own API key. That is a different privacy boundary from a direct local connection. See Cursor's API-key documentation before choosing that route.
See Cline setupCline
In Cline settings, select OpenAI Compatible as the API provider, set the base URL to http://127.0.0.1:18081/v1, paste the key and set the model ID to tokspur. Set the context window to 65536, reserve up to 8192 output tokens and turn off image input. Cline documents custom API connections, including local endpoints.
Review tool permissions and network settings before using an agent on a private repository.
Continue
In the Continue extension for VS Code or JetBrains, add the model to your existing config.yaml with the OpenAI provider, the local apiBase and the key. Use chat and edit roles and leave the Responses API off. Continue documents custom local endpoints and selecting Chat Completions instead of the Responses API.
models:
- name: tokspur
provider: openai
model: tokspur
apiBase: http://127.0.0.1:18081/v1
apiKey: YOUR_KEY
useResponsesApi: false
roles: [chat, edit]
capabilities: [tool_use]
defaultCompletionOptions:
contextLength: 65536
maxTokens: 8192Aider
After loading the key, Aider reads the base URL and key from the environment and takes the model with openai/ in front of its identifier. Follow its custom API instructions, and pick an edit format that matches the model.
export OPENAI_API_BASE=http://127.0.0.1:18081/v1
export OPENAI_API_KEY="$TOKSPUR_API_KEY"
aider --model openai/tokspurConnection checks
| Check | Expected behaviour |
|---|---|
| Text request | The model tokspur returns a response through the local endpoint. |
| Streaming | The client assembles chunks in order, keeps thinking apart from the answer and recognises completion. |
| Tool round-trip | The client receives a tool call, returns the result with the matching call identifier and keeps declaring the tools used earlier in the conversation. |
| Cancellation | Stopping a request releases the generation before another begins. |
| Errors | A wrong key (401), a refused request (400) and a busy server (429) are visible to the user. |
Agent permissions
The client decides which files to read, commands to run and external services to contact. Review those permissions in the client. Choosing a local model endpoint does not alter them.
Read the API contract before configuring a client. Use connection troubleshooting when a request fails.