Access Claude models (Claude Opus 4.6, Sonnet 4.6, Haiku 4.5) through the Anthropic integration.
Setup
Add Provider
mixtrain provider add anthropicOr via SDK:
from mixtrain import MixClient
client = MixClient()
client.create_model_provider(
provider_type="anthropic",
secrets={"api_key": "sk-ant-..."}
)Once added, Anthropic models are available via mixtrain model catalog.
Usage
from mixtrain import Model
model = Model("claude-opus")
result = model.run({
"prompt": "Explain quantum computing",
"max_tokens": 1024
})Available Models
| Model ID | Description |
|---|---|
claude-opus-4-6 | Most capable, best for complex tasks |
claude-sonnet-4-6 | Balanced performance and speed |
claude-haiku-4-5 | Fastest, best for simple tasks |
Configuration Options
| Parameter | Description |
|---|---|
max_tokens | Maximum tokens to generate |
temperature | Sampling temperature (0-1) |
top_p | Nucleus sampling parameter |
stop_sequences | Stop generation at these strings |
Getting an API Key
- Sign up at console.anthropic.com
- Navigate to API Keys
- Create a new API key
- Add it to Mixtrain using the setup steps above