Skip to navigation

Embeddings

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

curl https://ai.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.