Embedding
DocsServerless InferenceEmbedding

Embedding

The Embeddings API allows you to transform text into numerical vectors that capture the semantic meaning of the text. These vectors are highly optimized for searching, clustering, and classifying data within vector databases.

Creating an Embedding

To generate a vector embedding from a string of text, make a POST request to the /v1/embeddings endpoint.

POST
https://api.geodd.io/inference/v1/embeddings

Authorizations

Authorization string header required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model string required

ID of the model to use for embeddings.

Example: geodd-text-embedding-v2
input string | array required

Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays.

Responses

200
OK
Request processed successfully. Returns a list of embedding objects.
401
Unauthorized
Invalid or missing API Key. Check the Authorization header.
429
Too Many Requests
Token limit exceeded. Upgrade to a dedicated instance for higher limits.

Example Request:

json
{ "model": "geodd-text-embedding-v2", "input": "Geodd AI infrastructure is built for high performance scale." }

Response:

json
{ "object": "list", "data": [ { "object": "embedding", "index": 0, "embedding": [ 0.0023064255, -0.009327292, 0.0157973... ] } ], "model": "geodd-text-embedding-v2", "usage": { "prompt_tokens": 10, "total_tokens": 10 } }

Models

You can use standard Geodd embedding models, or specify any open-source embedding model hosted on your Geodd deployment. Ensure the dimensions expected by your vector database match the output length of the embedding model used.