How to use Mistral Large

You can use this model in your applications via the OpenAI SDK or a simple cURL request.

import OpenAI from 'openai';

const openai = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.agentrouter.org/v1',
});

async function main() {
  const completion = await openai.chat.completions.create({
    messages: [{ role: 'system', content: 'You are a helpful assistant.' }],
    model: 'mistral-large',
  });

  console.log(completion.choices[0]);
}

main();