Back to Mastra

Vultr | Models

docs/src/content/en/models/providers/vultr.mdx

2025-12-184.5 KB
Original Source

Vultr

Access 10 Vultr models through Mastra's model router. Authentication is handled automatically using the VULTR_API_KEY environment variable.

Learn more in the Vultr documentation.

bash
VULTR_API_KEY=your-api-key
typescript
import { Agent } from "@mastra/core/agent";

const agent = new Agent({
  id: "my-agent",
  name: "My Agent",
  instructions: "You are a helpful assistant",
  model: "vultr/DeepSeek-R1-Distill-Llama-70B"
});

// Generate a response
const response = await agent.generate("Hello!");

// Stream a response
const stream = await agent.stream("Tell me a story");
for await (const chunk of stream) {
  console.log(chunk);
}

:::info

Mastra uses the OpenAI-compatible /chat/completions endpoint. Some provider-specific features may not be available. Check the Vultr documentation for details.

:::

Models

<ProviderModelsTable models={[ { "model": "vultr/DeepSeek-R1-Distill-Llama-70B", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 130000, "maxOutput": 4096, "inputCost": 2, "outputCost": 2 }, { "model": "vultr/DeepSeek-R1-Distill-Qwen-32B", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 130000, "maxOutput": 4096, "inputCost": 0.3, "outputCost": 0.3 }, { "model": "vultr/DeepSeek-V3.2", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 163000, "maxOutput": 4096, "inputCost": 0.55, "outputCost": 1.65 }, { "model": "vultr/GLM-5-FP8", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 202000, "maxOutput": 131072, "inputCost": 0.85, "outputCost": 3.1 }, { "model": "vultr/gpt-oss-120b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 130000, "maxOutput": 8192, "inputCost": 0.15, "outputCost": 0.6 }, { "model": "vultr/Kimi-K2.5", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 261000, "maxOutput": 32768, "inputCost": 0.55, "outputCost": 2.75 }, { "model": "vultr/Llama-3_1-Nemotron-Ultra-253B-v1", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 32000, "maxOutput": 4096, "inputCost": 0.55, "outputCost": 1.8 }, { "model": "vultr/MiniMax-M2.5", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 196000, "maxOutput": 4096, "inputCost": 0.3, "outputCost": 1.2 }, { "model": "vultr/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 260000, "maxOutput": 8192, "inputCost": 0.2, "outputCost": 0.8 }, { "model": "vultr/Qwen2.5-Coder-32B-Instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 15000, "maxOutput": 256, "inputCost": 0.2, "outputCost": 0.6 } ]} />

Advanced configuration

Custom headers

typescript
const agent = new Agent({
  id: "custom-agent",
  name: "custom-agent",
  model: {
    url: "https://api.vultrinference.com/v1",
    id: "vultr/DeepSeek-R1-Distill-Llama-70B",
    apiKey: process.env.VULTR_API_KEY,
    headers: {
      "X-Custom-Header": "value"
    }
  }
});

Dynamic model selection

typescript
const agent = new Agent({
  id: "dynamic-agent",
  name: "Dynamic Agent",
  model: ({ requestContext }) => {
    const useAdvanced = requestContext.task === "complex";
    return useAdvanced
      ? "vultr/gpt-oss-120b"
      : "vultr/DeepSeek-R1-Distill-Llama-70B";
  }
});