Skip to navigationSkip to main contentSkip to footerScaleway Docs HomepageAsk our AI
Ask our AI

Using Embeddings API

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 https://api.scaleway.ai/v1/embeddings \
     -H "Authorization: Bearer $SCW_SECRET_KEY" \
     -H "Content-Type: application/json" \
     -d '{
         "model": "bge-multilingual-gemma2",
         "input": "Here is a sentence to embed as a vector"
     }'

Headers

For information about the required headers, see the Using Generative APIs page.

Body

Required parameters

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

Our Embeddings API is OpenAI compatible. Refer to OpenAI’s API reference for detailed information on usage.

Unsupported parameters

  • encoding_format (default float)
  • dimensions

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

InformationOutlineIcon
Note

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

No Results