• About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
Monday, April 27, 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

Google invests in its first data center in the Alps.

Google’s new gradient icon design is coming to more apps

Related Posts

Google invests in its first data center in the Alps.
Google Marketing

Google invests in its first data center in the Alps.

April 27, 2026
Google’s new gradient icon design is coming to more apps
Google Marketing

Google’s new gradient icon design is coming to more apps

April 26, 2026
What is a TPU? Watch Google’s new video to learn how TPUs work
Google Marketing

What is a TPU? Watch Google’s new video to learn how TPUs work

April 26, 2026
Google shares trending fashion and beauty searches for spring 2026
Google Marketing

Google shares trending fashion and beauty searches for spring 2026

April 26, 2026
3 easy ways to shop for spring with Google
Google Marketing

3 easy ways to shop for spring with Google

April 26, 2026
New updates to the Gemini app, April 2026
Google Marketing

New updates to the Gemini app, April 2026

April 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
Communication Effectiveness Skills For Business Leaders

Communication Effectiveness Skills For Business Leaders

June 10, 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
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

AI Interview Series #4: Explain KV Caching

AI Interview Series #4: Explain KV Caching

December 21, 2025
LE Audio Auracast support expands to more Android devices

LE Audio Auracast support expands to more Android devices

September 6, 2025
How to build your own Facebook Sentiment Analysis Tool

How to build your own Facebook Sentiment Analysis Tool

June 24, 2025
Driving American battery innovation forward | MIT News

Driving American battery innovation forward | MIT News

December 7, 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

  • 8 Best E-commerce Analytics Software I Recommend for 2026
  • 30 B2B Marketing Communities – Which is Best for You? – TopRank® Marketing
  • AI has changed entry-level hiring. Most interviews haven’t.
  • The LoRA Assumption That Breaks in Production 
  • 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