← Back to Catalog

mistralai/Magistral-Small-2506

Size
24B
Context Length
32,768
Max Output
Default

Categories

Usage Examples

Chat (curl)

curl https://api.featherless.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistralai/Magistral-Small-2506",
    "messages": [
      {"role": "user", "content": "Hello, how can you help me?"}
    ]
  }'

Vision (curl)

curl https://api.featherless.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistralai/Magistral-Small-2506",
    "messages": [
      {"role": "user", "content": [
        {"type": "text", "text": "Describe this image."},
        {"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}}
      ]}
    ]
  }'

PHP

$ch = curl_init('https://api.featherless.ai/v1/chat/completions');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'model' => 'mistralai/Magistral-Small-2506',
        'messages' => [
            ['role' => 'user', 'content' => 'Hello!'],
        ],
    ]),
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
echo $response['choices'][0]['message']['content'] ?? 'No response';

Actions

Links