Integrate with Gaur
The integrator's path. Query governed contracts from your applications, dashboards, and AI agents.
The Integrate track is for developers calling Gaur from their own software. You don't need to author contracts to integrate. You need a consumer slug, an API key, and the name of a contract to query.
If you're authoring contracts rather than consuming them, head to the Build track.
The three protocols
A consumer exposes its contracts through three protocols. Pick the one that fits your use case, or use more than one.
REST query API
Send a structured JSON request and get back governed rows. Best for dashboards and application features that need exact, repeatable results.
Chat completions API
An OpenAI-compatible endpoint. Send messages, get an answer grounded in the consumer's contracts. Best for conversational features.
MCP server
Connect an AI agent over the Model Context Protocol so it can discover and call contracts as tools.
Everything you call is governed
Whichever protocol you use, you're always calling a contract. You never write SQL, never see raw schemas, and never bypass the row-level security a builder put in place. That's the point: your integration gets correct, consistent numbers, and the data team can change what's underneath without breaking you.
Before you start
You need three things from whoever administers your Gaur workspace:
- The base URL of the Gaur instance.
- A consumer slug, the consumer your integration will call.
- An API key for that consumer.
With those, every request looks like this:
curl -X POST https://<base-url>/v1/api/<consumer_slug>/query \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{ "contract_name": "daily_revenue", "query": { "measures": ["revenue"] } }'Pages in this track
- Authentication: how API keys work.
- Querying contracts: the REST query API.
- Chat: the OpenAI-compatible chat completions API.
- Using MCP: connecting AI agents.
- Pagination: paging through large results.
- Examples: worked code in curl, JavaScript, and Python.
For exact request and response schemas, see the API Reference.