Skip to Content
NotPixel SDK v1.0.1 — Now with caching, hooks, and browser tracking!

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

  1. Go to Mistral Console 
  2. Create an account or sign in
  3. Navigate to API Keys
  4. 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

ModelContextBest For
mistral/mistral-large-latest128KFlagship model, complex tasks
mistral/mistral-medium-latest32KBalanced performance
mistral/mistral-small-latest32KFast, cost-effective
mistral/codestral-latest32KCode generation
mistral/open-mixtral-8x22b64KOpen-weight MoE
mistral/open-mixtral-8x7b32KEfficient 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

VariableDescription
MISTRAL_API_KEYYour Mistral API key