Embedding

POST
Generate vector data points from text and images.

Request

This endpoint expects an object.
model
stringRequired

The model to use for generating vectors. Must be bridgetower-large-itm-mlm-itc for now.

input
list of objectsRequired
An array of text and or images.

Response

This endpoint returns an object
id
stringOptional
Unique ID for the chat completion.
object
stringOptional
Type of object (chat completion).
created
integerOptional
Timestamp of when the chat completion was created.
model
stringOptional
The chat model used for generating completions.
data
list of objectsOptional
The set of vectorized data.

Errors

POST
1curl -X POST https://api.predictionguard.com/embedding \
2 -H "x-api-key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "bridgetower-large-itm-mlm-itc",
6 "input": [
7 {
8 "text": "This is Bill Kennedy, a decent Go developer.",
9 "image": "<base64 encoded image>"
10 }
11 ]
12}'
1{
2 "id": "emb-KBUhJ8dAc0hfGQhaWCLwRf5bYU8fw",
3 "object": "embedding_batch",
4 "created": 1717614704,
5 "model": "bridgetower-large-itm-mlm-itc",
6 "data": [
7 {
8 "index": 0,
9 "status": "success",
10 "embedding": [
11 -0.04457271471619606,
12 -0.007496959064155817
13 ]
14 }
15 ]
16}