Skip to main content
Every limit on this page is enforced by the broker. Exceeding one returns 400 invalid_request with a message naming the field, except where the table says the value is clamped. All string and text limits are measured in UTF-8 bytes, not characters. A 64-byte metadata key holds 64 ASCII characters but fewer accented or CJK ones.

Request bodies

A body over the cap returns 413, not 400.

Namespace, model, dimensions

These three fields are required on every publish, search, and subscribe. There is no default — see Namespaces for why.

Publish

The 32 KB text cap applies even when you supply your own vector. Text is stored and returned by search whether or not the broker embedded it. Metadata keys and values, and the idempotency key, must be valid UTF-8 with no control characters. Control bytes are rejected because metadata is echoed back in search results.

Query

These apply to the SemQL query in /v1/search, /v1/subscribe, and /v1/lint. Search and subscribe reject a query that exceeds one of them while it is being parsed — before any anchor is embedded, so a rejected query costs no embedding tokens. Lint reports the same problems as diagnostics with "valid": false and a 200, so it is the cheapest way to check a generated query against these caps before sending it.

Value ranges

WITHIN and TOP are mutually exclusive on a single clause.

Result count

LIMIT is the one query value that is clamped rather than rejected.
A request for LIMIT 50000 succeeds and returns at most 1000 results. Because the response is a success, a client that assumes it received everything will silently miss results. Page with a narrower WINDOW or a tighter query rather than a larger LIMIT.

Working within the limits

Anchor lists overflow before anchor counts do. A DIRECTION list built by expanding synonyms hits the 8-item cap long before the query hits 32 anchors. Split into two clauses joined with OR instead of dropping concepts:
The 4 KB text budget is shared. It covers every anchor string and namespace name in one query, so a handful of sentence-length anchors can exhaust it well below 32 anchors. Short concept phrases match as well and cost less of the budget. Prefer text anchors to vector anchors. A single 1024-dimension vector anchor consumes an eighth of the 8192-float query budget, so a query can carry only eight of them. Text anchors have no equivalent per-query ceiling beyond the 4 KB budget.