# Gemini 3.1 Pro Preview — Atlas Cloud API

> Preview version of Google's flagship reasoning model, offering enhanced analytical capabilities, long-context understanding, and advanced multimodal performance.

This is the machine-readable API reference for **Gemini 3.1 Pro Preview** on Atlas Cloud,
a unified API platform for 400+ AI models across text, image, video, audio and 3D.

- **Model ID**: `google/gemini-3.1-pro-preview`
- **Built by**: Google
- **Modality**: Text
- **Context length**: 1,000,000 tokens
- **Max output tokens**: 64,000
- **Model page**: https://www.atlascloud.ai/models/google/gemini-3.1-pro-preview
- **API key**: https://www.atlascloud.ai/console/api-keys
- **Docs**: https://www.atlascloud.ai/docs

## Pricing on Atlas Cloud

- **Input**: $2 per 1M tokens
- **Output**: $12 per 1M tokens
- Pay-as-you-go. No minimum spend, no subscription required.

> **These are the authoritative Atlas Cloud rates for this model.** Any price that
> appears in the vendor description further down refers to a different platform or
> a different model variant and does not apply here.

## Use this model from an AI agent

Atlas Cloud ships three first-party integration surfaces. All three authenticate
with the same API key via the `ATLASCLOUD_API_KEY` environment variable.

### MCP server

The official MCP server (`atlascloud-mcp`) exposes this model to any
MCP-compatible host — Claude Code, OpenAI Codex, Cursor, Gemini CLI, Goose,
Claude Desktop. One-line install:

```bash
# Claude Code
claude mcp add atlascloud -- npx -y atlascloud-mcp

# OpenAI Codex CLI
codex mcp add atlascloud -- npx -y atlascloud-mcp

# Gemini CLI
gemini mcp add atlascloud -- npx -y atlascloud-mcp

export ATLASCLOUD_API_KEY="your-api-key"
```

Then ask in plain English; the agent calls `atlas_chat` with `model: "google/gemini-3.1-pro-preview"`.
The server fetches each model's schema and validates parameters before submitting,
so invalid requests fail fast without spending credits.

MCP docs: https://www.atlascloud.ai/docs/mcp-server

### Agent Skills

`atlas-cloud-skills` is a portable skill package (API reference, code templates in
Python / Node.js / cURL, model IDs with pricing) for Claude Code, Cursor, Codex and
12+ other agents:

```bash
npx skills add AtlasCloudAI/atlas-cloud-skills
export ATLASCLOUD_API_KEY="your-api-key"
```

Skills docs: https://www.atlascloud.ai/docs/skills

### CLI

The `atlas` binary runs Atlas Cloud from a terminal or CI script. Async media jobs
are polled and downloaded automatically (use `--no-download` when a script only
needs the output URLs):

```bash
# Install (Homebrew, npm, or shell installer)
brew install AtlasCloudAI/tap/atlascloud
# npm install -g atlascloud-cli
# curl -fsSL https://raw.githubusercontent.com/AtlasCloudAI/cli/main/install.sh | sh

atlas auth login
atlas chat "Your prompt here" --model google/gemini-3.1-pro-preview
```

CLI docs: https://www.atlascloud.ai/docs/cli

## HTTP API reference

This model is served over the **Gemini native** protocol (`gemini.generate`).
Use `:generateContent` for a single response, or `:streamGenerateContent?alt=sse` to stream.
The OpenAI SDK does **not** work with this endpoint — the request and response shapes differ.

```http
POST https://api.atlascloud.ai/v1/models/google/gemini-3.1-pro-preview:generateContent
Authorization: Bearer $ATLASCLOUD_API_KEY
Content-Type: application/json
```

### curl

```bash
curl -X POST "https://api.atlascloud.ai/v1/models/google/gemini-3.1-pro-preview:generateContent" \
  -H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "inline_data": {
            "mime_type": "image/png",
            "data": "<BASE64_IMAGE_DATA>"
          }
        },
        {
          "file_data": {
            "mime_type": "video/mp4",
            "file_uri": "https://example.com/your-video.mp4"
          }
        },
        {
          "text": "Please describe the content of this image/video"
        }
      ]
    }
  ],
  "generationConfig": {
    "maxOutputTokens": 32000,
    "temperature": 0.7
  }
}'
```

### Python

```python
import os, requests

url = "https://api.atlascloud.ai/v1/models/google/gemini-3.1-pro-preview:generateContent"
headers = {
    "Authorization": f"Bearer {os.environ['ATLASCLOUD_API_KEY']}",
    "Content-Type": "application/json",
}
payload = {
    "contents": [
        {
            "role": "user",
            "parts": [
                {
                    "inline_data": {
                        "mime_type": "image/png",
                        "data": "<BASE64_IMAGE_DATA>"
                    }
                },
                {
                    "file_data": {
                        "mime_type": "video/mp4",
                        "file_uri": "https://example.com/your-video.mp4"
                    }
                },
                {
                    "text": "Please describe the content of this image/video"
                }
            ]
        }
    ],
    "generationConfig": {
        "maxOutputTokens": 32000,
        "temperature": 0.7
    }
}

response = requests.post(url, headers=headers, json=payload)
print(response.json()["candidates"][0]["content"]["parts"][0]["text"])
```

### Multimodal input

This model accepts image, video input alongside text. Media parts go inside `contents[].parts[]`.

- **Image** — `inline_data` with `mime_type` + base64 `data`, or `file_data` with a public `file_uri`.
  - Formats: image/png, image/jpeg, image/webp, image/gif
- **Video** — `file_data` with `mime_type` + a public `file_uri`. Prefer URLs over inlining large files.
  - Formats: video/mp4, video/mpeg, video/quicktime, video/x-msvideo, video/x-flv, video/mpg, video/webm, video/x-ms-wmv, video/3gpp

**Example request body**:

```json
{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "inline_data": {
            "mime_type": "image/png",
            "data": "<BASE64_IMAGE_DATA>"
          }
        },
        {
          "file_data": {
            "mime_type": "video/mp4",
            "file_uri": "https://example.com/your-video.mp4"
          }
        },
        {
          "text": "Please describe the content of this image/video"
        }
      ]
    }
  ],
  "generationConfig": {
    "maxOutputTokens": 32000,
    "temperature": 0.7
  }
}
```

Context window: 1,000,000 tokens.

## About this model

_Vendor-supplied description. Any pricing or endpoint mentioned below refers to_
_other platforms — use the Atlas Cloud values above._

### Gemini 3 Pro Preview

#### Overview

Gemini 3 Pro Preview demonstrates significant improvements in performance, including top-tier results in math problem-solving, coding, and multi-step reasoning tasks. It part of Google's family of scalable Gemini models optimized for AI-native applications and products.

#### Key Features

*   **Strong Reasoning Capabilities:** Excels in tasks requiring logical deduction, planning, and problem-solving.
*   **Code Understanding:** Performs well on competitive programming tasks.
*   **Multi-Turn Dialogue:** Maintains coherent conversations across multiple exchanges.

#### Intended Use

*   **Coding Assistant:** Efficient at generating and explaining code.
*   **Educational Tools**: Ideal for tutoring and problem-solving support.
*   **Enterprise Automation**: Supports workflow reasoning and task management.
*   **Research Applications**: Handles complex documents and analysis tasks.

---

Atlas Cloud — one API for 400+ AI models. Model page: https://www.atlascloud.ai/models/google/gemini-3.1-pro-preview · Docs: https://www.atlascloud.ai/docs
