Get started › Quickstart
Quickstart
Make your first grounded request in five minutes. You’ll need an API key and one of the SDKs.
1. Install the SDK
pip install cairn
npm install @cairn/sdk
# nothing to install
2. Authenticate
Create a key in the console. Keys are shown once; store them in an environment variable, never in code.
3. Make a grounded request
Pass sources to restrict retrieval. Every claim in output_text is matched to an entry in citations.
from cairn import Cairn
client = Cairn()
r = client.responses.create(
model="ridge-2.0",
input="Summarize our DPA obligations",
sources=["drive://legal"],
)
print(r.verification, r.citations)
import Cairn from "@cairn/sdk";
const client = new Cairn();
const r = await client.responses.create({
model: "ridge-2.0",
input: "Summarize our DPA obligations",
sources: ["drive://legal"],
});
console.log(r.verification, r.citations);
curl https://api.cairn.example/v1/responses \
-H "Authorization: Bearer $CAIRN_API_KEY" \
-d '{
"model": "ridge-2.0",
"input": "Summarize our DPA obligations",
"sources": ["drive://legal"]
}'
4. Check the verification state
Each response has verification: grounded, needs_review or unsupported. Show it to your users next to the answer, not in a tooltip.