Embeddings
You can get privacy-conserving text and image embeddings from
available models using a call to the /embeddings
REST
API endpoint or any of the official SDKs (Python, Go, Rust, JS, or cURL).
Generate Embeddings
To generate embeddings, you can use the following code examples. Depending on your preference or requirements, select the appropriate method for your application. This functionality accepts text and image inputs, and supports batching multiple inputs. The Go REST API only supports images that are input as a base64 encoded string, whereas the python client supports image files, image urls, and images encoded in a base64 string.
The output will look something like this.
This approach presents a straightforward way for readers to choose and apply the code example that best suits their needs for generating text completions using either Python, Go, Rust, JS, or cURL.