POST
/
v1
/
embeddings
curl --request POST \
  --url https://api.taam.cloud/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "jina-embeddings-v3",
  "input": [
    "Generate vector representations of this text"
  ]
}'
{}

Embeddings API

The Embeddings API allows you to convert text into numerical vector representations that capture semantic meaning. These embeddings enable powerful operations like:

  • Semantic text search
  • Text clustering and classification
  • Content recommendation
  • Similarity comparisons

Available Models

Taam Cloud offers several embedding models with different dimensions and performance characteristics:

ModelDimensionsContext WindowBest For
jina-embeddings-v310248192 tokensGeneral purpose, multilingual
text-embedding-3-large30728191 tokensHigh accuracy applications
text-embedding-3-small15368191 tokensEfficient, general purpose
jina-embeddings-v2-base-en7688192 tokensEnglish text optimization

Example Usage

from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.taam.cloud/v1"
)

response = client.embeddings.create(
    model="jina-embeddings-v3",
    input=["Your text to convert to embeddings"]
)

embeddings = response.data[0].embedding
print(f"Generated embedding vector with {len(embeddings)} dimensions")
import OpenAI from "openai";

const openai = new OpenAI({
  apiKey: "your-api-key",
  baseURL: "https://api.taam.cloud/v1"
});

const response = await openai.embeddings.create({
  model: "jina-embeddings-v3",
  input: ["Your text to convert to embeddings"]
});

const embeddings = response.data[0].embedding;
console.log(`Generated embedding vector with ${embeddings.length} dimensions`);

Response Format

The API returns a list of embedding vectors corresponding to each input text, along with usage information:

{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [0.0023064255, -0.009327292, ...], // Vector of floating point numbers
      "index": 0
    }
  ],
  "model": "jina-embeddings-v3",
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}

Best Practices

  • Use consistent embedding models for related datasets
  • For long texts, consider chunking into smaller segments
  • Normalize embeddings if performing cosine similarity
  • Cache embeddings for frequently used content

Authorizations

Authorization
string
header
required

Enter your API key prefixed with 'Bearer '

Body

application/json
model
string
required
Example:

"jina-embeddings-v3"

input
string[]
required

Response

200 - application/json
Successful response

The response is of type object.