Custom Providers
Crush supports custom provider configurations for both OpenAI-compatible and Anthropic-compatible APIs.
NOTE
Note that we support two "types" for OpenAI. Make sure to choose the right one to ensure the best experience!
openaishould be used when proxying or routing requests through OpenAI.openai-compatshould be used when using non-OpenAI providers that have OpenAI-compatible APIs.
OpenAI-Compatible APIs
Here's an example configuration for Deepseek, which uses an OpenAI-compatible API. Don't forget to set DEEPSEEK_API_KEY in your environment.
bash
provider add deepseek --type openai-compat \
--base-url "https://api.deepseek.com/v1" \
--api-key "$DEEPSEEK_API_KEY"
model add deepseek/deepseek-chat \
--name "Deepseek V3" \
--context-window 64000 \
--default-max-tokens 5000 \
--price-input 0.27 \
--price-output 1.1 \
--price-cache-create 1.1 \
--price-cache-hit 0.07Anthropic-Compatible APIs
Custom Anthropic-compatible providers follow this format:
bash
provider add custom-anthropic \
--type anthropic \
--base-url "https://api.anthropic.com/v1" \
--api-key "$ANTHROPIC_API_KEY" \
--extra-header anthropic-version 2023-06-01
model add custom-anthropic/claude-sonnet-4-20250514 \
--name "Claude Sonnet 4" \
--context-window 200000 \
--default-max-tokens 50000 \
--can-reason true \
--supports-images true \
--price-input 3 \
--price-output 15 \
--price-cache-create 3.75 \
--price-cache-hit 0.3