gemini-3.1-pro API
Gemini 3.1 Pro is Google's flagship reasoning model with a 1M-token context window, available on CaMeL Hub at $2.00 per 1M input tokens and $12.00 per 1M output tokens through one OpenAI-compatible endpoint β set base_url to https://api.camel-hub.com/v1 and call it with the SDK you already use. Prompts longer than 200K tokens bill at the long-context tier of $4.00 in / $18.00 out per 1M.
Pricing
| per 1M input tokens | per 1M output tokens | |
|---|---|---|
| CaMeL Hub (β€ 200000 tokens) | $2.00 | $12.00 |
| CaMeL Hub (long context) | $4.00 | $18.00 |
| Provider list price | $2.00 | $12.00 |
Prices are the public default-group rate in USD per 1M tokens; input and output are billed separately. Β· Provider list price Β· verified 2026-07-11
Specifications
- Provider
- Context window
- 1048576 tokens
- Max output
- 65536 tokens
- Capabilities
- streaming, vision, reasoning, function-calling, web-search
- Endpoints
- openai, gemini
What it is good for
- Whole-repository code review and refactor planning β load an entire codebase into the 1M-token window and ask for cross-file analysis
- Agentic coding assistants that chain function calls: run tests, read files, apply patches in a loop
- Contract and compliance review across complete document sets (hundreds of pages in one request)
- Multimodal analysis of screenshots, charts, and UI mockups combined with text instructions
- Search-grounded research assistants that cite current web sources instead of guessing
- Long-transcript summarization: multi-hour meeting or podcast transcripts condensed in a single pass
Quickstart
OpenAI-compatible: set base_url to https://api.camel-hub.com/v1 and use your CaMeL Hub API key. No SDK changes needed.
cURL
curl https://api.camel-hub.com/v1/chat/completions \
-H "Authorization: Bearer $CAMEL_HUB_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-pro",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Python
from openai import OpenAI
client = OpenAI(
api_key="$CAMEL_HUB_KEY",
base_url="https://api.camel-hub.com/v1", # <-- the only change vs. the OpenAI default
)
resp = client.chat.completions.create(
model="gemini-3.1-pro",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.CAMEL_HUB_KEY,
baseURL: "https://api.camel-hub.com/v1", // <-- the only change vs. the OpenAI default
});
const resp = await client.chat.completions.create({
model: "gemini-3.1-pro",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);
Get an API key Browse integration guides
Frequently asked questions
How is Gemini 3.1 Pro billed on CaMeL Hub?
Input and output tokens are billed separately. For prompts up to 200K tokens you pay $2.00 per 1M input tokens and $12.00 per 1M output tokens. Prompts above 200K tokens switch to the long-context tier: $4.00 per 1M input and $18.00 per 1M output. Note that internal reasoning (thinking) tokens are counted as output tokens.
Does it support streaming, function calling, and image input?
Yes. Streaming responses, OpenAI-style function/tool calling, and vision (image) input all work through CaMeL Hub, as does web-search grounding. Set stream: true for token-by-token output, and pass tools exactly as you would with the OpenAI SDK.
How large is the context window?
Google documents a 1,048,576-token input limit and a 65,536-token output limit for this model. Keep in mind that prompts beyond 200K tokens are billed at the higher long-context tier ($4.00 in / $18.00 out per 1M tokens).
How do I start using Gemini 3.1 Pro?
Create an account at https://api.camel-hub.com/console, generate an API key, and point your OpenAI SDK at base_url https://api.camel-hub.com/v1 with model "gemini-3.1-pro". A native Gemini-format endpoint is also available if your tooling speaks the Gemini API directly.
Is CaMeL Hub affiliated with Google?
No. CaMeL Hub is an independent API gateway operated by Nodexi Agentics, LLC. Gemini is a trademark of Google LLC; the model name is used only to identify the compatible model being served.