Mistral
Access Mistral AI models through NotPixel. Mistral is a European AI company known for efficient, high-performance open-weight models.
Setup
1. Get API Key
- Go to Mistral Console
- Create an account or sign in
- Navigate to API Keys
- Create a new API key
2. Configure Environment
.env
MISTRAL_API_KEY=...Usage
import Ads from 'notpixel';
const ads = new Ads({
publisherId: 'pub_xxx',
model: 'mistral/mistral-large-latest',
input: 'What are the best practices for API security?',
});
const response = await ads.offer();
console.log(response.text);Available Models
| Model | Context | Best For |
|---|---|---|
mistral/mistral-large-latest | 128K | Flagship model, complex tasks |
mistral/mistral-medium-latest | 32K | Balanced performance |
mistral/mistral-small-latest | 32K | Fast, cost-effective |
mistral/codestral-latest | 32K | Code generation |
mistral/open-mixtral-8x22b | 64K | Open-weight MoE |
mistral/open-mixtral-8x7b | 32K | Efficient MoE |
Mistral models are known for excellent multilingual support, especially for European languages.
Model Selection
// Best quality for complex tasks
model: 'mistral/mistral-large-latest'
// Code-focused tasks
model: 'mistral/codestral-latest'
// Fast and affordable
model: 'mistral/mistral-small-latest'
// Open-weight option
model: 'mistral/open-mixtral-8x7b'Why Mistral?
- European AI: GDPR-compliant infrastructure
- Efficient models: High performance per parameter
- Multilingual: Strong support for European languages
- Open weights: Some models available for self-hosting
Environment Variable
| Variable | Description |
|---|---|
MISTRAL_API_KEY | Your Mistral API key |