Generate text embedding
curl --request POST \
--url https://api.hoox.sh/agent/embedding \
--header 'Content-Type: application/json' \
--data '
{
"text": "BTC funding rate flipped positive after 14 days"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({text: 'BTC funding rate flipped positive after 14 days'})
};
fetch('https://api.hoox.sh/agent/embedding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hoox.sh/agent/embedding"
payload = { "text": "BTC funding rate flipped positive after 14 days" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"embedding": [
123
],
"model": "<string>",
"error": "<string>"
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}AI Agent
Generate text embedding
Internal endpoint on agent-worker. Generates a vector
embedding for the supplied text via Workers AI (or the chosen
provider override).
POST
/
agent
/
embedding
Generate text embedding
curl --request POST \
--url https://api.hoox.sh/agent/embedding \
--header 'Content-Type: application/json' \
--data '
{
"text": "BTC funding rate flipped positive after 14 days"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({text: 'BTC funding rate flipped positive after 14 days'})
};
fetch('https://api.hoox.sh/agent/embedding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hoox.sh/agent/embedding"
payload = { "text": "BTC funding rate flipped positive after 14 days" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"embedding": [
123
],
"model": "<string>",
"error": "<string>"
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}{
"success": false,
"requestId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"error": "Invalid JSON payload structure."
}Last modified on June 17, 2026
⌘I