Skip to main content

Setup

Install the Baseten CLI and sign in, then install the OpenAI SDK.
Install and sign in to Baseten
Terminal
For other platforms or a specific version, see the Baseten CLI install reference.
Install the OpenAI SDK
To install without Homebrew, see the Baseten CLI install reference. Pick the model you want to deploy. Each tab is a self-contained recipe.
deepseek-ai/DeepSeek-V4-Flash is a VERIFY-parameter MoE model (VERIFY active per token) with up to VERIFY context.This preset serves DeepSeek V4 Flash on B200:4 with FP8 KV cache, the deep_gemm_mega_moe backend, expert parallelism, and MTP speculative decoding, tuned for low time-to-first-token.

Hardware

B200 × 4

Write the config

Create and move into the project directory:
Then create a file named config.yaml and paste the following:
config.yaml
The container loads DeepSeek V4 Flash weights to /models/deepseek-v4-flash and serves the OpenAI-compatible API on port 8000. FP8 KV cache and the deep_gemm_mega_moe backend keep memory bandwidth in check, and the MTP speculator runs two draft tokens per step to amortize sampling cost.

Deploy

Push the config to Baseten with the Baseten CLI, or with the Truss CLI if you prefer it:
You should see output similar to:
baseten model push prints your model ID (abc1d2ef in the example). The examples below use it wherever you see {model_id}, and read your API key from the BASETEN_API_KEY environment variable.

Call the model

Your deployment serves an OpenAI-compatible API.Now call your deployment to run inference:
main.py

Next steps

Call your model

Endpoint anatomy, authentication, and sync versus async inference

Autoscaling

Scale replicas with traffic, including scale to zero