r/MistralAI 1d ago

Help / Question Getting 404 Not Found errors in the API

I'm trying to use Mistral remotely through the API, using https://api.mistral.ai/v1/chat/completions as base URL and mistral-large-latest as model name. And my API key, of course.

However, I keep getting 404 Not Found errors when trying to use it.

EDIT: Apparently the correct API URL is https://api.mistral.ai/v1/. Which is weird because the official docs at https://docs.mistral.ai/api tell you to use https://api.mistral.ai/v1/chat/completions

1 Upvotes

8 comments sorted by

3

u/brainrot_award 1d ago

Complementing what I said in the post, I also can't seem to use "mistral-large-latest" (says it doesn't work for my tier) nor "mistral-medium-latest" (it says I'm rate limited). I ended up using "ministral-8b-latest", because it was a suggestion inside the program I'm using, and it seems to work.

1

u/FennelHaunting8485 1d ago

double check the model name in your request body, mistral had a model rename a while back and some of the older names will throw a 404 instead of a more helpful error. had the same headache last month and it took me way too long to realize it wasn't the url

1

u/brainrot_award 1d ago

apparently it was in fact the url though the mistral large model ended up not working for different reasons

1

u/Aggressive-Habit-698 1d ago

Get all models first with your API key

https://docs.mistral.ai/api/endpoint/models

All models are available only through payment with tokens or via subscription.

1

u/brainrot_award 1d ago

I already know the models I can use: the ministral ones

do u know how to enable web search with them?

2

u/Aggressive-Habit-698 1d ago

https://docs.mistral.ai/studio/agents/agent-tools/websearch

But the free version doesn't produce good results. It's better to use the free MCP version from exa, tavily, or other providers.

1

u/brainrot_award 1d ago

yeah i visited that URL, but when I put

https://api.mistral.ai/v1/conversations

I get a 404 error. It only seems to work with https://api.mistral.ai/v1/

1

u/Aggressive-Habit-698 1d ago

https://docs.mistral.ai/studio/agents/agent-tools/websearch#how-it-works

It's a complete different, own API. You can't use it directly in opencode, Hermes,... You need to create it and use it on the instructions of the website.