curl --request POST \
--url https://flow.seekr.com/v1/inference/embeddings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "BAAI/bge-large-en-v1.5",
"input": [
"The quick brown fox",
"jumps over the lazy dog"
],
"encoding_format": "float"
}
'import requests
url = "https://flow.seekr.com/v1/inference/embeddings"
payload = {
"model": "BAAI/bge-large-en-v1.5",
"input": ["The quick brown fox", "jumps over the lazy dog"],
"encoding_format": "float"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'BAAI/bge-large-en-v1.5',
input: ['The quick brown fox', 'jumps over the lazy dog'],
encoding_format: 'float'
})
};
fetch('https://flow.seekr.com/v1/inference/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://flow.seekr.com/v1/inference/embeddings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'BAAI/bge-large-en-v1.5',
'input' => [
'The quick brown fox',
'jumps over the lazy dog'
],
'encoding_format' => 'float'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/inference/embeddings"
payload := strings.NewReader("{\n \"model\": \"BAAI/bge-large-en-v1.5\",\n \"input\": [\n \"The quick brown fox\",\n \"jumps over the lazy dog\"\n ],\n \"encoding_format\": \"float\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/inference/embeddings")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"BAAI/bge-large-en-v1.5\",\n \"input\": [\n \"The quick brown fox\",\n \"jumps over the lazy dog\"\n ],\n \"encoding_format\": \"float\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/inference/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"BAAI/bge-large-en-v1.5\",\n \"input\": [\n \"The quick brown fox\",\n \"jumps over the lazy dog\"\n ],\n \"encoding_format\": \"float\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": 123,
"data": [
{
"index": 123,
"embedding": [
123
],
"object": "embedding"
}
],
"usage": {
"prompt_tokens": 0,
"total_tokens": 0,
"completion_tokens": 0,
"prompt_tokens_details": {
"cached_tokens": 123,
"created_cache_tokens": 123,
"multimodal_tokens": {}
}
},
"object": "list",
"model": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}Create embedding
Generate vector embeddings for one or more input texts.
curl --request POST \
--url https://flow.seekr.com/v1/inference/embeddings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "BAAI/bge-large-en-v1.5",
"input": [
"The quick brown fox",
"jumps over the lazy dog"
],
"encoding_format": "float"
}
'import requests
url = "https://flow.seekr.com/v1/inference/embeddings"
payload = {
"model": "BAAI/bge-large-en-v1.5",
"input": ["The quick brown fox", "jumps over the lazy dog"],
"encoding_format": "float"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'BAAI/bge-large-en-v1.5',
input: ['The quick brown fox', 'jumps over the lazy dog'],
encoding_format: 'float'
})
};
fetch('https://flow.seekr.com/v1/inference/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://flow.seekr.com/v1/inference/embeddings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'BAAI/bge-large-en-v1.5',
'input' => [
'The quick brown fox',
'jumps over the lazy dog'
],
'encoding_format' => 'float'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/inference/embeddings"
payload := strings.NewReader("{\n \"model\": \"BAAI/bge-large-en-v1.5\",\n \"input\": [\n \"The quick brown fox\",\n \"jumps over the lazy dog\"\n ],\n \"encoding_format\": \"float\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/inference/embeddings")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"BAAI/bge-large-en-v1.5\",\n \"input\": [\n \"The quick brown fox\",\n \"jumps over the lazy dog\"\n ],\n \"encoding_format\": \"float\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/inference/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"BAAI/bge-large-en-v1.5\",\n \"input\": [\n \"The quick brown fox\",\n \"jumps over the lazy dog\"\n ],\n \"encoding_format\": \"float\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": 123,
"data": [
{
"index": 123,
"embedding": [
123
],
"object": "embedding"
}
],
"usage": {
"prompt_tokens": 0,
"total_tokens": 0,
"completion_tokens": 0,
"prompt_tokens_details": {
"cached_tokens": 123,
"created_cache_tokens": 123,
"multimodal_tokens": {}
}
},
"object": "list",
"model": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}Authorizations
Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.
Body
- EmbeddingCompletionRequest
- EmbeddingChatRequest
x >= -1Which side to truncate from when truncate_prompt_tokens is active. 'right' keeps the first N tokens. 'left' keeps the last N tokens.
left, right The request_id related to this request. If the caller does not set it, a random uuid will be generated.
The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.
Additional kwargs to pass to the HF processor.
If specified, the prefix cache will be salted with the provided string to prevent an attacker from guessing prompts in multi-user environments.
If true (the default), special tokens (e.g. BOS) will be added to the prompt.
float, base64, bytes, bytes_only What dtype to use for encoding. Defaults to float32 for base64 encoding to match the OpenAI python client behavior. Affects base64 and binary responses only.
float32, float16, bfloat16, fp8_e4m3, fp8_e5m2 What endianness to use for encoding. Defaults to native to match the OpenAI python client behavior. Affects base64 and binary responses only.
native, big, little Whether to use activation for the pooler outputs. null uses the pooler's default, which is true in most cases.
Was this page helpful?