ToolPiper API
ToolPiper is the local AI server that powers ModelPiper. It runs on your Mac, manages inference engines, and exposes an OpenAI-compatible API at localhost:9998.
http://localhost:9998/v1SpecGET /v1/openapi.jsonHow It Works
ModelPiper is the web app ToolPiper serves on your Mac. It talks to ToolPiper, a native macOS app running in the background. ToolPiper manages the actual AI engines — llama.cpp for LLMs, FluidAudio for speech, CoreML for images, and more.
When you create a Provider in ModelPiper, you're setting up a configuration that pairs an AI model with a specific engine. For example: Use the Llama 3.2 3B model via llama.cpp or Use Parakeet for speech-to-text via FluidAudio. Each provider becomes a usable endpoint on the ToolPiper API.
ModelPiper uses an internal session key to stay connected to ToolPiper — you don't need to think about that. But if you want to build your own app on top of ToolPiper, you'll need a Developer Token.
Developer Tokens
A dev token lets you use ToolPiper from your own code, just like an OpenAI API key. Choose the scopes your client needs, supply the token to your OpenAI-compatible SDK, and point the base URL at localhost:9998/v1.
In ToolPiper, open Security and choose Create Token on the Tokens tab. Only chat is selected by default, for inference. If your client's model picker calls GET /v1/models, choose Chat with models, which adds tools:read, or explicitly select tools:read too. Copy the token when it appears: ToolPiper shows it only once.
MCP calls also require tools:exec, each tool's declared scope and a compatible token audience. Always Allow cannot add missing scopes.
Security lets you inspect and revoke existing grants; their scopes cannot be edited in place. If your client supports a manually supplied token, create a separate token with the scopes it needs. Ordinary OAuth can grant only chat, tools:read and tools:exec. Reconnecting alone cannot bypass that limit; refreshing the tool catalog does not change scopes. When a connected app's row in Security offers Change Access, it disconnects the app so its next consent can grant the access you choose once you approve it. Reconnect the app within 10 minutes. A connection cannot be given system:control this way; that takes a token you create.
The ModelPiper app's Developer tokens page requests all six developer scopes when creating a token. It also binds a token to one of your providers and sets the Anthropic proxy's default backend.
Claude Code Zero-config
Claude Code connects through two switches in its row on ToolPiper's Home screen. Tools runs claude mcp add -s user --transport http toolpiper http://127.0.0.1:9998/mcp. Engine runs new sessions of your normal claude on any provider you've configured here, and open sessions stay as they are. It writes a few entries to Claude Code's user settings and puts the file back as it found it when turned off. The endpoints below serve it. Most of them need no plan; the badge on a row says which one the rest need.
New to all of this? See the comparison vs Ollama / vLLM / LM Studio.
/model lists them, and each compacts on its own. A local chat stays at its own window, and the same model in chat and Claude Code loads twice. Both switches are free. So are plain token minting via /v1/tokens and pointing any Anthropic-compatible client at the proxy yourself. Anthropic Proxy Backend Phase 1 plumbing
ToolPiper will expose POST /v1/messages as an Anthropic-shape proxy so Claude Code (and any Anthropic-compatible client) can use any provider you've configured. Pick the global backend below, or bind a specific provider per token in the table above.
PATCH /v1/settings/anthropic-proxy. A token bound to a provider uses that provider instead. Quick Start
Drop-in replacement for the OpenAI SDK — just change the base URL and API key. Questions? @ModelPiper on X.
MCP Server 470 tools
ToolPiper is also an MCP server. Install categories individually to control which tools your AI client sees — saves context tokens.
See MCP docs for install commands, profiles, and full tool reference.
Endpoints
Inference
OpenAI-compatible inference endpoints
- GET
/v1/modelsList available models - POST
/v1/chat/completionsCreate chat completion - POST
/v1/embeddingsCreate embedding (OpenAI-compatible) - POST
/v1/benchmark/harnessRun one declared benchmark workload - GET
/v1/benchmark/workloadsList declared benchmark workloads and engine availability - POST
/v1/benchmark/llmBenchmark on-disk text-generation models
Audio
Speech-to-text and text-to-speech
- POST
/v1/audio/transcriptionsTranscribe audio - POST
/v1/audio/speechText-to-speech
Image
Image processing (upscale)
RAG
Retrieval-Augmented Generation — collections, ingestion, and semantic search
Cloud Proxy
Keychain-backed cloud API proxy
Models
Model management, downloads, and HuggingFace integration
- GET
/v1/models/installedList downloaded models - GET
/v1/models/{modelId}Get model details - DELETE
/v1/models/{modelId}Delete a model - GET
/v1/models/storageDisk usage for models - GET
/v1/models/searchSearch HuggingFace for models - POST
/v1/models/downloadDownload a model from HuggingFace - GET
/v1/models/infoInspect a model candidate from any source - POST
/v1/models/acquireAcquire a model component from any source - POST
/v1/models/fitAdvisory memory verdict for one model - POST
/v1/models/fit/batchAdvisory memory verdicts for several models - GET
/v1/models/downloadsList active downloads - DELETE
/v1/models/downloads/{downloadId}Cancel a download - POST
/v1/models/scanScan for new models - GET
/v1/models/foreign-librariesWhat the model managers already on this machine hold - POST
/v1/models/foreign-libraries/adoptAdopt models from the libraries already on this machine - GET
/v1/models/hf/{owner}/{repo}/filesList files in a HuggingFace repo - GET
/v1/models/hf/{owner}/{repo}/infoHuggingFace repo details with its downloadable files
Model Configs
Curated model presets with availability status
- GET
/v1/model-configsList model presets - POST
/v1/model-configs/installInstall a model by preset ID
Engine
Inference engine control and model state
- GET
/v1/engine/statusEngine and backend status - POST
/v1/engine/loadLoad a model into the engine - POST
/v1/engine/unloadUnload a model or stop the engine - GET
/v1/models/statePer-model runtime states - POST
/v1/models/reloadReload a llama-server-backed model
Tokens
Developer token management (all tiers; requires the tokensManage scope)
- GET
/v1/tokensList developer tokens - POST
/v1/tokensCreate a developer token (all tiers; requires the tokensManage scope) - PATCH
/v1/tokens/{tokenId}Update a developer token's metadata - DELETE
/v1/tokens/{tokenId}Revoke a developer token
Apple
Apple-native framework tools (Vision, NLP) — no model downloads required
- GET
/v1/apple/ocr/languagesList supported OCR languages - POST
/v1/apple/nlp/languageDetect language - POST
/v1/apple/nlp/sentimentAnalyze sentiment - POST
/v1/apple/nlp/entitiesNamed entity recognition - POST
/v1/apple/nlp/tokenizeTokenize text - POST
/v1/apple/nlp/lemmatizeLemmatize text - POST
/v1/apple/nlp/posPart-of-speech tagging
System
Health checks, resource monitoring, events, and licensing
- GET
/statusHealth check - GET
/session-tokenRetired ambient bootstrap - GET
/v1/permissionsmacOS permission snapshot - GET
/v1/analytics/answer-ratingWhether answer thumbs show - POST
/v1/analytics/answer-ratingRate one finished answer - GET
/v1/features/readinessWhether each feature can run - GET
/v1/system/resourcesGPU, RAM, and ANE utilization - POST
/v1/diagnostics/build-receiptProve which build the running process loaded - POST
/v1/diagnostics/owner-collectionStart, poll or cancel an owner voice-latency collection run - GET
/v1/eventsSSE event stream - GET
/v1/licenseSubscription tier and features - GET
/v1/settings/cost-displayWhether token cost is shown - PUT
/v1/settings/cost-displaySet whether token cost is shown - GET
/v1/openapi.jsonOpenAPI specification - GET
/v1/audit/tools/replayReplay current firewall rules against the recorded tool trail - GET
/v1/diagnostics/launchCurrent process identity and launch readiness - GET
/v1/diagnostics/qualificationQualification host run identity - GET
/v1/diagnostics/qualification/artifactsQualification host evidence export - GET
/v1/diagnostics/qualification/world-stateQualification host world state - GET
/v1/audit/toolsTool dispatch audit log - DELETE
/v1/audit/toolsPurge the audit trail - GET
/v1/audit/tools/rollupPermanent audit rollup - GET
/v1/audit/tools/diagnosticAudit trail diagnostic export - POST
/v1/audit/tools/rotateRotate the audit trail - GET
/v1/token-accounting/sessionToken accounting session snapshot - DELETE
/v1/token-accounting/sessionDelete a session's accounting - GET
/v1/token-accounting/attemptsToken accounting attempts page - GET
/v1/token-accounting/changesToken accounting change feed - GET
/v1/token-accounting/healthToken accounting operability report - POST
/v1/token-accounting/recoverRun one ledger recovery action - GET
/v1/snippets/match/statusSnippet match diagnostics
Configurations
Endpoint configuration management
- GET
/v1/configurationsList endpoint configurations - POST
/v1/configurationsCreate an endpoint configuration - POST
/v1/configurations/discover-modelsList the models a provider offers - PUT
/v1/configurations/{configId}Update an endpoint configuration - DELETE
/v1/configurations/{configId}Delete an endpoint configuration
Logs
Log ingestion, querying, and real-time streaming
- GET
/v1/logsQuery log entries - POST
/v1/logsIngest log entries - GET
/v1/logs/streamReal-time log stream (SSE) - POST
/v1/logs/clearClear all log entries - GET
/v1/logs/exportExport logs to file (GET form) - POST
/v1/logs/exportExport logs to file
Browser
CDP-based browser automation
- GET
/v1/browser/statusBrowser connection status - POST
/v1/browser/connectConnect to a browser via CDP - POST
/v1/browser/disconnectDisconnect from browser - GET
/v1/browser/pagesList open browser pages - GET
/v1/browser/snapshotAccessibility tree snapshot - GET
/v1/browser/channelsList browsers ToolPiper can drive, with each one's state and which is in force
Testing
PiperFlow — visual test session management and execution
- POST
/v1/test-sessions/{sessionId}/exportMax $49/mo Export a test session to Playwright or Cypress code
Pose
Human pose estimation via Apple Vision / CoreML, including on-demand real-time 60fps skeleton streaming via WebSocket
Stream
Real-time stream processing
- GET
/v1/stream/statusGet stream session status - POST
/v1/stream/outputDrain a stream session's processed results (pull delivery)
Scrape
CDP-based web page scraping with framework-aware readiness. Extracts content in up to 7 formats (markdown, text, readability, axTree, html, links, screenshot) from a single page load
Video
Video creator pipeline — settings, screenplays, recording, rendering, and narration
- GET
/v1/media/clip/{id}Poll a clip export job - GET
/v1/media/record/{id}Poll a recording job - POST
/v1/media/record/{id}/stopStop a recording
Voice Chat
Persistent voice conversation with model selection, conversation memory, and sentence-level TTS streaming
- GET
/v1/voice-chat/settingsGet voice chat settings - PUT
/v1/voice-chat/settingsUpdate voice chat settings - POST
/v1/voice-chat/sessionCreate a voice chat session - DELETE
/v1/voice-chat/sessionEnd the active voice chat session - GET
/v1/voice-chat/chatRead which chat a spoken turn lands in - PUT
/v1/voice-chat/chatReport what a viewer shows
Tool Permissions
MCP tool permission policies
- GET
/v1/tool-capabilitiesRead agent capabilities, scoped permissions and delivery - POST
/v1/tool-capabilities/previewPreview one capability, permission or delivery command - POST
/v1/tool-capabilities/commandsApply a previewed command
Tools
Unified tool catalog, retrieval probes, and session-scoped client-tool registration (PiperMatch / ToolGate plumbing)
- GET
/v1/tool-approvals/heldTools whose calls ToolPiper is still handling for the caller - POST
/v1/tool-approvals/{id}Answer a pending tool approval - GET
/v1/tools/catalogThe tool catalog with each tool's tier, availability and per-provider schema cost - POST
/v1/tools/probeRank a candidate tool against PiperMatch on a set of cases - POST
/v1/tools/register-client-catalogRegister session-scoped client tools into the unified index - POST
/v1/tools/unregister-client-catalogUnregister a session's client tool catalog - GET
/v1/tools/nativeNative tool catalog (unfiltered)
Jobs
Shared async-job substrate — list, inspect, and cancel long-running verb jobs (chat-to-feature foundation Phase 2)
- GET
/v1/jobsList async-job records - GET
/v1/jobs/{jobId}Fetch a single async-job record - POST
/v1/jobs/{jobId}/cancelCancel an in-flight async job
Assets
Provenance-linked typed-Asset substrate — byte→typed-Asset rich ingress (unified-memory-media-substrate Phase 3)
- POST
/v1/assets/importImport raw bytes as a typed Asset
Vault
Encrypted Writing Vault — decrypted note/folder CRUD over loopback while natively unlocked; every content route answers 423 vault_locked otherwise. Unlock and passphrase flows are native-only and have no routes (docs/plans/encrypted-writing-vault.md Phase 4)
- GET
/v1/vault/statusVault presence and lock state - GET
/v1/vault/treeThe whole decrypted vault tree - POST
/v1/vault/notesCreate an encrypted note - GET
/v1/vault/notes/{id}Read a decrypted note - PUT
/v1/vault/notes/{id}Overwrite a note's content - DELETE
/v1/vault/notes/{id}Delete a note - POST
/v1/vault/notes/{id}/moveMove and/or rename a note - POST
/v1/vault/foldersCreate a folder - DELETE
/v1/vault/folders/{id}Delete a folder recursively - POST
/v1/vault/folders/{id}/renameRename a folder in place - POST
/v1/vault/folders/{id}/moveMove a folder under a new parent - POST
/v1/vault/lockLock the vault - POST
/v1/vault/assetsImport an encrypted asset (exact bytes) - POST
/v1/vault/assets/import-urlImport an asset from a URL (or keep it as a live link) - GET
/v1/vault/assets/{id}Decrypt an asset for rendering
Capture
Screen and color capture utilities
Files
File-system utilities — archive, PDF extraction, code search
- POST
/v1/pdf/extractExtract text, pages, metadata, or images from a PDF - POST
/v1/filesystem/edit-fileExact-string edit of a text file - POST
/v1/filesystem/metadataNative media metadata for one file - POST
/v1/filesystem/move-fileMove or rename a file or directory
Web
Outbound HTTP and web search
- POST
/v1/web/searchRun a web search - GET
/v1/http/credential-operationsWhich stored-credential operations this build accepts
Translation
On-device text translation (Apple Translation framework)
- POST
/v1/translateTranslate text via the Apple Translation framework
Utilities
General macOS utilities — clipboard history, timers, QR codes, image transforms
- POST
/v1/timersStart, list, cancel, or clear timers - POST
/v1/image/segmentSegment an image Asset into per-region masks (non-minting)
Agent
Interactive agent kernel — start a turn on a session and consume its per-session SSE event stream (token deltas, tool-call proposals, tool results, cost frames)
- POST
/v1/agent/turnStart one interactive agent-kernel turn - POST
/v1/agent/turn/cancelStop the session's in-flight turn - POST
/v1/agent/turn/support-copyAn Ask turn's report for support - POST
/v1/agent/turn/feedbackPreview or send an Ask turn to ModelPiper - POST
/v1/agent/turn/endEnd an Ask session - GET
/v1/agent/streamPer-session agent event stream (SSE) - GET
/v1/agent/capabilitiesThe agent-turn features this ToolPiper enforces - GET
/v1/agent/runA conversation's latest run - POST
/v1/agent/approveAnswer a parked interactive tool approval - GET
/v1/agent/touchedList agent-touched file paths under a workspace root - GET
/v1/agent/touched/reviewThe durable review payload for one agent-touched file - POST
/v1/agent/touched/clearClear a reviewed agent touch
Task
The agent's per-session todo list — create/update/complete tasks the kernel tracks across a session, and read the list back
- POST
/v1/task/createCreate a task in a session's todo list - POST
/v1/task/updateUpdate a task's status - POST
/v1/task/completeMark a task completed - GET
/v1/task/listList a session's tasks
MCP
Model Context Protocol (Streamable HTTP transport)
- GET
/mcpGET not supported for MCP - POST
/mcpHandle MCP JSON-RPC request - DELETE
/mcpTerminate an MCP session - GET
/v1/mcp-serversList MCP servers - GET
/v1/mcp-servers/healthMCP server health - POST
/v1/mcp-servers/{name}/restartRestart an MCP server - POST
/v1/mcp-servers/{name}/reload-toolsReload an MCP server's tools - PUT
/v1/mcp-servers/{name}Add or update an MCP server
Anthropic
Anthropic Messages API proxy — drop-in backend for Claude Code and any Anthropic-shape client
- POST
/v1/messagesAnthropic Messages — drop-in proxy for Claude Code - POST
/v1/messages/count_tokensEstimate input tokens for an Anthropic Messages request - GET
/v1/settings/anthropic-proxyGet the global Anthropic Proxy backend setting - PATCH
/v1/settings/anthropic-proxyUpdate the global Anthropic Proxy backend setting
SERP
Search-engine results capture, rank tracking, and autocomplete keyword expansion (async job + poll)
YouTube
YouTube transcript extraction
Projects
Projects: the containers every chat and workbench belongs to, with the instructions, provider, folders and knowledge they share
- GET
/v1/projectsList projects - POST
/v1/projectsCreate a project - GET
/v1/projects/{id}Read one project - PATCH
/v1/projects/{id}Change a project - DELETE
/v1/projects/{id}Delete a project
Workbenches
Project-owned workbenches: one feature's content and working state, addressed by its Asset id
- GET
/v1/workbenchesList workbenches - POST
/v1/workbenchesCreate a workbench - GET
/v1/workbenches/{id}Read one workbench - PATCH
/v1/workbenches/{id}Rename a workbench - DELETE
/v1/workbenches/{id}Delete a workbench - PUT
/v1/workbenches/{id}/contentReplace a workbench's content - PATCH
/v1/workbenches/{id}/viewChange a workbench's view keys
Conversations
Chats: one record per conversation in its project, with the renderer's journal a client restores it from
- GET
/v1/settings/agent-paneWhether the agent arranges your chat pane - PUT
/v1/settings/agent-paneSet whether the agent arranges your chat pane - GET
/v1/conversations/{id}/entriesRead a chat's journal - POST
/v1/conversations/{id}/entriesAppend to a chat's journal
Connected Apps
Connected OAuth/bearer clients — listing, pending-consent management, blocking, and revocation
- GET
/v1/connected-appsList connected apps - GET
/v1/connected-apps/blockedList blocked apps - GET
/v1/connected-apps/pending-consentsList pending OAuth consents - POST
/v1/connected-apps/pending-consents/{id}/allowAllow a pending OAuth consent - POST
/v1/connected-apps/pending-consents/{id}/denyDeny a pending OAuth consent - POST
/v1/connected-apps/{id}/blockBlock a connected app - POST
/v1/connected-apps/{id}/revokeRevoke a connected app's token - POST
/v1/connected-apps/blocked/{id}/unblockUnblock a blocked client
Legacy: Ollama-compatible API NewLegacy dialect
ToolPiper serves the Ollama wire dialect as a legacy surface — a migration on-ramp, not a destination. Two mounts, one module: the loopback-only listener on :11434, on by default whenever that port is free (Settings → General, no auth, upstream's own posture), and this documented :9998 mount at /legacy/ollama/api/* behind the normal bearer middleware (set a configurable client's base URL to http://127.0.0.1:9998/legacy/ollama). Every response carries RFC 9745 "Deprecation" and a Link rel="successor-version" header — the surface was born deprecated, and each endpoint below names its /v1/ successor, which is where new integrations should land. Wire shapes are pinned to recorded fixtures from Ollama 0.23.4. Modelfile semantics (create, push, copy, blobs) are permanently rejected with guidance naming the successor route. The layer is deliberately disposable: it exists while it earns its keep, then it gets deleted.
http://127.0.0.1:11434opt-in listener — Settings → General, off by default, loopback-onlyBase URLhttp://127.0.0.1:9998/legacy/ollamaalways mounted, bearer-authenticated- GET
/legacy/ollama/api/versionOllama-dialect version probe — successor: GET /version - GET
/legacy/ollama/api/tagsOllama-dialect installed-model list — successor: GET /v1/models/installed - GET
/legacy/ollama/api/psOllama-dialect loaded-model list — successor: GET /v1/models/state - POST
/legacy/ollama/api/showOllama-dialect per-model detail — successor: GET /v1/models/installed - POST
/legacy/ollama/api/chatOllama-dialect chat (NDJSON stream) — successor: POST /v1/chat/completions - POST
/legacy/ollama/api/generateOllama-dialect generate (NDJSON stream) — successor: POST /v1/chat/completions - POST
/legacy/ollama/api/embedOllama-dialect embeddings — successor: POST /v1/embeddings - POST
/legacy/ollama/api/embeddingsOllama-dialect embeddings (alias upstream itself deprecates) — successor: POST /v1/embeddings - POST
/legacy/ollama/api/pullOllama-dialect model pull (NDJSON progress) — successor: POST /v1/models/download - DELETE
/legacy/ollama/api/deleteOllama-dialect model delete — successor: DELETE /v1/models/{id}
Credentials
- GET
/v1/credentialsList credentials - GET
/v1/credentials/rolesWhat material this Mac holds for each credential, per role - POST
/v1/credentials/api-keyCreate or update an API-key credential - DELETE
/v1/credentials/api-key/{credentialId}Delete an API-key credential - POST
/v1/credentials/oauth/connectConnect an OAuth grant - POST
/v1/credentials/oauth/connect/service-accountConnect an OAuth grant via service account - DELETE
/v1/credentials/oauth/{providerId}Disconnect an OAuth grant