curl --request POST \
--url https://api.tikway.ai/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/text-embedding-3-large",
"input": "Hello, world!"
}
'import requests
url = "https://api.tikway.ai/v1/embeddings"
payload = {
"model": "openai/text-embedding-3-large",
"input": "Hello, world!"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'openai/text-embedding-3-large', input: 'Hello, world!'})
};
fetch('https://api.tikway.ai/v1/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://api.tikway.ai/v1/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' => 'openai/text-embedding-3-large',
'input' => 'Hello, world!'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.tikway.ai/v1/embeddings"
payload := strings.NewReader("{\n \"model\": \"openai/text-embedding-3-large\",\n \"input\": \"Hello, world!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.tikway.ai/v1/embeddings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"openai/text-embedding-3-large\",\n \"input\": \"Hello, world!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tikway.ai/v1/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"openai/text-embedding-3-large\",\n \"input\": \"Hello, world!\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"embedding": [
-0.005828857421875,
-0.0241241455078125,
-0.02203369140625
],
"index": 0,
"object": "embedding"
}
],
"model": "openai/text-embedding-3-large",
"object": "list",
"usage": {
"prompt_tokens": 4,
"total_tokens": 4
}
}GPT - vector
curl --request POST \
--url https://api.tikway.ai/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/text-embedding-3-large",
"input": "Hello, world!"
}
'import requests
url = "https://api.tikway.ai/v1/embeddings"
payload = {
"model": "openai/text-embedding-3-large",
"input": "Hello, world!"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'openai/text-embedding-3-large', input: 'Hello, world!'})
};
fetch('https://api.tikway.ai/v1/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://api.tikway.ai/v1/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' => 'openai/text-embedding-3-large',
'input' => 'Hello, world!'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.tikway.ai/v1/embeddings"
payload := strings.NewReader("{\n \"model\": \"openai/text-embedding-3-large\",\n \"input\": \"Hello, world!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.tikway.ai/v1/embeddings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"openai/text-embedding-3-large\",\n \"input\": \"Hello, world!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tikway.ai/v1/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"openai/text-embedding-3-large\",\n \"input\": \"Hello, world!\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"embedding": [
-0.005828857421875,
-0.0241241455078125,
-0.02203369140625
],
"index": 0,
"object": "embedding"
}
],
"model": "openai/text-embedding-3-large",
"object": "list",
"usage": {
"prompt_tokens": 4,
"total_tokens": 4
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Convert text or token ID to vector representation.
Vector model ID.
1"openai/text-embedding-3-small"
"openai/text-embedding-3-large"
"bailian/text-embedding-v4"
"google/gemini-embedding-2-preview"
Requires input to generate vectors. Supports a single string, string array, token ID array or token ID two-dimensional array. The Gemini embedding model currently only supports single strings.
1"OfoxAI is an LLM Gateway"
Vector encoding format. float returns an array of floating point numbers; base64 returns Base64-encoded float32 data.
float, base64 Output vector dimension, only supported by some models. Gemini embedding models are limited to 128 to 3072 in the current gateway.
x >= 1End user identification, used for upstream abuse monitoring.
Response
OpenAI Embeddings compatible responses.
Fixed to list.
"list"Enter the corresponding vector result list.
1Hide child attributes
Hide child attributes
The actual model ID used.

