AI Providers
Scrub supports multiple AI providers through a unified API. Configure your preferred provider in the Dashboard, then use the same Scrub API regardless of which provider you choose.
Supported Providers
| Provider | Models | Status |
|---|---|---|
| OpenAI | GPT-4, GPT-4 Turbo, GPT-3.5 | Fully supported |
| Anthropic | Claude 3 Opus, Sonnet, Haiku | Fully supported |
| Gemini Pro, Gemini 1.5 | Fully supported |
How It Works
- Add your provider API key in the Scrub Dashboard
- Use Scrub's API with OpenAI-compatible format
- Scrub translates requests to your provider's format
- Responses are normalized to OpenAI format
This means you can:
- Switch providers without changing your code
- Use the familiar OpenAI SDK with any provider
- Get consistent response formats regardless of provider
Setting Up a Provider
- Log in to your Scrub Dashboard
- Navigate to Providers
- Select your AI provider
- Enter your provider's API key
- Click Save
You can configure multiple providers and switch between them as needed.
Unified API
All requests use the same OpenAI-compatible format:
curl https://api.scrub.health/v1/chat/completions \
-H "Authorization: Bearer $SCRUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Scrub automatically routes to your configured provider and translates the request/response as needed.
Model Selection
You can specify models from any configured provider:
// OpenAI
{"model": "gpt-4"}
{"model": "gpt-4-turbo"}
{"model": "gpt-3.5-turbo"}
// Anthropic
{"model": "claude-3-opus"}
{"model": "claude-3-sonnet"}
{"model": "claude-3-haiku"}
// Google
{"model": "gemini-pro"}
{"model": "gemini-1.5-pro"}