Scaleway logo
OpenAI Compatible API

A vector representation of an input. Similar vectors corresponds to semantically similar inputs.

See How to query embedding modelsOpen in new context for code snippets using openai Python client.


Create an embedding

POST
https://api.scaleway.ai
/{project_id}/v1/embeddings

Generate an embedding.

Create an embedding › path Parameters

project_id
​ProjectId · required

The ID of the Project you want to target. If this value is not provided, your default Project will be used.

Specifying this value allows you to limit access through IAM policies, or to allocate consumption and billing to a specific project.

Create an embedding › Request Body

input
​string · required

String or Array of strings to represent as embedding vector. Maximum array items: 2048

model
​string · required

Unique identifier of the model, such as bge-multilingual-gemma2. Refer to our supported modelsOpen in new context list or /models endpoint for available models.

encoding_format
​string · enum

Format of the embedding representation.

Enum values:
float
base64
Default: float
dimensions
​integer

Number of dimensions to use for the embedding vector representation. Currently, the only supported value is that of the maximum dimensions of a modelOpen in new context. Lower values are not supported and vectors should not be trimmed, since available models do not support matryoshka embeddingsOpen in new context.

Create an embedding › Responses

200
id
​integer

UUID of the response.

object
​string · enum

Type of response object, always set to list.

Enum values:
list
created
​integer

Timestamp when the response was generated (Unix format, in seconds).

model
​string

Unique identifier of the model.

List of embeddings.

​object

Usage information generated by this request.