- ----
Add to your `Cargo.toml`:
```toml
[dependencies]
mistral_api_client = "0.1"
tokio = { version = "1.0", features = ["full"] }
[](https://crates.io/crates/mistral_api_client)
[](https://github.com/natiqmammad/mistrial_ai_api_client)
[](https://docs.rs/mistral_api_client)
Unofficial Rust client for Mistral AI's API. Async-ready, strongly typed, and designed for reliability.
Quick Start
use MistralClient;
async
Usage
Client Configuration
let client = new
.with_api_url // Optional
.with_model // Default: mistral-large-latest
.with_temperature // Default: 0.7
.with_max_tokens; // Default: 2000
Error Handling
match client.generate.await
Examples
Basic Chat Completion
use ;
async
API Requirements
- Mistral AI API key - Get from Mistral
- Rust 1.60+
Contributing
Contributions welcome! Please:
- Open an issue for discussion
- Fork the repository
- Create a feature branch
- Submit a PR
License
Dual-licensed under either:
- MIT License (LICENSE-MIT)
- Apache License 2.0 (LICENSE-APACHE)
**FEATURES:**
- Interactive code examples
- Badges for versioning and docs
- Clear installation instructions
- Error handling examples
- Contribution guidelines
- Mobile-friendly formatting