mistral

Mistral: Codestral 2501

models/Codestral 2501

[Mistral](/mistralai)'s cutting edge language model for coding. Codestral specializes in low latency, high frequency tasks such as fill in the middle (FIM), code correction and test generation. Learn more on their blog post: https://mistral.ai/news/codestral 2501/
Currency$USD
Input$0.30
Output$0.90
Context window262.1K

Generate API Key Generate your API Key to securely access IndoxHub's AI models. Integrate with OpenAI-compatible tools, run queries, and build powerful AI applications — all with a single secure key.
Endpoint
POSThttps://api.indoxhub.com/api/v1/chat/completions
Configmistral/codestral-2501
from indoxhub import Client
 
# Initialize the client
with Client(api_key="[LOGIN TO GET API KEY]") as client:
    # Generate a chat completion
    response = client.chat(
        messages=[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"What is machine learning and why is it important?"}],
        model="mistral/codestral-2501",
        temperature:"0.7"
    )
 
    # Print the response
    print(response["data"])