PrivateMind API
OpenAI-compatible inference API for chat, responses, embeddings, vision, tools, audio, images, batch and reranking, plus the Anthropic Messages API.
The PrivateMind API is OpenAI-compatible. For chat completions and embeddings
you can use the official openai client libraries by pointing base_url at
https://api.privatemind.com/v1 and using a PrivateMind API key. Endpoints
that have no OpenAI equivalent (rerank, voices, container execs) are called
over plain HTTP or the client's generic request methods.
Authentication uses a bearer token of the form ACCESS_KEY_ID:SECRET
(the two halves joined by a colon, passed as one opaque token). Manage keys
under Settings → API Keys in the app. See the
Authentication guide.
The same keys and models also serve the Anthropic Messages API
(/messages, /messages/count_tokens, /messages/batches), for clients
built on the Anthropic SDKs: point them at https://api.privatemind.com
and send the key as x-api-key or a bearer token. /models and /files
answer in the Anthropic shape when the request carries anthropic-version.
See the Messages API guide.
/responses serves the OpenAI Responses API on the same keys and models,
for clients such as Codex CLI and the OpenAI Agents SDK. It stores no
responses: send the whole conversation in input on every request. See the
Responses API guide.
This document is the machine-readable contract for the public API surface. It is hand-maintained alongside the human docs and is the file behind the interactive API explorer.
Chat
POST/chat/completionsCreate a chat completionPOST/chat/count_tokensCount input tokens
Responses
POST/responsesCreate a response
Embeddings
POST/embeddingsCreate embeddings
Rerank
POST/rerankRerank documents by relevance
Model catalog
GET/modelsList available modelsGET/models/{model_id}Retrieve one model
Audio
POST/audio/speechSynthesise speech from textPOST/audio/transcriptionsTranscribe audio to textGET/voicesList text-to-speech voices
Images
POST/images/generationsGenerate an image from a prompt
Usage
GET/usageList your usage rowsGET/usage/summaryAggregate your usage by group
Batch
GET/batchesList batchesPOST/batchesCreate a batchGET/batches/{batch_id}Retrieve a batchPOST/batches/{batch_id}/cancelCancel a batch
Files
GET/filesList filesPOST/filesUpload a fileGET/files/{file_id}Retrieve file metadataPOST/files/{file_id}Change who can see a fileDELETE/files/{file_id}Delete a fileGET/files/{file_id}/contentDownload file contentGET/files/usageStorage usage
Sandboxes
GET/containersList sandboxesPOST/containersCreate a sandboxGET/containers/{container_id}Retrieve a sandboxDELETE/containers/{container_id}Delete a sandboxGET/containers/{container_id}/filesList a sandbox's filesPOST/containers/{container_id}/filesUpload a file into a sandboxGET/containers/{container_id}/files/{file_id}Retrieve a sandbox fileDELETE/containers/{container_id}/files/{file_id}Delete a sandbox fileGET/containers/{container_id}/files/{file_id}/contentDownload a sandbox fileGET/containers/{container_id}/execsList a sandbox's execsPOST/containers/{container_id}/execsRun code in a sandboxGET/containers/{container_id}/execs/{exec_id}Retrieve an execPOST/containers/{container_id}/execs/{exec_id}/cancelCancel an exec
Messages
POST/messagesCreate a messagePOST/messages/count_tokensCount message tokens
Message batches
GET/messages/batchesList message batchesPOST/messages/batchesCreate a message batchGET/messages/batches/{message_batch_id}Retrieve a message batchDELETE/messages/batches/{message_batch_id}Delete a message batchPOST/messages/batches/{message_batch_id}/cancelCancel a message batchGET/messages/batches/{message_batch_id}/resultsStream message batch results