Text Embedding 004 API — pricing & specs

Text Embedding 004 is a Google model that turns text into vectors for semantic search and retrieval, with up to 768 dimensions. On KeepRouter, Text Embedding 004 costs $0.002000 per 1M input tokens and $0.002000 per 1M output tokens, billed pay-as-you-go with no monthly fee. Call it through a compatible KeepRouter endpoint supported by its active route, with the model id text-embedding-004.

MakerGoogle
ModalityText embeddings
Context window2,048 tokens
Input price$0.002000 per 1M tokens
Output price$0.002000 per 1M tokens
CapabilitiesText embeddings
EndpointPOST /v1/embeddings
Model idtext-embedding-004

How pricing works for Text Embedding 004

Text Embedding 004 is billed per token — $0.002000 per 1M input tokens and $0.002000 per 1M output tokens. The published price is pay-as-you-go, with no monthly fee; actual request cost depends on measured token usage.

Calling Text Embedding 004 on KeepRouter

Point a compatible client at the supported KeepRouter endpoint and set the model to text-embedding-004. KeepRouter preserves the client-facing request shape while handling upstream routing or translation. Send embedding requests to POST /v1/embeddings.

cURL

curl https://keeprouter.com/v1/embeddings \
  -H "Authorization: Bearer $KEEPROUTER_KEY" -H "Content-Type: application/json" \
  -d '{"model":"text-embedding-004","input":"The quick brown fox"}'

Python

import os
from openai import OpenAI
client = OpenAI(base_url="https://keeprouter.com/v1", api_key=os.environ["KEEPROUTER_KEY"])
e = client.embeddings.create(model="text-embedding-004", input="The quick brown fox")

JavaScript

const res = await fetch("https://keeprouter.com/v1/embeddings", {
  method: "POST",
  headers: { Authorization: "Bearer " + process.env.KEEPROUTER_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "text-embedding-004", input: "The quick brown fox" }),
});

Estimate API costs

At the current KeepRouter customer price, an example workload of 1,000 total input tokens, no cached input, and 0 output tokens per request costs approximately $0.000002 per request. At 100 requests per day, that is $0.006000 over 30 days. This is a usage estimate, excluding processing fees, taxes, retries and application infrastructure. Actual usage, cache hits and supported generation durations need their own checks.

Adjust quantities in the API cost calculator.

Model identity and official sources

Sources checked 2026-09-29.

Who makes this model?

Google's Text Embedding 004 converts text into numerical vectors for semantic search and retrieval. It returns embeddings rather than a conversational answer.

Google Cloud · embedding models

Documented model limits

Google Cloud lists a 2,048-token maximum input sequence and up to 768 output dimensions for English and code tasks. Confirm returned dimensions before writing to an existing vector index.

Google Cloud · embedding models

Service-specific lifecycle

The Gemini API lists shutdown on January 14, 2026. Google Cloud separately lists retirement on April 1, 2027. These are different serving platforms. A KeepRouter catalog listing and configured route do not establish current successful inference or identify which Google platform a route uses. Validate a small request before a migration; changing embedding models requires rebuilding the index.

Google · Gemini API deprecations · Google Cloud · model lifecycle

How to evaluate Text Embedding 004

Text Embedding 004 is listed on KeepRouter as text embeddings under the exact id text-embedding-004. Use /v1/embeddings for the listed route; a maker's upstream features do not automatically apply to this gateway endpoint. The published context window is 2,048 tokens. These are limits, not a recommended request size.

First workload: Embed a small, labeled set of your own documents and queries; measure retrieval recall and index size before migrating the full corpus.

Before production: Keep query and document embeddings on the same model and version. Re-index after a model change rather than mixing incompatible vector spaces.

Public model usage evidence

No public, exact-variant usage figure has been verified for this KeepRouter model id. Missing data is not zero usage; family-level or maker-wide traffic is not presented as this model's traffic.

Published examples and cases

No exact-model customer case has been verified for this entry. The workload above is an evaluation recipe, not a claim of a public deployment.

Source and verification boundary

Official Text Embedding 004 documentation. KeepRouter's live catalog is authoritative for the customer price and enabled endpoint shown here; the maker remains authoritative for upstream model capabilities and limits.

Pricing and implementation guides

Related models

All models & pricing · Quickstart · KeepRouter vs OpenRouter · Glossary · Get an API key

Catalog facts and prices last changed .

Page content reviewed .