POST
/
v1
/
embeddings
import { AtomaSDK } from "atoma-sdk";

const atomaSDK = new AtomaSDK({
  bearerAuth: process.env["ATOMASDK_BEARER_AUTH"] ?? "",
});

async function run() {
  const result = await atomaSDK.embeddings.create({
    model: "intfloat/multilingual-e5-large-instruct",
    input: "The quick brown fox jumped over the lazy dog",
    encoding_format: "float",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "data": [
    {
      "embedding": "[0.0023064255, -0.009327292]",
      "index": 0,
      "object": "embedding"
    }
  ],
  "model": "intfloat/multilingual-e5-large-instruct",
  "object": "list",
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request object for creating embeddings

Response

200
application/json

Embeddings generated successfully

Response object from creating embeddings