File size: 1,149 Bytes
dc2d570
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---

title: Lancer Search API
emoji: ๐Ÿ”
colorFrom: purple
colorTo: blue
sdk: docker
pinned: false
---


# Lancer Search API

๐Ÿ” Advanced AI-powered search API with temporal intelligence.

## Features

- **Temporal Intelligence**: Understands when you need fresh vs historical info
- **Multi-Stage Reranking**: Freshness + Authority scoring
- **Multi-Source Search**: Tavily, DuckDuckGo
- **LLM Synthesis**: Groq or OpenRouter

## API Endpoints

```bash

# Search with synthesis

POST /api/v1/search

{

    "query": "What is the latest GPT model?",

    "max_results": 10,

    "freshness": "week"

}



# Health check

GET /health

```

## Environment Variables

Configure these in HuggingFace Space Secrets:

| Variable | Required | Description |
|----------|----------|-------------|
| `GROQ_API_KEY` | Yes* | Groq API key |
| `OPENROUTER_API_KEY` | Yes* | OpenRouter API key |
| `TAVILY_API_KEY` | Yes | Tavily search API key |
| `LLM_PROVIDER` | No | "groq" or "openrouter" |

*At least one LLM provider key required



## Local Development



```bash

pip install -e .

uvicorn app.main:app --reload

```