• About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
Tuesday, July 28, 2026
mGrowTech
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
No Result
View All Result
mGrowTech
No Result
View All Result
Home Google Marketing

Gemini Batch API now supports Embeddings and OpenAI Compatibility

Josh by Josh
September 11, 2025
in Google Marketing
0
Gemini Batch API now supports Embeddings and OpenAI Compatibility


Batch API now supports Embeddings and OpenAI Compatibility

Today we are extending the Gemini Batch API to support the newly launched Gemini Embedding model as well as offering developers the ability to leverage the OpenAI SDK to submit and process batches.

This builds on the initial launch of the Gemini Batch API – which enables asynchronous processing at 50% lower rates for high volume and latency tolerant use cases.

Batch API Embedding Support

Our new Gemini Embedding Model is already being used for thousands of production deployments. And now, you can leverage the model with the Batch API at much higher rate limits and at half the price – $0.075 per 1M input tokens – to unlock even more cost sensitive, latency tolerant, or asynchronous use cases.

Get started with Batch Embeddings with only a few lines of code:

# Create a JSONL with your requests:
# {"key": "request_1", "request": {"output_dimensionality": 512, "content": {"parts": [{"text": "Explain GenAI"}]}}}
# {"key": "request_2", "request": {"output_dimensionality": 512, "content": {"parts": [{"text": "Explain quantum computing"}]}}}

from google import genai

client = genai.Client()

uploaded_batch_requests = client.files.upload(file='embedding_requests.jsonl')

batch_job = client.batches.create_embeddings(
    model="gemini-embedding-001",
    src={"file_name": uploaded_batch_requests.name}
)


print(f"Created embedding batch job: {batch_job.name}")

# Wait for up to 24 hours

if batch_job.state.name == 'JOB_STATE_SUCCEEDED':
    result_file_name = batch_job.dest.file_name
    file_content_bytes = client.files.download(file=result_file_name)
    file_content = file_content_bytes.decode('utf-8')

    for line in file_content.splitlines():
        print(line)

Python

For more informations and examples go to:

OpenAI compatibility for Batch API

Switching to Gemini Batch API is now as easy as updating a few lines of code if you use the OpenAI SDK compatibility layer:

from openai import OpenAI

openai_client = OpenAI(
    api_key="GEMINI_API_KEY",
    base_url="https://generativelanguage.googleapis.com/v1beta/openai/"
)

# Upload JSONL file in OpenAI batch input format...

# Create batch
batch = openai_client.batches.create(
    input_file_id=batch_input_file_id,
    endpoint="/v1/chat/completions",
    completion_window="24h"
)

# Wait for up to 24 hours & poll for status
batch = openai_client.batches.retrieve(batch.id)

if batch.status == "completed":
    # Download results...

Python

You can read more about the OpenAI Compatibility layer and batch support in our documentation.

We are continuously expanding our batch offering to further optimize the cost of using Gemini API, so keep an eye out for further updates. In the meantime, happy building!



Source_link

READ ALSO

5 tips for how to host a dinner party with Google Search

Google and KDDI partner to support Japanese startups

Related Posts

5 tips for how to host a dinner party with Google Search
Google Marketing

5 tips for how to host a dinner party with Google Search

July 28, 2026
Google and KDDI partner to support Japanese startups
Google Marketing

Google and KDDI partner to support Japanese startups

July 28, 2026
NOAA, Google Cloud collaborate on weather forecasting
Google Marketing

NOAA, Google Cloud collaborate on weather forecasting

July 27, 2026
Google launches Alliance for America’s Skilled Trades
Google Marketing

Google launches Alliance for America’s Skilled Trades

July 26, 2026
Google basically confirms the Pixel 11 is getting a price hike
Google Marketing

Google basically confirms the Pixel 11 is getting a price hike

July 26, 2026
Drive with Halo on Waze
Google Marketing

Drive with Halo on Waze

July 25, 2026
Next Post
Cineplex Box Office Results Up, Aided by Personalization & Rewards

Cineplex Box Office Results Up, Aided by Personalization & Rewards

POPULAR NEWS

Trump ends trade talks with Canada over a digital services tax

Trump ends trade talks with Canada over a digital services tax

June 28, 2025
15 Trending Songs on TikTok in 2025 (+ How to Use Them)

15 Trending Songs on TikTok in 2025 (+ How to Use Them)

June 18, 2025
Communication Effectiveness Skills For Business Leaders

Communication Effectiveness Skills For Business Leaders

June 10, 2025
App Development Cost in Singapore: Pricing Breakdown & Insights

App Development Cost in Singapore: Pricing Breakdown & Insights

June 22, 2025
Comparing the Top 7 Large Language Models LLMs/Systems for Coding in 2025

Comparing the Top 7 Large Language Models LLMs/Systems for Coding in 2025

November 4, 2025

EDITOR'S PICK

SEO and Content Strategy for Web3 Startups

SEO and Content Strategy for Web3 Startups

January 24, 2026
10 Marketing Tasks Every Brand Must Master

How Brands Are Selling on Social Platforms in 2026

March 26, 2026
How to Send 50 People and 5 Ghosts to Heaven in Goat Simulator 3

How to Send 50 People and 5 Ghosts to Heaven in Goat Simulator 3

April 18, 2026
How to Use Instagram Close Friends

How to Use Instagram Close Friends

May 28, 2025

About

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Follow us

Categories

  • Account Based Marketing
  • Ad Management
  • Al, Analytics and Automation
  • Brand Management
  • Channel Marketing
  • Digital Marketing
  • Direct Marketing
  • Event Management
  • Google Marketing
  • Marketing Attribution and Consulting
  • Marketing Automation
  • Mobile Marketing
  • PR Solutions
  • Social Media Management
  • Technology And Software
  • Uncategorized

Recent Posts

  • ROAS-Driven Influencer Marketing Agencies That Deliver
  • Apple Upgrade Is A Great Deal On Paper, But Make Sure You Read The Fine Print
  • Is AI Disrupting IBM, Or Strengthening Its Future?
  • 8 Best Business Process Management Software: My Top Picks
  • About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions