Use Gemini URL context with Gemini 3.1 Pro Preview

by GoogleWeb fetch

Gemini 3.1 Pro Preview uses Gemini URL context through Opper on the generateContent endpoint, passed through as Google defines it.

UseGemini URL contextwithin

Add Gemini URL context to Gemini 3.1 Pro Preview

Set up with agents

Paste this into your coding agent (Claude Code, Cursor, Codex, and more) and it will set up and build with Opper for you.

Get your API key

In your code

curl "https://api.opper.ai/v3/compat/v1beta/models/gemini/gemini-3.1-pro-preview:generateContent" \
-H "Authorization: Bearer $OPPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contents": [{"role": "user", "parts": [{"text": "Summarise https://opper.ai/pricing"}]}],
"tools": [{"urlContext": {}}]}'

Where you can run it

Gemini 3.1 Pro Preview runs Gemini URL context on the routes below. Some routes also sell flex and priority processing: the same model at another price, picked per request with service_tier. How service tiers work.

ProviderRegionZero data retentionTrainingInputOutputCache read
USNo$2.00$12.00$0.20$2.38 write
MultiNo$2.00$12.00$0.20Not offered on this routeNot offered on this route
MultiNo$2.00$12.00$0.20$2.38 write

The model

by Google

Gemini 3.1 Pro Preview by Google, a frontier reasoning LLM with 1M context and strong agentic coding, scoring 77% on ARC-AGI-2 and 81% on SWE-Bench Verified.

Available on

Pricing from$2.00/ 1M input$12.00/ 1M output$0.20/ 1M cache read1Mcontext

Privacy

ZDR
Training
No
Region
US, Multi

Use Gemini URL context with other models

Step-by-step setup for Gemini URL context on each of these models through Opper.

More tools on Opper

Use Gemini URL context with Gemini 3.1 Pro Preview

One key, 700+ models, a choice of region, and zero data retention. Tools run in the same request, with every call in your traces.

Get startedView Documentation