# <img src="https://models.dev/logos/nebius.svg" alt="Nebius AI Studio logo" className="inline w-8 h-8 mr-2 align-middle dark:invert dark:brightness-0 dark:contrast-200" />Nebius AI Studio
[EN] Source: https://mastra.ai/models/providers/nebius

Access 15 Nebius AI Studio models through Mastra's model router. Authentication is handled automatically using the `NEBIUS_API_KEY` environment variable.

Learn more in the [Nebius AI Studio documentation](https://docs.studio.nebius.com/quickstart).

```bash
NEBIUS_API_KEY=your-api-key
```

```typescript
import { Agent } from "@mastra/core";

const agent = new Agent({
  name: "my-agent",
  instructions: "You are a helpful assistant",
  model: "nebius/NousResearch/hermes-4-405b"
});

// 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 [Nebius AI Studio documentation](https://docs.studio.nebius.com/quickstart) for details.

:::

## Models

<ProviderModelsTable
  models={[
  {
    "model": "nebius/deepseek-ai/deepseek-v3",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.5,
    "outputCost": 1.5
  },
  {
    "model": "nebius/meta-llama/llama-3_1-405b-instruct",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 1,
    "outputCost": 3
  },
  {
    "model": "nebius/meta-llama/llama-3.3-70b-instruct-base",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.13,
    "outputCost": 0.4
  },
  {
    "model": "nebius/meta-llama/llama-3.3-70b-instruct-fast",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.25,
    "outputCost": 0.75
  },
  {
    "model": "nebius/moonshotai/kimi-k2-instruct",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.5,
    "outputCost": 2.4
  },
  {
    "model": "nebius/NousResearch/hermes-4-405b",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 1,
    "outputCost": 3
  },
  {
    "model": "nebius/NousResearch/hermes-4-70b",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.13,
    "outputCost": 0.4
  },
  {
    "model": "nebius/nvidia/llama-3_1-nemotron-ultra-253b-v1",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.6,
    "outputCost": 1.8
  },
  {
    "model": "nebius/openai/gpt-oss-120b",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.15,
    "outputCost": 0.6
  },
  {
    "model": "nebius/openai/gpt-oss-20b",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.05,
    "outputCost": 0.2
  },
  {
    "model": "nebius/qwen/qwen3-235b-a22b-instruct-2507",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 262144,
    "maxOutput": 8192,
    "inputCost": 0.2,
    "outputCost": 0.6
  },
  {
    "model": "nebius/qwen/qwen3-235b-a22b-thinking-2507",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 262144,
    "maxOutput": 8192,
    "inputCost": 0.2,
    "outputCost": 0.8
  },
  {
    "model": "nebius/qwen/qwen3-coder-480b-a35b-instruct",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": false,
    "contextWindow": 262144,
    "maxOutput": 66536,
    "inputCost": 0.4,
    "outputCost": 1.8
  },
  {
    "model": "nebius/zai-org/glm-4.5",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.6,
    "outputCost": 2.2
  },
  {
    "model": "nebius/zai-org/glm-4.5-air",
    "imageInput": false,
    "audioInput": false,
    "videoInput": false,
    "toolUsage": true,
    "reasoning": true,
    "contextWindow": 131072,
    "maxOutput": 8192,
    "inputCost": 0.2,
    "outputCost": 1.2
  }
]}
/>

## Advanced Configuration

### Custom Headers

```typescript
const agent = new Agent({
  name: "custom-agent",
  model: {
    url: "https://api.studio.nebius.com/v1/",
    id: "nebius/NousResearch/hermes-4-405b",
    apiKey: process.env.NEBIUS_API_KEY,
    headers: {
      "X-Custom-Header": "value"
    }
  }
});
```

### Dynamic Model Selection

```typescript
const agent = new Agent({
  name: "dynamic-agent",
  model: ({ runtimeContext }) => {
    const useAdvanced = runtimeContext.task === "complex";
    return useAdvanced
      ? "nebius/zai-org/glm-4.5-air"
      : "nebius/NousResearch/hermes-4-405b";
  }
});
```




---
title: "Nvidia | Models | Mastra"
description: "Use Nvidia models with Mastra. 16 models available."
---

{/* This file is auto-generated by generate-model-docs.ts - DO NOT EDIT MANUALLY */}