Skip to main content

Embeddings

POST 

https://api.withemissary.com/v1/embeddings

Get embeddings from a deployment using the provided input.

Request

Responses

Successful operation

Authorization: X-API-Key

name: X-API-Keytype: apiKeyin: header
import http.client
import json

conn = http.client.HTTPSConnection("api.withemissary.com")
payload = json.dumps({
"model": "Llama-3.2-1B-Instruct",
"input": "What is the capital of France?",
"target": "Paris is the capital of France.",
"cosine": True,
"manhattan": False,
"euclidean": False
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-Key': '<API_KEY_VALUE>'
}
conn.request("POST", "/v1/embeddings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Request Collapse all
Base URL
https://api.withemissary.com
Auth
Body required
{
  "model": "Llama-3.2-1B-Instruct",
  "input": "What is the capital of France?",
  "target": "Paris is the capital of France.",
  "cosine": true,
  "manhattan": false,
  "euclidean": false
}