# Models Knight, Queen and the Embedding model, their IDs and aliases, their limits, and which one to pick for what. ChessDrive serves three Models. Knight and Queen answer on Generate; the Embedding model turns positions and texts into vectors on Embed. Engine runs no Model of ours: it runs Stockfish (Lc0 is coming soon). | Model | Model ID | Alias | APIs | Context window | Vectors | Download | |---|---|---|---|---|---|---| | Knight | `knight-1` | `knight` | Generate | 32,768 tokens | — | Yes | | Queen | `queen-1` | `queen` | Generate | 131,072 tokens | — | No, API only | | ChessDrive Embed | `chessdrive-embed-1` | none | Embed | — | 512 dimensions | No | Prices per Model are on the [Pricing](/pricing) page, and the requests and tokens each may use per minute on [Rate limits](/docs/rate-limits). ## List the Models `GET /v1/models` lists every Model version served, with its aliases, the APIs that take it, its context window and its vector size. It is public: no API key is needed, so a page or a build script can read it. ```bash curl curl https://api.chessdrive.io/v1/models ``` ```python Python import requests r = requests.get("https://api.chessdrive.io/v1/models") for m in r.json()["data"]: print(m["id"], m["aliases"], m["apis"], m["context_window"], m["embed_dimensions"]) ``` ```js JavaScript const res = await fetch("https://api.chessdrive.io/v1/models"); for (const m of (await res.json()).data) { console.log(m.id, m.aliases, m.apis, m.context_window, m.embed_dimensions); } ``` ## Which Model to pick - **Knight** is the cheaper and faster of the two, and the place to start. It is also the Model you can [download and run yourself](/docs/running-knight-locally), so what you build on the API can later run on your own hardware. - **Queen** is the larger Model, and only ever runs on the API. Reach for it when Knight's answers aren't good enough for your use, or when a conversation needs more than Knight's 32,768 tokens. It costs much more per token (see [Pricing](/pricing)), so compare the two on your own prompts in the Playground first. - **ChessDrive Embed**, the Embedding model, is for Embed: one vector per position or chess text, mixed in one call, ready to compare or store in your own index. `model` is required on Generate and Embed, so you are never billed for Queen by accident. A request without it is refused with `400 missing_field`. ## Model IDs and aliases A Model ID names one version, like `knight-1`. An alias, like `knight`, always points at the latest version of that Model, so your code moves to the next version without a change. - **Generate** takes either. Pin the versioned ID when you need answers to stay the same between releases; use the alias to get improvements as they ship. - **Embed** takes only the versioned ID. Vectors compare only with vectors from the same version, so a moving alias would quietly mix versions in a stored index. When a new version ships, re-embed what you store before you switch. - **Search and Engine** take no `model`; sending one is `400 invalid_field`. Engine's answer names the engine and its version. Every answer echoes the versioned ID that served it in `model`, so your logs record exactly what answered, even when you sent an alias. A name that isn't a Model is refused with `400 unknown_model`. A versioned ID is retired only after notice: at least 6 months for Knight and Queen and 12 months for the Embedding model, announced in the [Changelog](/changelog). [Versioning and deprecations](/legal/deprecations) has the whole policy, including what may change inside `/v1`. ## Limits - **Context window.** On Generate, the estimated input plus `max_tokens` must fit the Model's context window, or the call is refused with `400 context_too_long`. It is never cut down silently. `max_tokens` defaults to 1,024 on Knight and 4,096 on Queen. - **Output cap.** `max_tokens` is at most 3,072 on Knight and 4,096 on Queen, what each Model's serving backend writes well within one attempt, so a long reply never times out. Above it the call is refused with `400 invalid_field` on `max_tokens`. - **Embed.** Up to 256 items per call, positions and texts mixed. A text is at most 77 tokens, about 300 characters, and is never truncated: a longer one is `400 text_too_long`, and more items `400 too_many_inputs`. - **Engine.** Stockfish searches to a `depth` of up to 50, or a `nodes` or `movetime_ms` limit; Lc0, which is coming soon, to up to 2,000,000 `nodes` or a `movetime_ms`, on the `bt4` (default), `t82` or `t1-256` network. Every call stops at 60 seconds.