Skip to main content
POST
Generate
The value moment. Give the model a user’s history and it emits semantic ID tokens one level at a time, exactly the way a language model emits text. Beam search is constrained to prefixes that exist in the codebook, so the model cannot hallucinate an item that does not exist. Every returned sequence resolves.

Response

score is length-normalized sequence likelihood. It is comparable between candidates in one response and not comparable across requests, so use it to rank, not to threshold.
beams_pruned_invalid should be 0. A nonzero value means beam search reached prefixes the codebook no longer resolves, which almost always means the serving codebook is stale relative to the catalog. Refit or re-sync before trusting the results.

History matters

history is ordered, oldest first, and the order is signal. A user who viewed A then B is a different state from one who viewed B then A, and the model is trained to care. Send the real sequence. Deduplicating it, sorting it, or collapsing it into a set throws away most of what makes a sequence model better than a co-occurrence table.
Long histories are truncated from the front, keeping the most recent interactions. If you have a strong reason to keep older context, say so during onboarding and we can weight the window differently for your tenant.

Tuning beam width

Filters are applied during decoding rather than after, so a restrictive filters object needs a wider beam to fill limit. If you are getting back fewer results than you asked for, widen the beam before you loosen the filter.

Feeding outcomes back

Generation is not the end of the loop. Send what actually happened to POST /feedback so the model adapts to your objective rather than to a proxy. See Foundation models for how the adaptation stages fit together.

Authorizations

Authorization
string
header
required

API key issued by Jean Technologies. Contact the team for access.

Body

application/json
tokenizer_id
string
required
Example:

"tok_9k2m"

history
string[]
required

The user's item interactions, oldest first. Order carries preference, so send it in true sequence.

Example:
limit
integer
default:10
Required range: 1 <= x <= 100
beam_width
integer
default:40

Wider beams raise recall and latency. Must be at least limit.

exclude_history
boolean
default:true
filters
object

Hard constraints applied to candidate items during decoding.

Example:

Response

Recommendations

recommendations
object[]
beams_explored
integer
Example:

40

beams_pruned_invalid
integer

Beams dropped for not resolving to a real item. Should be 0 under prefix-constrained decoding; a nonzero value means the codebook is stale relative to the catalog.

Example:

0