← Back to Leaderboard
Cmistralai

mistralai/client-ts

Typed TypeScript SDK for Mistral inference and managed API resources

View on GitHub ↗
AI FrameworkQuickstart ↓
Engineering Health (Methodology)
A+ · 92/100
Maintenance Activity
● Updated 2d ago
Latest Release
v3.5.0
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption17/25
Release Cadence20/20
License Clarity20/20
API
Total Stars
★ 164
24h Growth
+0
7d Growth
+2
Forks
47

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

mistralai/client-ts Star History (2024-08-06 - 2026-12-03) ALL-TIME STAR HISTORY (2024-08 – 2026-12) +163 in 849d · avg +0/day 173 87 0 2024-08-06: ★ 12024-09-28: ★ 152024-11-23: ★ 292025-01-18: ★ 352025-03-15: ★ 582025-05-10: ★ 702025-07-05: ★ 852025-08-30: ★ 932025-10-25: ★ 1022025-12-20: ★ 1122026-02-14: ★ 1232026-04-11: ★ 1312026-06-06: ★ 1422026-08-01: ★ 1532026-09-26: ★ 1562026-12-03: ★ 164 ★ 164 2024-08 2025-10 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

@mistralai/mistralai is a generated TypeScript API client, not an inference engine. Applications instantiate Mistral, then call resource namespaces such as chat, embeddings, and files with typed request objects. The selected service handles inference or resource operations. The repository separates the main SDK in src/ from the GCP and Azure packages under packages/; integrations should choose their package based on the target service rather than assume identical APIs.

The dependency manifest includes zod, zod-to-json-schema, ws, @modelcontextprotocol/sdk, LiveKit packages, and OpenTelemetry components. That stack matters when auditing dependencies or targeting a constrained runtime, but it does not establish that a basic chat request initializes MCP, WebSocket, or tracing infrastructure. One explicit protocol boundary is audio.transcriptions.stream, which uses SSE.

Key Capabilities & Differentiators

The core surface covers chat completion with an explicit text response format, multi-input embeddings, and agent completions with a streaming option. mistral-large-latest and mistral-embed are concrete example model IDs, not a complete compatibility matrix. The SDK also exposes file uploads with a batch purpose, batch job creation and cancellation, speech generation, transcription, and audio-agent session management.

The Beta namespaces extend the client beyond inference. Managed search indexes support document ingestion, search, and reading or navigating chunks. Conversations expose start, append, and history retrieval. Observability APIs cover evaluation pipelines, scorers, and run statistics. These are calls to managed services, not implementations of a local search engine or evaluation runner. Teams relying on them should test the specific Beta operations they use when upgrading.

Trade-offs & Limitations

Compared with raw HTTP, the typed client is most useful when an application spans several Mistral resources: it reduces request-shaping code and gives call sites named operations to test. For one or two endpoints, a small HTTP wrapper may offer tighter dependency and transport control. A provider-neutral client can reduce switching costs across model vendors, but its common interface may not expose provider-specific features such as managed search-index operations or evaluation pipelines.

The main package is ESM-only, so CommonJS callers need dynamic import. Inference latency and availability depend on the network and remote service; the client does not provide an offline fallback. For production sizing, measure concurrent requests, stream lifetimes, and file or audio buffering rather than budgeting VRAM. Apache-2.0 covers the SDK code, not hosted API access or model-use rights.

Hardware & Deployment Guide

Install @mistralai/mistralai with npm, pnpm, Bun, or Yarn, and check the target JavaScript runtime against RUNTIMES.md. Authenticate from a trusted backend to La Plateforme for the main package. Credential precedence is a per-request Authorization header, then constructor apiKey (which can be an async function), then the Node token file at MISTRAL_SA_TOKEN_PATH, then MISTRAL_API_KEY. An unreadable or empty token file fails the request rather than falling through to the environment key.

No local inference server or GPU is needed for this API integration. On upgrade, v3.5.0 makes SystemV2.kind mandatory on an existing stable model, so review code and fixtures that construct it. Separately, the GCP and Azure v2.1.0 releases expand reasoningEffort and add chat log-probability models. The GCP release also removes the web_search, web_search_premium, and code_interpreter tool types, so review GCP tool configurations independently of the core SDK upgrade.

Package boundary: @mistralai/mistralai is ESM-only; CommonJS callers can use dynamic import().
Inference API: chat.complete supports text response format; embeddings.create accepts multiple inputs in one request.
Streaming and batch: Agent completions can stream, audio transcription supports SSE, and batch jobs expose create, get, list, cancel, and delete operations.
Managed retrieval: Beta.Context.SearchIndexes supports ingestion, search, and reading or navigating indexed chunks.
Credential rotation: Node rereads the file at MISTRAL_SA_TOKEN_PATH on every request; an empty or unreadable file raises UnexpectedClientError.
Upgrade signal: v3.5.0 makes SystemV2.kind required; GCP and Azure v2.1.0 add chat log-probability models and accept reasoningEffort values from none through max.
Best For

TypeScript backend teams integrating several Mistral capabilities, such as interactive chat, embeddings, and batch jobs, behind one typed client.

Skip If

You need offline or self-hosted inference, a single interface for switching model vendors, or a synchronous CommonJS import.

Reviewed on 2026-12-01 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

API
npm add @mistralai/mistralai

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
client-ts ★164+2TypeScriptApache-2.0Typed TypeScript SDK for Mistral inference and managed API resources
transformers169.6k+337PythonApache-2.0A PyTorch model-definition SDK for unified inference and training across modalit
openai-node11.3k+14TypeScriptApache-2.0Generated TypeScript SDK for integrating the hosted OpenAI API
pytorch105.9k+299Python—Python-first tensor SDK for GPU-accelerated training and inference

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/mistralai/client-ts.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

mistralai/client-ts Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about client-ts

How do I wire the client into an existing TypeScript service?

Import Mistral from @mistralai/mistralai and call the resource method you need, such as chat.complete or embeddings.create. The package is ESM-only; use await import('@mistralai/mistralai') from CommonJS. For mounted service-account tokens on Node, set MISTRAL_SA_TOKEN_PATH; the SDK rereads the file on each request, so rotation does not require a process restart.

Do I need a GPU, and what should I size on the client side?

No local GPU or model VRAM is needed for the hosted API path. Size the application for concurrent requests, open streams, and file or audio buffering. Validate memory and connection usage under representative workloads; the SDK does not define a fixed hardware requirement.

Can I use it commercially, and does the license allow self-hosted inference?

Apache-2.0 permits commercial use and redistribution of the SDK subject to its terms, including applicable notice obligations. Deploying your own application with this package does not self-host Mistral inference. Review hosted-service terms, model rights, and data-handling requirements separately before sending production data.

When should I prefer this SDK over raw HTTP or a provider-neutral client?

Choose this SDK when typed requests and responses and broad Mistral API coverage outweigh the cost of tracking SDK releases. Raw HTTP can be simpler for a few endpoints if you want to own authentication, parsing, and streaming. If you need to switch model vendors behind one interface, use a provider-neutral abstraction or put your own adapter in front of this SDK; the Azure and GCP packages are separate integrations, not a unified interface.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining mistralai/client-ts? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature mistralai/client-ts on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare