Terminal
curl https://deference.si/v1/embeddings \
-H "Authorization: Bearer $DEFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/text-embedding-3-small",
"input": "The quick brown fox"
}'import os
from openai import OpenAI
client = OpenAI(base_url="https://deference.si/v1", api_key=os.environ["DEFERENCE_API_KEY"])
result = client.embeddings.create(model="openai/text-embedding-3-small", input="The quick brown fox")
print(len(result.data[0].embedding))import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://deference.si/v1", apiKey: process.env.DEFERENCE_API_KEY });
const result = await client.embeddings.create({ model: "openai/text-embedding-3-small", input: "The quick brown fox" });
console.log(result.data[0].embedding.length);Needs an API keyGet one