Passer au contenu principal
POST
Query a namespace

Autorisations

Authorization
string
header
requis

A key from conare.ai/dashboard/keys with full access, some namespaces, or models only (/embed, /rerank, /v1, /v2/rerank, /parse).

Paramètres de chemin

namespace
string
requis

The namespace name. 1-64 characters of a-z 0-9 _ -, starting with a letter or digit.

Pattern: ^[a-z0-9][a-z0-9_-]{0,63}$
Exemples:

"docs"

"user-42"

Corps

application/json
query
string

What to search for, in plain language; required unless cursor is set.

Required string length: 1 - 8000
top_k
integer
défaut:10

How many results to return; with cursor, the page size.

Plage requise: 1 <= x <= 500
max_results
integer

Rank this many documents and return them top_k at a time; at most 1,000 (5,000 on a custom model's engine).

Plage requise: 1 <= x <= 5000
cursor
string

A previous page's next_cursor; only top_k may be sent beside it.

exclude_ids
string[]

Documents no result may be (e.g. ones already seen); a long list can return fewer results.

Maximum array length: 10000

1-256 characters of A-Z a-z 0-9 . _ : -, starting with a letter or digit.

Pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$
filter
object

{"key": value} matches equal values (or arrays holding it); $eq, $ne, $in, $nin, $gt, $gte, $lt and $lte compare, $and and $or combine.

  • A filter holds at most 256 conditions (each value, $in item, range and join counts one), else 400 invalid_filter.
  • Ranges compare numbers with numbers and strings by UTF-8 bytes: write dates alike (2025-06-01) to sort them.
  • $ne and $nin work in queries, not deletes, and match documents without the key.
Exemples:
rerank
boolean
défaut:true

Rerank the candidates with the reranking model.

rerank_depth
integer

How many top passages to rerank (default 100).

Plage requise: 1 <= x <= 1000
hops
integer
défaut:1

2: the best two results seed a second search, for answers that span documents; needs rerank, adds about 0.3 s.

Plage requise: 1 <= x <= 2
retrievers
enum<string>[]

Which retrievers to fuse: vector (embeddings) and keyword (BM25); one the namespace can't run is 400.

Required array length: 1 - 2 elements
Options disponibles:
vector,
keyword
user
string

Only this user's documents. Combines with filter and user_prefix.

Pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]{0,127}$
Exemple:

"tenant-7:u_42"

user_prefix
string

Only the documents of users starting with this; it ends in :, e.g. tenant-7:.

Pattern: ^[A-Za-z0-9][A-Za-z0-9._:@-]{0,127}$
Exemple:

"tenant-7:"

answer
boolean
défaut:false

Also answer query in prose; a language model writes the answer from the best passages, adding about 2 s.

Réponse

Results, best first.

results
object[]
requis
took_ms
integer
requis

Time spent in Conare, in milliseconds.

answer
string

With answer: true, the answer; missing when nothing matched or with Conare-Degraded: answer.

next_cursor
string

With max_results, the cursor to the next page; missing on the last page.