Create Embeddings
Generate text embeddings using the local model.
Drop-in replacement for the OpenAI embeddings API. Supports float and base64 encoding formats. Pass input_type: "query" for search queries or "document" for content to be indexed.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request schema compatible with OpenAI's embeddings endpoint.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/embeddings" \ -H "Content-Type: application/json" \ -d '{}'{ "object": "list", "data": [ { "object": "embedding", "index": 0, "embedding": [ 0 ] } ], "model": "string", "usage": { "prompt_tokens": 0, "total_tokens": 0 }}{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string", "input": null, "ctx": {} } ]}