• About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
Sunday, September 13, 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

[ad_1]

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!

[ad_2]

Source_link

READ ALSO

3 ways runners can prep for race day with Search

Dreambeans is now available across the U.S.

Related Posts

3 ways runners can prep for race day with Search
Google Marketing

3 ways runners can prep for race day with Search

September 11, 2026
Dreambeans is now available across the U.S.
Google Marketing

Dreambeans is now available across the U.S.

September 10, 2026
New updates to measurement suite in Google Ads
Google Marketing

New updates to measurement suite in Google Ads

September 10, 2026
The incomplete history of Duo devices
Google Marketing

The incomplete history of Duo devices

September 10, 2026
The Anatomy of Harness Engineering: How to Evaluate, Iterate, and Guard AI Coding Agents
Google Marketing

The Anatomy of Harness Engineering: How to Evaluate, Iterate, and Guard AI Coding Agents

September 10, 2026
AI maps global methane emissions from space
Google Marketing

AI maps global methane emissions from space

September 10, 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
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
App Development Cost in Singapore: Pricing Breakdown & Insights

App Development Cost in Singapore: Pricing Breakdown & Insights

June 22, 2025

EDITOR'S PICK

Top B2B & Marketing Podcasts to Lead You to Succeed in 2025 – TopRank® Marketing

Top B2B & Marketing Podcasts to Lead You to Succeed in 2025 – TopRank® Marketing

May 30, 2025
OpenCV founders launch AI video startup to take on OpenAI and Google

OpenCV founders launch AI video startup to take on OpenAI and Google

November 19, 2025
Google’s 2026 Responsible AI Progress Report

Google’s 2026 Responsible AI Progress Report

February 18, 2026
LinkedIn Crossclimb Answer Today for June 6, 2026 (Puzzle #767)

LinkedIn Crossclimb Answer Today for June 6, 2026 (Puzzle #767)

June 7, 2026

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

  • Cohere Releases North Small Translate: A 218B MoE Translation Model That Scores 83.6 on WMT26 Across 50 Languages
  • The Changing Role of Digital PR in AI Search Landscape
  • How These XL Phones Compete
  • Corporate Event Registration Software: A Practical Guide
  • 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