Embeddings
POST /v1/embeddings: the OpenAI Embeddings API through ACOG, for embedding models on OpenAI, Azure OpenAI and OpenAI-compatible connections.
POST https://gateway.acog.tessarac.com/v1/embeddings
The OpenAI Embeddings API. ACOG routes by model like any other request.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://gateway.acog.tessarac.com/v1",
api_key=os.environ["ACOG_API_KEY"],
)
result = client.embeddings.create(model="text-embedding-3-small", input=["first text", "second text"])
print(len(result.data[0].embedding))
Which connections can serve embeddings
Embeddings are served only by connections that speak the OpenAI API: Direct OpenAI, Azure OpenAI (with a deployment named after the embedding model) and custom OpenAI-compatible endpoints that implement /v1/embeddings.
If your default connection cannot embed (for example it is an Anthropic connection) and an OpenAI-compatible connection declares the model, that connection serves the request. If no connection that declares the model can embed, the request is refused with 422 embeddings_unsupported_shape.
Governance
API keys, model access rules, budgets and rate limits apply to embeddings as to any other request. Data loss prevention and prompt injection screening do not run on embeddings requests.