NavigationContentFooter
Jump toSuggest an edit

Using Embeddings API

Reviewed on 03 September 2024Published on 03 September 2024

Scaleway Generative APIs are designed as a drop-in replacement for the OpenAI APIs. If you have clustering or classification tasks already using one of OpenAI’s client libraries, you can easily configure it to point to Scaleway Embeddings API, and get your existing applications running with open-weight embedding models hosted at Scaleway.

Create embeddings

Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.

Request sample:

curl --request POST \
--url https://api.scaleway.ai/v1/embeddings \
--header 'Authorization: Bearer ${SCW_SECRET_KEY}' \
--header 'Content-Type: application/json'
--data '{
"model": "sentence-t5-xxl",
"input": "<string>"
}'

Headers

Find required headers in this page.

Body

Required parameters

ParamTypeDescription
input*string or arrayInput text to embed, encoded as a string or array of strings. It cannot be an empty string.
model*stringThe name of the model to query.

Our embeddings API is OpenAI compatible. Use OpenAI’s API reference for more detailed information on the usage.

Unsupported parameters

  • encoding_format (default float)
  • dimensions

If you have a use case requiring one of these unsupported parameters, please contact us via Slack on #ai channel.

Note

Check our Python code examples to query embedding models using Scaleway’s Embeddings API.

Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway