Replace the example API key with a workspace key and keep model-specific fields unchanged unless the table above marks them optional.
curl -X POST http://omixa.cloud/api/v1/embeddings \
-H "Authorization: Bearer omx_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "embedding-001",
"input": "Customer support knowledge base paragraph.",
"dimensions": 1024
}'
const response = await fetch('http://omixa.cloud/api/v1/embeddings', {
method: 'POST',
headers: {
'Authorization': 'Bearer omx_live_xxx',
'Content-Type': 'application/json'
},
body: "{\n \"model\": \"embedding-001\",\n \"input\": \"Customer support knowledge base paragraph.\",\n \"dimensions\": 1024\n}"
});
const data = await response.json();
import requests
response = requests.post(
'http://omixa.cloud/api/v1/embeddings',
headers={'Authorization': 'Bearer omx_live_xxx', 'Content-Type': 'application/json'},
json={
"model": "embedding-001",
"input": "Customer support knowledge base paragraph.",
"dimensions": 1024
}
)
print(response.json())
$ch = curl_init('http://omixa.cloud/api/v1/embeddings');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer omx_live_xxx', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{
"model": "embedding-001",
"input": "Customer support knowledge base paragraph.",
"dimensions": 1024
}',
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "omx_live_xxx");
var json = @"{
""model"": ""embedding-001"",
""input"": ""Customer support knowledge base paragraph."",
""dimensions"": 1024
}";
var response = await client.PostAsync("http://omixa.cloud/api/v1/embeddings", new StringContent(json, System.Text.Encoding.UTF8, "application/json"));
var body = await response.Content.ReadAsStringAsync();
payload := []byte(`{
"model": "embedding-001",
"input": "Customer support knowledge base paragraph.",
"dimensions": 1024
}`)
req, _ := http.NewRequest("POST", "http://omixa.cloud/api/v1/embeddings", bytes.NewReader(payload))
req.Header.Set("Authorization", "Bearer omx_live_xxx")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)