embeddings_api_v1_embeddings_post
Generate embeddings for input text using compatible providers like OpenAI, Ollama, or pipelines, with user authentication and model validation.
Instructions
OpenAI-compatible embeddings endpoint.
This handler:
Performs user/model checks and dispatches to the correct backend.
Supports OpenAI, Ollama, arena models, pipelines, and any compatible provider.
Args: request (Request): Request context. form_data (dict): OpenAI-like payload (e.g., {"model": "...", "input": [...]}) user (UserModel): Authenticated user.
Returns: dict: OpenAI-compatible embeddings response.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"form_data": "<form_data>"
},
"name": "embeddings_api_v1_embeddings_post"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form_data | Yes |