Embeddings
Create Embeddings
Returns vector representations of the provided input for use by machine-learning models and algorithms.
Related guide: Embeddings
Creates embedding vectors that represent the input text.
Authorization
bearer AuthorizationBearer <token>
In: header
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/embeddings" \ -H "Authorization: Bearer {{YOUR_API_KEY}}" \ -H "Content-Type: application/json" \ -d '{ "model": "bge-m3", "input": "The quick brown fox jumps over the lazy dog." }'"{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"embedding\",\n \"embedding\": [\n 0.0023064255,\n -0.009327292,\n .... (1536 floats total for ada-002)\n -0.0028842222\n ],\n \"index\": 0\n }\n ],\n \"model\": \"text-embedding-ada-002\",\n \"usage\": {\n \"prompt_tokens\": 8,\n \"total_tokens\": 8\n }\n}"