Embeddings turn text into series of numbers called vectors. Similar texts get similar vectors. You need this for semantic search, for recommendations or to group documents by topic. FlowModels provides the POST /v1/embeddings endpoint in OpenAI's format for this.
Which models are available
Only the models enabled for embeddings are allowed, currently openai/text-embedding-3-small and openai/text-embedding-3-large. You'll find them in the model list under Models by setting the Kind filter to Embedding, along with their prices.

If you send a language model to this endpoint, the API rejects the request with 400 unsupported_for_model before anything is reserved or billed.
Send a request
curl https://api.flowmodels.one/v1/embeddings \
-H "Authorization: Bearer at_your_key" \
-H "Content-Type: application/json" \
-d '{"model": "openai/text-embedding-3-small", "input": ["How do I change my delivery address?", "Update delivery address after ordering"]}'
With the OpenAI library for Python:
result = client.embeddings.create(
model="openai/text-embedding-3-small",
input=["How do I change my delivery address?", "Update delivery address after ordering"],
)
vector = result.data[0].embedding
Use the OpenAI library for Python and Node.js with FlowModels explains how to configure the library for FlowModels.
The response
{
"object": "list",
"data": [
{"object": "embedding", "embedding": [0.0023, -0.0091, …], "index": 0},
{"object": "embedding", "embedding": [0.0114, 0.0072, …], "index": 1}
],
"model": "openai/text-embedding-3-small",
"usage": {"prompt_tokens": 16, "total_tokens": 16, "cost": "0.000004", "currency": "EUR"}
}
The vectors come back in the same order as your inputs. index also states the position. usage.cost shows what the request cost in euros.
Many texts at once
input is either a single text or a list of texts. A list can have at most 2,048 entries, each entry at most 8,192 characters. If you exceed one of these limits, the request is rejected, not truncated. So split large collections into batches yourself.
A batch is processed in a single call at the provider and billed once. Bundling many texts in one request also saves your per-minute request limit.
Other fields
encoding_format:floatreturns the vectors as a list of numbers, which is the default.base64returns them as Base64-encoded 32-bit floats in little-endian order. This is the format the OpenAI libraries expect internally, and it transfers significantly less data.dimensions: the desired length of the vectors, provided the model supports it. Shorter vectors take up less storage in your database.user: your own end-user identifier for abuse tracking.
Good to know
- Embeddings have no Brain, no history and no streaming.
external_identifierplays no role here. - Always compare vectors from the same model. Vectors from
text-embedding-3-smallandtext-embedding-3-largearen't compatible with each other. - If you only want to provide documents for an end user's Brain, you don't need to create your own embeddings. We take care of that, see Upload documents for an end user and use them as context.