ApexApiApexApi
Sign In
GoogleGoogleText / Chat

Gemini 3.1 Pro Preview Custom Tools API: Google AI's chat / LLM model, one key away

Gemini 3.1 Pro Preview Custom Tools via the ApexApi gateway

Gemini 3.1 Pro with custom tool definitions enabled, for agents that call your own functions rather than Google's built-ins. Call it through ApexApi's unified, OpenAI-compatible API with one `ak-` key, alongside every other model in the catalog. It supports a 1,048,756-token context window, tool / function calling, image (vision) input, and streaming responses. Pricing is $2.40 input and $14.40 output per 1M tokens, billed pay-per-use from your credit balance with no subscription.

Gemini 3.1 Pro Preview Custom Tools is served through ApexApi's unified, OpenAI-compatible API. One key, one format, with smart routing and automatic failover. Provider: Google AI.

Why Gemini 3.1 Pro Preview Custom Tools

1,048,756-token context

Reason over long documents, codebases, and multi-turn history in a single request.

Tool & function calling

Structured outputs and tool orchestration for agentic and automation workloads.

Vision input

Send images alongside text for document, UI, and visual-understanding tasks.

Specifications

Modality
chat
Context window
1048.8K tokens
Max output
65.5K tokens
Streaming
Yes
Tool / function calling
Yes
Vision input
Yes

Gemini 3.1 Pro Preview Custom Tools: measured reliability

From real calls ApexApi made to Gemini 3.1 Pro Preview Custom Tools during health sweeps over the last 30 days. Our own measurements, not vendor claims.

Success rate
100%
Avg latency
4.7s
Calls measured
1
Last checked
Aug 30

See how Gemini 3.1 Pro Preview Custom Tools compares against every model we serve on the model rankings.

Gemini 3.1 Pro Preview Custom Tools pricing

  • A million tokens in and a million out costs $16.80 here, all-in.
  • For lighter work, Gemma 4 26B A4B from the same maker costs 36.4× less — one string apart on the same key.
  • It is one of 33 chat models here with a 1M-token context window.

Getting started with Gemini 3.1 Pro Preview Custom Tools

OpenAI-compatible. Point your client at ApexApi, swap your key, and call it. No new SDK to learn.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.apexapi.dev/v1",
    api_key="<YOUR_APEXAPI_KEY>",
)

response = client.chat.completions.create(
    model="google/gemini-3.1-pro-preview-customtools",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Gemini 3.1 Pro Preview Custom Tools use cases

What teams build with Gemini 3.1 Pro Preview Custom Tools on ApexApi.

Agents & automation

Tool-using agents that orchestrate multi-step workflows and call APIs.

Coding assistants

Code generation, refactoring, reviews, and multi-file reasoning.

RAG & knowledge apps

Summarization and long-document Q&A grounded in your own data.

Gemini 3.1 Pro Preview Custom Tools vs other models

How it compares, and on ApexApi you can switch between any of them with a single string change, same key, same endpoint.

Gemini 3.1 Pro Preview Custom Tools vs Claude Opus 4.7

Compare Gemini 3.1 Pro Preview Custom Tools against this model on price, capabilities, and latency. A/B them with a single key on ApexApi.

Learn more about Claude Opus 4.7 API →

Gemini 3.1 Pro Preview Custom Tools vs GPT-5.5

Compare Gemini 3.1 Pro Preview Custom Tools against this model on price, capabilities, and latency. A/B them with a single key on ApexApi.

Learn more about GPT-5.5 API →

Gemini 3.1 Pro Preview Custom Tools vs Gemini 3.1 Pro Preview

Compare Gemini 3.1 Pro Preview Custom Tools against this model on price, capabilities, and latency. A/B them with a single key on ApexApi.

Learn more about Gemini 3.1 Pro Preview API →

Gemini 3.1 Pro Preview Custom Tools API: FAQ

How do I call Gemini 3.1 Pro Preview Custom Tools through ApexApi?

Create an ApexApi key, point your client at https://api.apexapi.dev/v1, and POST to /v1/chat/completions with the model set to `google/gemini-3.1-pro-preview-customtools`. The API is OpenAI-compatible, so an existing OpenAI SDK works once you change the base URL and key.

How much does Gemini 3.1 Pro Preview Custom Tools cost on ApexApi?

$2.40 per million input tokens and $14.40 per million output tokens, all-in with no separate platform fee. You buy credits and pay per call, with no subscription or minimum.

What is the context window for Gemini 3.1 Pro Preview Custom Tools?

1,048,756 tokens. It can return up to 65,536 tokens in a single response.

Does Gemini 3.1 Pro Preview Custom Tools support tool calling and image input?

Gemini 3.1 Pro Preview Custom Tools supports tool / function calling, image (vision) input, and streaming responses.

What should I use instead of Gemini 3.1 Pro Preview Custom Tools?

From the same maker, Gemini 3.6 Flash costs less for lighter work. Switching is one string: it runs on the same endpoint and the same key, so there is nothing to re-integrate.

Ready to build with Gemini 3.1 Pro Preview Custom Tools?

One API key. Every major AI model. Pay only for what you use.

Get your API key, free to start
Gemini 3.1 Pro Preview Custom Tools API on ApexApi