NAME

Langertha::Engine::Mistral - Mistral API

VERSION

version 0.100

SYNOPSIS

use Langertha::Engine::Mistral;

my $mistral = Langertha::Engine::Mistral->new(
  api_key => $ENV{MISTRAL_API_KEY},
  model => 'mistral-large-latest',
  system_prompt => 'You are a helpful assistant',
  temperature => 0.5,
);

print($mistral->simple_chat('Say something nice'));

my $embedding = $mistral->embedding($content);

DESCRIPTION

This module provides access to Mistral AI's models via their API.

Popular Models (February 2026):

  • mistral-large-latest - Points to Mistral Large 3, the most capable model (675B total parameters, 41B active). Best for complex reasoning, multimodal tasks, and agentic workflows with 256k context window.

  • mistral-large-3 - Mistral Large 3, one of the best permissive open-weight models. 41B active and 675B total parameters. Excellent multilingual support.

  • mistral-medium-latest - Balanced performance for general tasks.

  • mistral-small-latest - Fast, cost-effective option (default).

  • codestral-latest - Specialized for code generation and completion.

  • devstral-latest - Optimized for development workflows.

  • ministral-8b-latest - Efficient small model (8B parameters).

  • pixtral-large-latest - Vision-capable multimodal model.

  • voxtral-mini-latest - Audio transcription with diarization support.

The Mistral 3 family includes powerful dense models (3B, 8B, 14B) and Mistral Large 3, offering state-of-the-art performance across reasoning, coding, and multilingual tasks.

Dynamic Model Listing: Mistral inherits from Langertha::Engine::OpenAI, so it supports list_models() for dynamic model discovery. See Langertha::Engine::OpenAI for documentation on model listing and caching.

THIS API IS WORK IN PROGRESS

HOW TO GET MISTRAL API KEY

https://docs.mistral.ai/getting-started/quickstart/

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de> https://raudss.us/

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.