Skip to navigation

Embeddings

No embedding models are listed on HyperFlow HI today. This page documents the endpoint for when they join the catalog: check the Marketplace or GET /v1/models for models with "mode": "embedding".

POST /v1/embeddings turns a string, or a list of strings, into vectors. Texts that mean similar things get vectors that are close together.

The samples use the OpenAI SDK set up as in the Quickstart.

curl https://api.hi.hyperflow.fun/v1/embeddings \
-H "Authorization: Bearer $HYPERFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "cohere/cohere-embed-v4",
"input": ["Hello!", "How are you?"]
}'

Options

ParameterNotes
inputA string or a list of strings. Send many at once to save round trips
dimensionsA shorter vector, on models that support it
encoding_formatfloat (default) or base64

Use the same model to embed your documents and your queries. Vectors from different models can’t be compared.

Billing

Embeddings are charged for input tokens only. usage.prompt_tokens shows how many.