Search packages, repositories and app categories

Package detailsv1.1.0+1

mistralai_client_dart

(Deprecated) This is an unofficial Dart/Flutter client for the Mistral AI API.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
34
Likes
12
Pub points
150

Install package

flutter pub add mistralai_client_dart

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

An unofficial Dart/Flutter client for the Mistral AI API, enabling integration with Mistral's large language models in Flutter applications. This package simplifies making API calls to Mistral's models for tasks like text generation, chat interactions, and natural language processing. Note: The package is deprecated, so it may not receive updates or support for new API changes. It supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Integrating Mistral AI models into Flutter apps
  • Building AI-powered chat interfaces
  • Generating text using large language models
  • Creating multilingual applications with AI
  • Prototyping AI features in cross-platform apps

Key features

  • Unofficial but functional API wrapper
  • Supports all major platforms
  • Simple method calls for common AI tasks
  • Built for Flutter development
  • Lightweight and easy to integrate

Suitable for

  • Developers building AI features in Flutter
  • Teams prototyping LLM integrations
  • Projects needing quick access to Mistral AI
  • Educational or experimental AI applications

Considerations

  • Package is deprecated – use at your own risk
  • May not support latest Mistral API updates
  • No official maintenance or support
  • Requires manual handling of API keys and errors
  • Not recommended for production use without verification

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Mistral AI client for Dart (Deprecated)

.github/workflows/check.yaml style: very good analysis

⚠️ Deprecation Notice

This library is deprecated and no longer maintained.

We recommend migrating to actively maintained alternatives for continued support and updates.

Description

This is an unofficial Dart/Flutter client for the Mistral AI API.

Installation

dart pub add mistralai_client_dart

Usage

Create client
import 'package:mistralai_client_dart/mistralai_client_dart.dart';

final client = MistralAIClient(apiKey: 'your api key here');
List models
final modelsResult = await client.listModels();
final models = modelsResult.data?.map((e) => e.id).toList();
print(models?.join(', '));
Chat
const request = ChatCompletionRequest(
  model: 'mistral-small-latest',
  messages: [
    UserMessage(content: UserMessageContent.string('Hello chat!')),
  ],
);
final chatCompletion = await client.chatComplete(request: request);
final chatMessage = chatCompletion.choices?[0].message;
print(chatMessage?.content);
Chat stream
final stream = client.chatStream(request: request);
await for (final completionChunk in stream) {
  final chatMessage = completionChunk.choices[0].delta.content;
  if (chatMessage != null) {
    print(chatMessage);
  }
}
Embeddings
final embeddings = await client.createEmbeddings(
  request: const EmbeddingRequest(
    model: 'mistral-embed',
    input: EmbeddingRequestInput.arrayString(['Hello chat!']),
  ),
);
for (final data in embeddings.data) {
  print('Embeddings: ${data.embedding}');
}
Function calling

Check examples:

Files

Check examples:

Fine-tuning Jobs

Check examples:

Fill in the middle completion

Check examples:

Agents

Check examples:

Moderation

Check examples:

Resources

You can check the official Mistral AI docs.

Contributing

For contributing guide please see CONTRIBUTING.md.

Flutter Flow (deprecated)

For Flutter Flow integration please use the mistralai_client_dart_flutter_flow package.

It's a version of this package that is adapted to work with Flutter Flow.

Aknowledgements

Part of the code was generated thx to openapi_spec package.

Categories

Dependencies

Dependency list 4 items

Source repository

Projects using this package

No data available yet.