API · POST /v1/generate

Generate

Knight or Queen in one call. Send a conversation, optionally about a position, and get prose back with every move it names checked and ready to play on a board.

Try it in the Playground

Signed out? You’ll sign up first. Your own account gets $10 of Trial credits once, never expiring, no card. Only successful responses carry usage and cost_usd.

Recorded responses on preset positions
1 of 3
Generate The Blackburne Shilling Gambit after 3…Nd4. White asks whether to take on e5. POST /v1/generate knight-1
a8b7c6d5e4f3g2h1
200

Coach Recipe system You are a friendly chess coach for a club player. Answer their question about the position in a few sentences of plain words, and show every move you suggest as a Line.

Black’s knight just left c6 for d4. Can I take the pawn on e5?

Knight

Not yet. : the queen hits your knight and the pawn on g2 at once.

Trade knights first with , then castle. Black has spent two moves on a knight that is now gone, and you are ahead in development.

2 Lines · 62 output tokens · $0.00074

3.3 s Recorded response · no API call

What it takes

A model (knight or queen), an optional system prompt, the conversation as messages (user and assistant turns in turn, ending with the user) and an optional position, as a FEN or as a PGN with a ply. Generate keeps no state, so you resend the conversation each time. Set stream: true to show the reply as it is written.

What it returns

Markdown content and lines: each Line has an id, the FEN it starts from, and its moves as {san, uci, fen}. The prose points at a Line with a link such as [the quiet retreat](line:L1). Every move in lines is legal; without a position, lines is empty.

Knight or Queen

The Queen writing with a quill on a long scroll

Open weights. Download it and run it yourself, free for Personal use, or call it here as the cheaper, faster option.

Price on Knight
$0.75 in · $3.75 out
per 1M tokens, cached input $0.075
Typical call
≈ $0.00074
drawn from your Balance
Streaming
Yes
opt-in, server-sent events
Context
32K
tokens
Model ID
knight-1
  • Answers fast, in plain words. Good for hints inside a game or a lesson app.
  • Context up to 32K tokens: a full game and a long chat.
curl https://api.chessdrive.io/v1/generate \
  -H "Authorization: Bearer $CHESSDRIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "knight-1",
    "system": "You are a friendly chess coach for a club player. Answer their question about the position in a few sentences of plain words, and show every move you suggest as a Line.",
    "position": {"fen": "r1bqkbnr/pppp1ppp/8/4p3/2BnP3/5N2/PPPP1PPP/RNBQK2R w KQkq - 4 4"},
    "messages": [{"role": "user", "content": "Black’s knight just left c6 for d4. Can I take the pawn on e5?"}]
  }'

The sample calls Generate on the Coach Specimen with Knight, reading the key from the environment.

Coaching, explaining a position and picking a move are Recipes, each a system prompt and a request for Generate: Coach, Explain and Pick a move. To go through a whole game, Engine judging every move in one call and Knight explaining the mistakes, see Review a game.

Try it in the Playground

Signed out? You’ll sign up first. Your own account gets $10 of Trial credits once, never expiring, no card. Only successful responses carry usage and cost_usd.