Embeddings
POST
/v1/embeddingsinput is required: one string or an array of strings. model is optional and defaults to text-embedding-3-small.
Request
curl https://api-dev.satulink.ai/v1/embeddings \
-H "Authorization: Bearer $SATULINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "text-embedding-3-small", "input": "Halo!" }'// client dibuat seperti di bagian SDK
const embedding = await client.embeddings.create({
model: "text-embedding-3-small",
input: "Halo!",
});
console.log(embedding.data[0].embedding.slice(0, 3));# client dibuat seperti di bagian SDK
embedding = client.embeddings.create(
model="text-embedding-3-small",
input="Halo!",
)
print(embedding.data[0].embedding[:3])200 OK
json
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [0.0023, -0.0091, 0.0154]
}
],
"usage": { "prompt_tokens": 8, "total_tokens": 8, "cost_idr": 2 }
}No embedding model has an active route yet. Check
GET /v1/models before using this endpoint.Still haven't found the answer? Try it directly in Playground or view the list of active models.

