Multimodal Embedding Model
POSThttps://knox.chat/v1/multimodalembeddings
Returns Multimodal Embedding Response
The multimodal embedding endpoint returns vector representations of given multimodal input lists composed of text, images, or interleaving of both modalities.
Headers
Name | Type | Required | Description |
---|---|---|---|
Authorization | String | Yes | Bearer authentication in the form of Bearer <token>, where token is your authentication token. |
- 图片URL
- Base64 图片
curl -X POST https://knox.chat/v1/multimodalembeddings \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-H "content-type: application/json" \
-d '
{
"inputs": [
{
"content": [
{
"type": "text",
"text": "This is a banana."
},
{
"type": "image_url",
"image_url": "https://knox.chat/logo.png"
}
]
}
],
"model": "voyage-multimodal-3"
}'
curl -X POST https://knox.chat/v1/multimodalembeddings \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-H "content-type: application/json" \
-d '
{
"inputs": [
{
"content": [
{
"type": "text",
"text": "This is a banana."
},
{
"type": "image_base64",
"image_base64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA..."
}
]
}
],
"model": "voyage-multimodal-3"
}'
Response
Success Response (200)
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
0.027587891,
-0.021240234,
0.018310547,
"...",
-0.021240234
],
"index": 0
}
],
"model": "voyage-multimodal-3",
"usage": {
"text_tokens": 5,
"image_pixels": 2000000,
"total_tokens": 3576
}
}
Response Errors
- 4xx series are client-side errors
- 5xx series are server-side errors