Skip to main content
POST
Fit tokenizer
The one call that matters. Everything downstream inherits the quality of this fit. Item content is encoded per modality and residually quantized into levels codebooks. Level 1 places the item in a coarse semantic region; each subsequent level refines within it. See Semantic IDs for the reasoning behind the defaults.

Input format

catalog is JSONL or Parquet, one item per record:
collaborative_signal.interactions is one user sequence per record, oldest first:

Choosing a codebook

resolution: "multi" sizes each level as base_size / 2^(level-1). With the defaults: Total addressable space is the product of the level sizes, so the defaults cover roughly 275 billion distinct IDs. The binding constraint is almost never address space. It is whether level 1 has enough distinct semantic regions in your catalog to fill 2048 codes.
Rule of thumb: start with base_size near the number of genuinely distinct categories in your catalog, rounded up to a power of two. Check codebook_utilization on the fitted tokenizer and adjust. Utilization below about 0.5 at level 1 means you oversized it.
resolution: "uniform" is available for parity with older RQ-VAE setups but is not recommended. By level 4 there is little residual entropy left to encode, and a full-width codebook there mostly sits unused.

Response

Fitting is asynchronous. The call returns 202 immediately:
Poll Get tokenizer until status is ready.

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required
Example:

"catalog-v1"

catalog
object
required
modalities
enum<string>[]

Which item content to encode. Each modality gets its own frozen encoder; outputs are concatenated before quantization.

Available options:
text,
image
codebook
object

Residual quantization layout.

collaborative_signal
object

How behavioral signal shapes the quantizer.

progressive_masking
boolean
default:true

Randomly truncate to the first r levels during training so each level has to be meaningful on its own rather than only in combination with deeper levels. This is what makes prefix-constrained beam search prune a coherent region at decode time.

Response

Fit queued

tokenizer_id
string
Example:

"tok_9k2m"

name
string
Example:

"catalog-v1"

status
enum<string>
Available options:
queued,
fitting,
ready,
failed
Example:

"ready"

codebook
object

Residual quantization layout.

items_tokenized
integer
Example:

1840221

codebook_utilization
number[]

Fraction of each level's codebook in use, ordered by level.

Example:
collision_rate
number

Fraction of items that required a disambiguating suffix to stay uniquely addressable.

Example:

0.004

created_at
string<date-time>
Example:

"2026-08-31T18:04:11Z"

ready_at
string<date-time> | null
Example:

"2026-08-31T19:22:47Z"