Authorization
: Bearer <your-api-key>
Parameter | Type | Description | Required |
---|---|---|---|
input | String or array of strings | The input text to be embedded. Must not exceed the model’s token limit. | Yes |
model | String | The model used to generate embeddings (e.g., E5-Mistral-7B-Instruct ). | Yes |
Property | Type | Description |
---|---|---|
object | String | The type of response, always list . |
data | Array | A list of embedding objects. |
model | String | The name of the model used to generate embeddings. |
usage | Object | Token usage statistics for the request, including prompt_tokens . |
Property | Type | Description |
---|---|---|
object | String | Always embedding . |
embedding | Array | The embedding vector, represented as a list of floats. |
index | Integer | The index of the embedding in the list of embeddings. |
Error type | HTTP code | Description | Code |
---|---|---|---|
Invalid request error | 400 | An issue with the request parameters, e.g., model not compatible or input too long. | invalid_request_error |
Authentication error | 401 | The provided API key is invalid. | invalid_authentication |
Rate limit exceeded | 429 | Request quota exceeded. | insufficient_quota |
Request timeout | 408 | The request timed out. | request_timeout |