The PrivateMind API is published as an OpenAPI 3.1 document. It describes the request and response shapes, authentication and error codes of every endpoint in this reference: chat completions, the Messages API, the Responses API, embeddings, rerank, models, audio, image generation, files, batches, message batches, sandboxes and usage. The Model servers API has its own document, /openapi-model-servers.yaml. The Kubernetes API is in neither.
- Explore it: the interactive API explorer shows the spec with a built-in "Try it" console.
- Download it:
/openapi.yaml.
What you can do with it
- Import into Postman, Insomnia, or Bruno. Point the tool at
https://docs.privatemind.com/openapi.yamland the whole API loads as a collection you can call. - Generate client stubs. Give the spec to
openapi-generatorto build a typed client in your language. - Use it in your own tooling. The spec is plain YAML, so contract tests, mock servers and API gateways can read it.
# Generate a typed client from the published spec
npx @openapitools/openapi-generator-cli generate \
-i https://docs.privatemind.com/openapi.yaml \
-g python \
-o ./privatemind-clientTwo response shapes on shared paths
/models and /files answer in the OpenAI shape, or in the Anthropic shape when the request carries the optional anthropic-version header. The spec lists both schemas on each. The same header switches any endpoint's errors to the Anthropic envelope.
For the Messages API, the official Anthropic SDKs are easier to use than generated code. See Anthropic SDK.
For chat and embeddings, prefer the OpenAI SDK
The API is OpenAI-compatible, so for chat completions and embeddings the official openai client needs only our base URL. See the OpenAI SDK guide.
from openai import OpenAI
client = OpenAI(base_url="https://api.privatemind.com/v1", api_key=PMIND_KEY)Use the spec for what the OpenAI SDK doesn't cover: the rerank and voices endpoints, and languages with no official OpenAI SDK.
We maintain the spec by hand alongside these docs. If it and an endpoint's behaviour disagree, trust the endpoint and tell us.
Authentication in the explorer
To authorise calls in the explorer, paste a key into the Auth panel. The "Try it" console sends requests from your browser straight to https://api.privatemind.com/v1. Never paste a production key into a browser you don't trust.
Where next
- Authentication for the bearer-token format.
- Errors for the status-code and error-envelope contract the spec encodes.
- OpenAI SDK for chat and embeddings without generated code.