API Reference

PrivateGPT exposes a REST API that follows the Claude API model. All endpoints are available at http://localhost:8080 by default.

The interactive reference below is generated from the OpenAPI schema. Use it to explore request bodies, response shapes, and try requests directly.


Endpoint groups

GroupEndpointsDescription
MessagesPOST /v1/messages and variantsChat, streaming, token counting, validation, async
ModelsGET /v1/modelsList and inspect available models
Artifacts/v1/artifacts/*Ingest, list, retrieve, and delete documents
EmbeddingsPOST /v1/embeddingsGenerate text embeddings
Tools/v1/tools/*Semantic search, web search, web fetch, database query, tabular analysis
PrimitivesPOST /v1/primitives/searchLow-level chunk retrieval
Skills/v1/skills/*Create and manage reusable instruction sets

Authentication

When auth is enabled, pass a bearer token on every request:

$curl http://localhost:8080/v1/messages \
> -H "Authorization: Bearer <your-token>" \
> -H "Content-Type: application/json" \
> -d '{...}'

Auth is disabled by default. Enable it in settings.yaml:

1server:
2 auth:
3 enabled: true
4 secret: "Basic <base64-encoded-user:pass>"