API · Models
TextFeatured

Gemini 3.1 Pro

Gemini 3.1 Pro Preview is Google's frontier reasoning model with enhanced software engineering, mathematics, and science capabilities and a 1M token context window.

Context 1.0M·Max out 65.5K

Quickstart

import { streamText } from 'ai';
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';

const blackbox = createOpenAICompatible({
  name: 'blackbox',
  apiKey: process.env.BLACKBOX_API_KEY!,
  baseURL: 'https://api.blackbox.ai/v1',
});

const result = streamText({
  model: blackbox('blackboxai/google/gemini-3.1-pro-preview'),
  prompt: 'Why is the sky blue?',
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}

Specs & pricing

Input $/M
$2
Output $/M
$12
Context window
1.0M
Max output
65.5K
Supported parameters
tool-usereasoningvisionjson-mode

Related models

ModelTypeContextInput $/M
Gemini 3.5 FlashText1M$1.50
Gemini 3.1 Flash LiteText1M$0.25
Gemma 4 26BText262.1K$0.13
Gemma 4 31BText262.1K$0.14
NVIDIA: Nemotron 3 UltraText262K$0.37