
Mistral AI, a European-based AI company, offers several cutting-edge large language models (LLMs).
To leverage any of them, you can access and use Mistral AI's APIs.
The first step in using any of their endpoints is generating your API key. We’ll help you do just that by walking you through the 5 easy steps you can take.
From Mistral AI’s homepage, you’ll need to click on the “Log In” button.

From there, you’ll either need to sign in or create an account.

{{this-blog-only-cta}}
If you’re creating an account, you’ll need to create a workspace, which involves giving it a name, clarifying whether it’s only for a single user or a team, and accepting Mistral AI's terms and conditions.

Under the API section on the left-hand side, you should see an “API Keys” button. Go ahead and click this.

You’ll now see an option to create a new key.

Once you select this, you’ll be asked to assign a name and expiration date to the key.

Related: A guide to using an AI connector
The key would now be fully visible. You should go ahead and copy it as it won’t be shown again

Before building to their endpoints, it’s worth familiarizing yourself with the following:
Mistral AI’s API costs depend on factors like the model you want to access, whether you use the batch API, and the number of tokens you need to consume.
For example, here are their costs for some of their premier models:

Learn more about Mistral AI’s API pricing.
Each workspace has a preset rate limit, which depends on your usage tier. The rate limits are also set by either requests per second or tokens per minute or month.
For instance, for each model, you may be able to make 1 request per second or consume either 500,000 tokens per minute or 1,000,000 tokens per month.

Learn more about Mistral AI’s rate limits.
You can come across a wide range of errors; here are just a few you might run into:
Merge Gateway is a single API and control plane for running LLM traffic in production, with built-in routing, spend controls, and request-level visibility.

It offers:
Try Merge Gateway for free today!
Dynamically route each request to the best-fit model (including Mistral AI’s models) to reduce spend without compromising performance via Merge Gateway.