google · Embeddings

embeddinggemma-2 API

embeddinggemma-2 from google converts text into numerical vectors for similarity search. It is an embedding service, so the response is a vector rather than a chat answer.

Available

Toman per million tokens

Input5,557

The usage rate is fixed at request admission. Reported consumption determines the final usage amount.

API model ID
di-googleembeddinggemma-2-39b44716f6
Model developer
google
Service type
Embeddings
Current availability
Available
Configured context limit
8,192 tokens

Model features

No additional gateway capabilities have been confirmed for this model.

What is embeddinggemma-2?

Use the public identifier di-googleembeddinggemma-2-39b44716f6 for embeddinggemma-2 in ServerNet. The gateway uses this identifier to select the configured route; the developer is google.

For embeddinggemma-2, test the exact model size on your own task. A family’s multimodal capability does not make media inputs available on a text-only gateway route.

Where to use embeddinggemma-2

  • Index document chunks with embeddinggemma-2 for semantic search.
  • Embed the search query with the same embeddinggemma-2 model used to build your index.
  • Evaluate retrieval quality before combining the results with a text-generation model.

Build your integration

Send a string or a list of strings to /v1/embeddings. Store the returned vectors in your search index. When switching models, rebuild the index and check vector dimensions instead of mixing incompatible vectors.

Inputs and service limits

The route accepts plain text and batches of up to 128 texts. Token ID arrays, media inputs and unsupported output formats are refused. Choose chunk sizes within the model’s configured input limit.

A request cost example

For 1,000 input tokens and 0 output tokens, without a cache discount. This is a catalogue estimate, not a fixed request fee. Reported consumption and the price frozen for your request determine the usage amount.

Estimated usage, Toman
7

Connect to embeddinggemma-2 API

Enable ai:embedding on your key and ai:models:read to check availability. Set SERVERNET_API_KEY in your server environment. Change the idempotency key for each new request; keep it unchanged only for an identical retry.

curl https://servernet.cloud/v1/embeddings \
  -H "Authorization: Bearer $SERVERNET_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: CHANGE_FOR_EACH_NEW_REQUEST' \
  -d '{
    "model": "di-googleembeddinggemma-2-39b44716f6",
    "input": [
        "Hello world",
        "Search documents"
    ]
}'

Use the same Idempotency-Key when retrying an identical request. Successful responses are replayed without a second charge for 24 hours. Do not automatically retry when x-should-retry:false is present. The key is shown once. Store it in a server environment variable. Keep it out of browser code, GitHub and logs.

Keys, budgets and usage reports

Frequently asked questions

Is embeddinggemma-2 available through ServerNet?

embeddinggemma-2 is currently available on the configured route. Check GET /v1/models before sending a request: availability can change with provider capacity, catalogue freshness or account configuration.

Which model ID and API endpoint should I use for embeddinggemma-2?

Use di-googleembeddinggemma-2-39b44716f6 as the model field, the endpoint shown below and the matching key scope. ServerNet keys are project-specific; an SDK also needs https://servernet.cloud/v1 as its base URL.

How is embeddinggemma-2 usage charged?

Only input tokens are billed for this embedding route. A returned vector is not billable generated text. Each text in a batch contributes to input consumption.

What should I check before using embeddinggemma-2 in production?

The route accepts plain text and batches of up to 128 texts. Token ID arrays, media inputs and unsupported output formats are refused. Choose chunk sizes within the model’s configured input limit.

Compare models for the same task

sentence-transformers

all-MiniLM-L12-v2

Available Embeddings

Configured context limit: 512 tokens

Input1,390
Toman per million tokens
sentence-transformers

all-MiniLM-L6-v2

Available Embeddings

Configured context limit: 512 tokens

Input1,390
Toman per million tokens
sentence-transformers

all-mpnet-base-v2

Available Embeddings

Configured context limit: 512 tokens

Input1,390
Toman per million tokens
BAAI

bge-base-en-v1.5

Available Embeddings

Configured context limit: 512 tokens

Input1,390
Toman per million tokens
BAAI

bge-en-icl

Available Embeddings

Configured context limit: 8,192 tokens

Input2,779
Toman per million tokens
BAAI

bge-large-en-v1.5

Available Embeddings

Configured context limit: 512 tokens

Input2,779
Toman per million tokens
Only available models are exposed by the API. Availability requires a configured provider, valid prices and a supported execution path.