Quickstart

Make your first cited research call in under five minutes.

1. Get an API key

Create an account, then open your dashboard and generate a key under API Credentials. New accounts start with 300 free credits per month — no card required. Keys look like:

text
bh_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Your key is shown once at creation and stored only as a hash — copy it somewhere safe. If you lose it, roll a new one from the dashboard.

2. Send a request

Pass your key in the X-API-Key header and a query in the JSON body. The response is a Server-Sent Events stream.

bash
curl -N -X POST https://api.bahith.dev/v1/research \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $BAHITH_API_KEY" \
  -d '{
    "query": "What is RLHF and why does it matter for LLMs?",
    "reasoning_level": "medium"
  }'

The -N flag disables curl buffering so you see events as they arrive.

3. Read the stream

Each line is a data: event. You'll see reasoning and tool calls, then the answer streaming token-by-token, then a final research.completed event with the full answer and citations. The stream ends with data: [DONE].

bash
# curl outputs the stream directly to standard output:
curl -N -X POST https://api.bahith.dev/v1/research \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $BAHITH_API_KEY" \
  -d '{ "query": "What is RLHF?" }'

Set reasoning_level to low, medium, or high to set a maximum ceiling on research iterations (up to 5 / 10 / 15 iterations; 10 / 15 / 20 credits). The model may stop earlier if it has enough context.

4. Try it live

Prefer to click around first? The dashboard Playground runs real research and renders the streamed answer with inline citations.

Next steps