Gemini 3.1 Pro API

$2/Mtok in

Google · text

Million-token context at a mid-tier price.

Overview

About Gemini 3.1 Pro

Million-token context at a mid-tier price. Every model on CompanyFabric shares the same API key, billing balance, and rate-limit envelope — one integration covers the entire library.

Facts

At a glance

Availability

Live

Pricing

$2/Mtok in

Metered exactly per call

Context window

1,000k tokens

Commercial use

See license

Commercial output use permitted per Google terms.

Variants

All endpoints

Prompt library

Example runs

Here are 40 support transcripts. Cluster the complaints and rank by frequency.

Cluster 1: billing confusion (14)…

This exact run cost $0.011

Quickstart

How to use the Gemini 3.1 Pro API

  1. 1

    Create a free CompanyFabric account — starter credits are included, no card required.

  2. 2

    Copy your API key from the dashboard. One key covers every model in the library.

  3. 3

    Point any OpenAI SDK at api.companyfabric.com/v1 and set model to "google/gemini-3-1-pro".

  4. 4

    Read the exact metered cost of the call from the response — the same number shown in the playground.

Use cases

What teams build with it

Agents & copilots

Drive agent loops, tool calls, and user-facing assistants over the OpenAI-compatible endpoint.

agentstool useassistants

Content pipelines

Summarization, rewriting, and structured generation at metered per-token cost.

contentsummarization

Extraction & classification

Turn unstructured input into typed JSON with schema-constrained output.

extractionjson mode

Get better output

Prompting tips

  • State the output format before the task — models follow contracts declared early.
  • Few-shot beats description: two worked examples outperform a paragraph of rules.
  • Cap output length explicitly when cost matters; output tokens dominate most bills.

Exact, metered, prepaid

Pricing

EndpointTypePrice
Gemini 3.1 ProChat$2 / M input · $8 / M output
Gemini 3 FlashChat$0.3 / M input · $1.2 / M output

Production-grade

Code samples

import OpenAI from "openai"

const client = new OpenAI({
  baseURL: "https://api.companyfabric.com/v1",
  apiKey: process.env.COMPANYFABRIC_API_KEY,
})

const res = await client.chat.completions.create({
  model: "google/gemini-3-1-pro",
  max_tokens: 1024,
  temperature: 0.7,
  messages: [{ role: "user", content: "Say hello from the fabric." }],
})

console.log(res.choices[0].message.content)

Playground

Try it in the browser

Playground$2 in / $8 out per 1M tokens
≈ $0.0082

Comparisons

Gemini 3.1 Pro vs the alternatives

Gemini 3.1 Pro vs Claude Sonnet 4.5

Gemini 3.1 Pro and Claude Sonnet 4.5 compete for the same text workloads. Both run behind the same CompanyFabric key at exact metered prices — A/B them on your real prompts and let the outputs decide, then switch with a one-line change.

Gemini 3.1 Pro vs GPT-5.5

Gemini 3.1 Pro and GPT-5.5 compete for the same text workloads. Both run behind the same CompanyFabric key at exact metered prices — A/B them on your real prompts and let the outputs decide, then switch with a one-line change.

FAQ

Frequently asked questions

How much does the Gemini 3.1 Pro API cost?

$2 / M input · $8 / M output. Every call is metered exactly and shown before you run it.

How do I get a Gemini 3.1 Pro API key?

Create a CompanyFabric account, and one key unlocks Gemini 3.1 Pro and every other model in the library. Free starter credits are included — no subscription, no card required to try it.

Why use Gemini 3.1 Pro on CompanyFabric instead of going direct?

One key, one prepaid balance, and one rate-limit envelope across the whole library, at pricing at parity with or below the direct API. Model switching is a one-line change, and BYOK routing is 0% fee.

Is the API OpenAI-compatible?

Yes — point any OpenAI SDK at api.companyfabric.com/v1 and set model to "google/gemini-3-1-pro".

Can I use the output commercially?

Commercial output use permitted per Google terms.

How does billing work?

Prepaid credits via card, or BYOK with your own provider keys at 0% platform fee. No subscription required; balances never expire.

Provider

About Google

Google publishes the gemini family. Also in this family: Gemini 3 Flash. License: Commercial output use permitted per Google terms.

Explore

Related model APIs

One key. Every model. Exact prices.

Run Gemini 3.1 Pro with free starter credits. Free starter credits included — no subscription required.