API REFERENCE
Embeddings
Turn text into 384-dimension vectors. Up to 64 inputs per request.
POST
/v1/embeddingsCreate embeddings.
Auth: Bearer keyRequest body
inputstring | array of strings · requiredThe text to embed. At most 64 inputs; more is refused with 400 { "detail": "At most 64 inputs per request." }.
modelstringOptional. It is echoed back and never used to choose the embedder; which embedder runs is Tessen's choice, so every vector in one index comes from the same one. The default alias is tessen-embed.
CREATE EMBEDDINGS
curl https://api.tessen.ai/v1/embeddings \ -H "Authorization: Bearer $TESSEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"input": ["first sentence", "second sentence"]}'import osimport requests response = requests.post( "https://api.tessen.ai/v1/embeddings", headers={"Authorization": f"Bearer {os.environ['TESSEN_API_KEY']}"}, json={"input": ["first sentence", "second sentence"]}, timeout=60,)response.raise_for_status()body = response.json()print("vectors:", len(body["data"]), "dimension:", body["dimension"], "model:", body["model"])const response = await fetch("https://api.tessen.ai/v1/embeddings", { method: "POST", headers: { Authorization: `Bearer ${process.env.TESSEN_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ input: ["first sentence", "second sentence"] }),});if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);const body = await response.json();console.log("vectors:", body.data.length, "dimension:", body.dimension, "model:", body.model);Response
data[].embeddingarray of numbers384 numbers, in the order of input.
data[].indexintegerPosition of the input.
modelstringYour alias, or tessen-embed.
dimensioninteger384.
usageobjectprompt_tokens and total_tokens, both 0: embeddings are not metered and do not debit the wallet.
Note
Tessen does not publish retrieval-quality figures for these vectors. Evaluate them on your own data before depending on them.
Errors
| Status | When |
|---|---|
| 400 | More than 64 inputs, or input empty or not strings. |
| 401 | Missing or invalid key. |
| 502 | "Embeddings are temporarily unavailable." Retry later. |