Cairndocs
Get API key

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

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.

main.py
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)

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.

Was this page helpful? Edit on GitHub ↗