Skip to main content
POST
Create an embedding

Authorizations

Authorization
string
header
required

Virtual API key. Create one from the FlexAI dashboard. Pass as Authorization: Bearer sk-xxxx.

Body

application/json
model
string
required

Embedding model id. See the model catalog.

Example:

"bge-m3"

input
required

Text (or list of texts) to embed.

Example:

"hello world"

encoding_format
enum<string>
default:float

Encoding of the returned embedding values. Optional; defaults to "float" (matching OpenAI). Use "base64" for the compact wire format. Pass a string or omit the field — do not send an explicit null.

Available options:
float,
base64

Response

Successful response.

object
enum<string>
required
Available options:
list
data
object[]
required
model
string
required
usage
object
required