Create embeddings

Create embeddings through the Respan gateway with automatic logging.

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, OpenAI or Azure OpenAI provider credentials go in Settings -> Providers or the request body credential_override field, not in this auth field.

Headers

X-Data-Respan-ParamsstringOptional

Base64-encoded JSON object of Respan parameters. Legacy X-Data-Keywordsai-Params is still accepted.

Request

This endpoint expects an object.
modelenumRequired
Embedding model ID.
Allowed values:
inputanyRequired
Text to embed. String or array of strings.
encoding_formatenumOptionalDefaults to float
Output format.
Allowed values:
dimensionsintegerOptional

Output embedding dimensions. Only supported by text-embedding-3-* models.

customer_credentialsobjectOptional

Per-customer LLM provider credentials.

disable_logbooleanOptionalDefaults to false

When true, omits input/output from the log. Metrics still recorded.

metadataobjectOptional

Custom key-value metadata.

customer_identifierstringOptional
End user identifier.
thread_identifierstringOptional
Conversation thread ID.

Response

Embedding results.
objectstring
datalist of objects
modelstring
usageobject

Errors

401
Unauthorized Error