Use Gemini code execution with Gemini 3.8 Flash

by GoogleCode execution

Gemini 3.8 Flash uses Gemini code execution through Opper on the generateContent endpoint, passed through as Google defines it.

UseGemini code executionwithin

Add Gemini code execution to Gemini 3.8 Flash

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.8-flash:generateContent" \
-H "Authorization: Bearer $OPPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contents": [{"role": "user", "parts": [{"text": "Sum the first 50 primes and show your working."}]}],
"tools": [{"codeExecution": {}}]}'

Where you can run it

Gemini 3.8 Flash runs Gemini code execution 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
EUNoList price $1.65, now $0.82List price $8.25, now $4.13List price $0.17, now $0.08Not offered on this routeNot offered on this route
EUNoList price $1.65, now $0.82List price $8.25, now $4.13List price $0.17, now $0.08List price $1.73, now $0.87 writeNot offered on this route
USNoList price $1.50, now $0.75List price $7.50, now $3.75List price $0.15, now $0.07List price $1.58, now $0.79 write
MultiNoList price $1.50, now $0.75List price $7.50, now $3.75List price $0.15, now $0.07Not offered on this routeNot offered on this route
MultiNoList price $1.50, now $0.75List price $7.50, now $3.75List price $0.15, now $0.07List price $1.58, now $0.79 write

The model

Gemini 3.8 Flash is Google's workhorse multimodal model for software engineering and agentic tasks, pairing 1M context with image, audio, video, and PDF input.

Available on

Pricing fromList price $1.50, now $0.75/ 1M inputList price $7.50, now $3.75/ 1M outputList price $0.15, now $0.07/ 1M cache read1Mcontext

Privacy

ZDR
Training
No
Region
EUUSMulti

Use Gemini code execution with other models

Step-by-step setup for Gemini code execution on each of these models through Opper.

More tools on Opper

Use Gemini code execution with Gemini 3.8 Flash

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