Crush supports custom provider configurations for both OpenAI-compatible and Anthropic-compatible APIs.
Crush supports custom provider configurations for both OpenAI-compatible and Anthropic-compatible APIs.
The provider type describes the API format the provider speaks. Make sure to choose the right one to ensure the best experience!
responsesshould be used when proxying or routing requests through OpenAI.completionsshould be used for non-OpenAI providers that have OpenAI-compatible APIs.messagesshould be used for Anthropic-compatible APIs.
Legacy values (openai, openai-compat, anthropic) are still accepted and migrated automatically.
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.
provider add deepseek --type completions \ --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:
provider add custom-anthropic \ --type messages \ --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 \ --thinking toggleable \ --supports-images true \ --price-input 3 \ --price-output 15 \ --price-cache-create 3.75 \ --price-cache-hit 0.3Read this post in your terminal with glow:glow -p https://crush.charm.land/providers/custom.md
