DeepSeek publishes deepseek-recipe for API-format conversion
DeepSeek’s public deepseek-recipe repository describes an MIT-licensed collection of Rust libraries and Python bindings for converting requests and responses across Chat Completions, Messages, and Responses formats. It converts those requests into a Conversation representation, renders prompts for DeepSeek models, and can encode conversations as token IDs when used with a tokenizer.
The documented scope includes streaming and complete responses, tool calls, images, reasoning content, and structured-output formats. The repository says callers must provide model inference, tool execution, and HTTP transport; the project is a set of components rather than a complete serving API. The README also documents model-specific behavior, including image handling differences between DeepSeek V4 and V4.1.