openapi: 3.1.0
info:
  title: Generative APIs API
  description: |-
    Scaleway Generative APIs provides access to the latest AI models hosted on Scaleway infrastructure.

    Generative APIs specification targets OpenAI API compatibility.

    (switchcolumn)
    (switchcolumn)

    ## Concepts

    Refer to our [dedicated concepts page](https://www.scaleway.com/en/docs/generative-apis/concepts/) to find definitions of the different terms referring to Generative APIs.

    (switchcolumn)
    (switchcolumn)

    ## Quickstart

    1. Configure your environment variables.
        <Message type="note">
        This is an optional step that seeks to simplify your usage of the APIs.
        </Message>

        ```bash
        export SCW_ACCESS_KEY="<API access key>"
        export SCW_SECRET_KEY="<API secret key>"
        export SCW_REGION="<Scaleway region>"
        ```
    2. Generate content from a model by running the following command.
        ```bash
        curl https://api.scaleway.ai/v1/chat/completions \
          -H "Content-Type: application/json" \
          -H "Authorization: Bearer $SCW_SECRET_KEY" \
          -d '{
            "model": "llama-3.3-70b-instruct",
            "messages": [
              {
                "role": "system",
                "content": "You are a helpful assistant."
              },
              {
                "role": "user",
                "content": "Hello!"
              }
            ]
          }'
        ```

    See [How to use Generative APIs](https://www.scaleway.com/en/docs/generative-apis/how-to/)
    for quickstart and snippets using `REST` request or libraries such as `openai` python client.

    (switchcolumn)
    <Message type="requirement">
    To perform the following steps, you must first ensure that:
      - you have an account and are logged into the [Scaleway console](https://console.scaleway.com/organization)
      - you have created an [API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/) and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/identity-and-access-management/iam/reference-content/permission-sets/) to perform the actions described on this page.
      - you have [installed `curl`](https://curl.se/download.html)
    </Message>
    (switchcolumn)

    ## Technical Information

    ### Regions

    Scaleway's infrastructure is spread across different [regions and Availability Zones](https://www.scaleway.com/en/docs/console/my-account/reference-content/products-availability/).

    Generative APIs is available in the Paris region, which is represented by the following path parameters (optional while there is only one region):
    - `fr-par`

    ### Supported endpoints and features

    Supported endpoints are:
    - `/v1/chat/completions`
    - `/v1/embeddings`
    - `/v1/models`

    The `/v1/chat/completions` endpoint:
    - Supports many features such as:
      - Structured outputs (JSON response format)
      - Tool calling (ie. compatibility with workflows using MCP servers)
      - Sending and analyzing images
    - Does not yet support the following parameters: `user`, `system_fingerprint`,
    `reasoning_effort`, `modalities`, `web_search_options`, `service_tier`, `store`,
    `audio`, `prediction`, `metadata`.

    ### Third party tool integration

    For full details of direct integration into third party tooling, see [Integrating Scaleway Generative APIs with popular AI tools](https://www.scaleway.com/en/docs/generative-apis/reference-content/integrating-generative-apis-with-popular-tools/).
    If your tool is not listed, you can still specify the Scaleway URL and
    API key in most OpenAI-like plugins, as compatibility largely depends on the above APIs.

    ## Technical Limitations

    When choosing a model, select the ones compatible with the APIs endpoints you want to use
    in our [model catalog](https://www.scaleway.com/en/docs/generative-apis/reference-content/supported-models/).
    For example, `/v1/embeddings` is only available for embeddings models.

    ## Going Further

    For more information about Generative APIs, you can check out the following pages:

    * [Generative APIs Documentation](https://www.scaleway.com/en/docs/generative-apis/)
    * [Generative APIs FAQ](https://www.scaleway.com/en/docs/generative-apis/faq/)
    * [Scaleway Slack Community - AI Channel](https://scaleway-community.slack.com/archives/C01SGLGRLEA) join the #ai channel
    * [Contact our support team](https://console.scaleway.com/support/tickets)

    ### Troubleshoooting

    See [Troubleshooting Generative APIs](https://www.scaleway.com/en/docs/generative-apis/troubleshooting/)
    for advanced APIs behaviour descriptions and common issues solutions.
  version: v1
servers:
  - url: https://api.scaleway.ai
tags:
  - name: Chat Completions
    description: |
      A chat completion is a model response for a given conversation. It represents the functionality of generating a response in a chat context
  - name: Embeddings
    description: |
      A vector representation of an input.
      Similar vectors corresponds to semantically similar inputs.
      
      See [How to query embedding models](https://www.scaleway.com/en/docs/generative-apis/how-to/query-embedding-models/)
      for code snippets using `openai` Python client.
  - name: Models
    description: |
      A model refers to a system that has been trained to generate content such as text, images, or other data types based on input prompts or instructions
components:
  schemas:
    ChatCompletionMessageToolCall:
      type: object
      properties:
        id:
          type: string
          description: UUID of the tool call.
        type:
          type: string
          description: Type of tool call, always set to `function`.
          enum:
            - function
        function:
          type: object
          description: Function to call, identified by the model.
          properties:
            name:
              type: string
              description: Name of the function to call.
            arguments:
              type: string
              description:
                Arguments to call the function with, as generated by the model
                in JSON format. Note that model may not always generate
                valid JSON or parameters. Validate the arguments in your code before
                calling a function.
          x-properties-order:
            - name
            - arguments
      x-properties-order:
        - id
        - type
        - function
    ChatCompletionMessageToolCalls:
      type: array
      description: List of tool calls required by the model, such as function calls.
      items:
        $ref: '#/components/schemas/ChatCompletionMessageToolCall'
    ChatCompletionRequestMessageContentPart:
      type: object
      properties:
        type:
          type: string
          description: Type of content. `image_url` is only supported with `user` role.
          enum:
            - text
            - image_url
        text:
          type: string
          description: Text content. Required if `type` is set to `text`.
        image_url:
          type: string
          description: |-
            URL of a remote image or encoding in base64 of a local image. Required if `type` is set to `image_url`.

            See [How to query vision models](https://www.scaleway.com/en/docs/generative-apis/how-to/query-vision-models/)
            for code snippets using `openai` Python client or how to encode local images.
      required:
        - type
    ChatCompletionRequestMessage:
      type: object
      properties:
        role:
          type: string
          description: Role of the message's author.
          enum:
            - system
            - user
            - assistant
            - tool
        content:
          type: string
          description: |-
            Content of a message as string. Required for all roles, except `assistant` if `tool_calls` is specified instead.
          x-one-of: content
        content​:
          type: array
          description: |-
            Content of a message as array of content parts. Required for all roles, except `assistant` if `tool_calls` is specified instead.
          items:
            $ref: '#/components/schemas/ChatCompletionRequestMessageContentPart'
          x-one-of: content
        tool_calls:
          type: array
          description: |-
            List of tool calls required by the model. Can only be used with `assistant` if `content` is not specified.
          items:
            $ref: '#/components/schemas/ChatCompletionMessageToolCall'
        tool_call_id:
          type: string
          description: UUID of the tool call. Must only be used with `tool` role.
      required:
        - role
    ChatCompletionResponseMessage:
      type: object
      description: Message generated by the model.
      properties:
        role:
          type: string
          description: Role of the message's author, always set to `assistant` in the response.
          enum:
            - assistant
        content:
          type: string
          description: Content of the message.
        tool_calls:
          $ref: '#/components/schemas/ChatCompletionMessageToolCalls'
      x-properties-order:
        - role
        - content
        - tool_calls
    ChatCompletionStreamOptions:
      type: object
      description: >
        An object containing parameters that modify the behavior of stream responses.
        Can only be used if `stream` is set to `true`.
      nullable: true
      default: null
      properties:
        include_usage:
          type: boolean
          description: >
            Defines whether a usage field is included in a stream.
            If set, an additional chunk will be streamed before the `data:
            [DONE]` message. The `usage` field on this chunk shows the token usage
            statistics for the complete stream.
    ChatCompletionTokenLogprob:
      type: object
      properties:
        token:
          description: Token generated.
          type: string
        logprob:
          description:
            Log probability of generating this token, if it is among the top 20 most
            likely tokens. Otherwise, the value `-9999.0` is used to mean
            that the token is very unlikely.
          type: number
        bytes:
          description:
            List of integers representing the UTF-8 bytes (in decimal format) representation of
            a token. Since some characters may be represented by multiple tokens,
            this representation can be combined to represent the corresponding character in UTF-8.
          type: array
          items:
            type: integer
          nullable: true
        top_logprobs:
          description:
            List of most probable next tokens and their log probability.
          type: array
          items:
            type: object
            properties:
              token:
                description: A token among the most next likely ones.
                type: string
              logprob:
                description:
                  Log probability of generating this token, if it is among the top 20 most
                  likely tokens. Otherwise, the value `-9999.0` will be used to mean
                  that the token is very unlikely.
                type: number
              bytes:
                description:
                  List of integers representing the UTF-8 bytes (in decimal format) representation of
                  a token. Since some characters may be represented by multiple tokens,
                  this representation can be combined to represent the corresponding character in UTF-8.
                type: array
                items:
                  type: integer
                nullable: true
            x-properties-order:
              - token
              - logprob
              - bytes
      x-properties-order:
        - token
        - logprob
        - bytes
        - top_logprobs
    ChatCompletionTool:
      type: object
      properties:
        type:
          type: string
          enum:
            - function
          description: Type of tool object, always set to `function`.
        function:
          $ref: '#/components/schemas/FunctionObject'
      required:
        - type
        - function
    ChatCompletionToolChoiceOption:
      type: string
      description: |-
        Defines whether a model can call tools, and if so, and which ones.

        `none`: model will not call any tools, and only generate a message.

        `auto`: model can choose either to generate a message, or to call one or
        multiple tools.

        `required`: model must call one or multiple tools.

        Default: `none` when no tools are present, otherwise `auto`.

        An object can also be provided to specify a tool that the model
        must call. Object format must be:

        `{"type": "function", "function": {"name": "function_name_as_provided_in_tools"}}`
      enum:
        - none
        - auto
        - required
    ChatCompletionResponseChoice:
      type: object
      properties:
        index:
          type: integer
          description: Index of the choice in the list of choices.
        message:
          $ref: '#/components/schemas/ChatCompletionResponseMessage'
        logprobs:
          description: Object containing log probability information for each token in a generated response.
          type: object
          nullable: true
          properties:
            content:
              description: List of content tokens and their log probability information.
              type: array
              items:
                $ref: '#/components/schemas/ChatCompletionTokenLogprob'
              nullable: true
            refusal:
              description: List of refusal tokens and their log probability information.
              type: array
              items:
                $ref: '#/components/schemas/ChatCompletionTokenLogprob'
              nullable: true
        finish_reason:
          type: string
          description: |
            Reason the model stopped generating tokens.

            `stop`: model successfully reached the end of its answer, or a provided
            stop sequence

            `length`: maximum number of output tokens was reached, blocking further generation

            `tool_calls`: model needed to call a tool
          enum:
            - stop
            - length
            - tool_calls
    ChatCompletionUsage:
      type: object
      properties:
        prompt_tokens:
          type: integer
          description: Number of input tokens.
        total_tokens:
          type: integer
          description: Total number of tokens (input and output).
        completion_tokens:
          type: integer
          description: Number of output tokens.
        completion_tokens_details:
          type: object
          description: Breakdown of output tokens by type.
          nullable: true
          properties:
            reasoning_tokens:
              type: integer
              description: Number of output tokens used for reasoning.
        prompt_tokens_details:
          type: object
          description: Breakdown of input tokens by type.
          nullable: true
          properties:
            audio_tokens:
              type: integer
              description: Number of audio input tokens.
      x-properties-order:
        - prompt_tokens
        - total_tokens
        - completion_tokens
        - completion_tokens_details
        - prompt_tokens_details
    CreateChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: UUID of the response.
        object:
          type: string
          description: Type of response object, always set to `chat.completion`.
          enum:
            - chat.completion
        created:
          type: integer
          description: Timestamp when the response was generated (Unix format, in seconds).
        model:
          type: string
          description: Unique identifier of the model.
        choices:
          type: array
          description:
            List of chat completion variations. Defaults to only `1` choice,
            but can be increased by setting a value for `n` in the request.
          items:
            $ref: '#/components/schemas/ChatCompletionResponseChoice'
        usage:
          $ref: '#/components/schemas/ChatCompletionUsage'
      x-properties-order:
        - id
        - object
        - created
        - model
        - choices
        - usage
    CreateEmbeddingResponse:
      type: object
      properties:
        id:
          type: integer
          description: UUID of the response.
        object:
          type: string
          description: Type of response object, always set to `list`.
          enum:
            - list
        created:
          type: integer
          description: Timestamp when the response was generated (Unix format, in seconds).
        model:
          type: string
          description: Unique identifier of the model.
        data:
          type: array
          description: List of embeddings.
          items:
            $ref: '#/components/schemas/Embedding'
        usage:
          type: object
          description: Usage information generated by this request.
          properties:
            prompt_tokens:
              type: integer
              description: Number of input tokens.
            total_tokens:
              type: integer
              description: Total number of tokens (input and output).
            completion_tokens:
              type: integer
              description: Number of output tokens. Always set to `0` for embedding models since no token are generated (only vectors coordinates).
      x-properties-order:
        - id
        - object
        - created
        - model
        - data
        - usage
    Embedding:
      type: object
      properties:
        index:
          type: integer
          description: Index of the embedding in the list of embeddings.
        object:
          type: string
          description: Type of the response object, always set to `embedding`.
          enum:
            - embedding
        embedding:
          type: array
          description: >
            Embedding vector, represented as a list of floating point values. The length of
            a vector is equal to the number of dimensions of the model.
          items:
            type: number
    FunctionObject:
      type: object
      properties:
        description:
          type: string
          description:
            Description of the function. This helps the model
            choose the right function when needed.
        name:
          type: string
          description:
            Name of the function to be called. Must contain only `a-z`, `A-Z`, `0-9`,
            underscores and dashes, with a maximum length of `64` characters.
        parameters:
          $ref: '#/components/schemas/FunctionParameters'
        strict:
          type: boolean
          nullable: true
          description: |-
            Defines whether to enforce strict schema adherence when generating a
            function call. If set to `true`, the model will follow the exact
            schema defined in the `parameters` field. Currently, even if
            set `true` this parameter will be ignored and act as if set to `false`.
            We recommend you check output schema before calling any functions or tools.

            **Default:** `false`
      required:
        - name
    FunctionParameters:
      type: object
      description: >-
        Parameters of the function, described as a JSON schema object.
        See [How to use function calling](https://www.scaleway.com/en/docs/generative-apis/how-to/use-function-calling/) for examples,
        and the [JSON schema
        reference](https://json-schema.org/understanding-json-schema/) for
        documentation about the format.

        Omitting `parameters` defines a function with an empty parameter list.
      additionalProperties: true
    ListModelsResponse:
      type: object
      properties:
        object:
          type: string
          description: Type of response object, always set to `list`.
          enum:
            - list
        data:
          type: array
          description: List of models.
          items:
            $ref: '#/components/schemas/Model'
      x-properties-order:
        - object
        - data
    Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the model.
        object:
          type: string
          description: Object type. Always set to `model`.
          enum:
            - model
        created:
          type: integer
          description: Timestamp when the model was created (Unix format, in seconds).
        owned_by:
          type: string
          description: Name of the organization that created the model (i.e. the model provider).
      x-properties-order:
        - id
        - object
        - created
        - owned_by
    ParallelToolCalls:
      description: |-
        Defines whether the model can call multiple tools. Currently, even if
        set `false` this parameter will be ignored and act as if set to `true`.

        Only [specific models](https://www.scaleway.com/en/docs/managed-inference/reference-content/model-catalog/#model-details)
        can call multiple tools in a single response.

        **Default value:** `true`
      type: boolean
    ResponseFormat:
      type: object
      description: |-
        Output format specification.

        Using `{ "type": "json_schema", "json_schema": {...} }`
        enables the model to output only a valid JSON following the provided schema specification.

        Deprecated. Using `{ "type": "json_object" }` enables `JSON
        mode` that should not be used anymore.

        See [How to use structured outputs](https://www.scaleway.com/en/docs/generative-apis/how-to/use-structured-outputs/)
        for code snippets using `openai` Python client and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/)
        for documentation about the format.
      properties:
        type:
          type: string
          description: Type of response object.
          enum:
            - text
            - json_schema
            - json_object
        json_schema:
          type: object
          description: |-
            Schema the response object should follow in `JSON` format. This field
            can only be used if `type` is set to `json_schema`.
      required:
        - type
    StopConfiguration:
      description: |-
        String, or array of strings, that when encountered in the generated text
        will stop the model from generating further output tokens.
        The generated text will not return any of the specified stop sequences.
        A maximum of 4 sequences can be provided.
      default: null
      nullable: true
      type: string
    ProjectId:
      description: |-
        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.
      type: string
      example: example-f295-43f0-9433-ab3e04445856
paths:
  /v1/{project_id}/chat/completions:
    post:
      operationId: createChatCompletion
      tags:
        - Chat Completions
      summary: Create a chat completion
      description: |-
        Create a model response for a given chat conversation.
        This method accepts a sequence of messages (a chat conversation) and returns a response generated by the model.

        Conversation `messages` **are not stored** and need to be sent in each
        `/chat/completions` API call.
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            $ref: '#/components/schemas/ProjectId'
        - in: query
          name: model
          required: true
          description: |-
            Unique identifier of the model, such as `llama-3.3-70b-instruct` or `mistral-small-3.1-24b-instruct-2503`.

            Refer to our [supported models](https://www.scaleway.com/en/docs/generative-apis/reference-content/supported-models/) list
            or [/models](#path-models-list-models) endpoint for available models.
          schema:
            type: string
            example: llama-3.3-70b-instruct
        - in: query
          name: messages
          required: true
          description: |-
            Array of messages representing the conversation history.
          schema:
            type: object
            properties:
              message:
                description: >
                  Single message in a conversation.
                type: array
                minItems: 1
                items:
                  $ref: '#/components/schemas/ChatCompletionRequestMessage'
        - in: query
          name: max_completion_tokens
          description: |-
            Maximum number of output tokens that can be generated
            for a `completion`.
            Different [default maximum values](https://www.scaleway.com/en/docs/generative-apis/reference-content/supported-models/)
            are enforced for each model to avoid edge cases where tokens are
            generated indefinitely. These values are not enforced
            in [Managed Inference](https://www.scaleway.com/en/inference/).
          schema:
            type: integer
            nullable: true
        - in: query
          name: max_tokens
          description: |-
            Use `max_completion_tokens` instead. Maximum number of total tokens that can be generated
            for a completion (input and output).
          schema:
            type: integer
            nullable: true
            deprecated: true
        - in: query
          name: frequency_penalty
          description: |-
            Value which influences the likelihood of generating tokens based on their frequency in the existing text.
            When set to a positive value, it reduces the probability of repeating tokens that have already appeared.
          schema:
            type: number
            minimum: -2
            maximum: 2
            nullable: true
        - in: query
          name: logit_bias
          schema:
            type: object
            default: null
            nullable: true
            additionalProperties: true
            description: >
              List of token IDs with associated bias integer values ranging from `-100` to `100`.
              This parameter adjusts the probability of these tokens being generated during the model's output.

              A JSON object must be provided in the following format:
              `{"354": 80,"143": -50}` where `354` and `143` are token IDs from the tokenizer used
              with this model. Positive values increase the likelihood of a token being generated, while negative values reduce it.
        - in: query
          name: logprobs
          description: |-
            Defines whether to return log probabilities of each output token.
            This allows you to see the likelihood of each token being generated.
          schema:
            type: boolean
            default: false
            nullable: true
        - in: query
          name: n
          description: |-
            Number of chat completion choices to generate for a given input.
            The value of `n` multiplies the number of generated tokens,
            resulting in `n` separate responses for each input.
          schema:
            type: integer
            minimum: 1
            maximum: 128
            default: 1
            nullable: true
        - in: query
          name: parallel_tool_calls
          schema:
            $ref: '#/components/schemas/ParallelToolCalls'
        - in: query
          name: presence_penalty
          description: |-
            Value which influences the probability of generating tokens that have
            already appeared in the text. Positive values reduce the likelihood of
            repeating a token, regardless of how many times it has already appeared.
          schema:
            type: number
            minimum: -2
            maximum: 2
            nullable: true
        - in: query
          name: response_format
          schema:
            $ref: '#/components/schemas/ResponseFormat'
        - in: query
          name: seed
          description: |-
            Value which controls the randomness of the output to ensure determinism.
            When using the same seed value along with identical input and parameters,
            you should receive the same model response each time. This holds true even when
            temperature is set above 0.

            Note that fully deterministic output is not guaranteed over long periods of time (such
            as several months), as the inference model may be updated and optimized.
          schema:
            type: integer
            minimum: -9223372036854776000
            maximum: 9223372036854776000
            nullable: true
        - in: query
          name: stop
          schema:
            $ref: '#/components/schemas/StopConfiguration'
        - in: query
          name: stream
          description: |-
            Defines whether the model's response can be streamed to the client
            using server-sent events.

            The response will be streamed in chunks over HTTP, where each chunk except
            the last contains the following content:

            `data: {"id": ..., "model": ..., "choices":...}`

            The last chunk will contain `data: [DONE]`.

            Note that the object `{"id": ..., "model": ..., "choices":...}` follows the same format as
            a non-stream HTTP request.

            See [How to query language models using streaming](https://www.scaleway.com/en/docs/generative-apis/how-to/query-language-models/#streaming)
            for examples, and [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)
            for reference documentation about SSE format.

            **Default value:** `false`
          schema:
            type: boolean
            nullable: true
        - in: query
          name: stream_options
          schema:
            $ref: '#/components/schemas/ChatCompletionStreamOptions'
        - in: query
          name: tools
          schema:
            type: array
            description: >
              List of tools the model can call, such as functions.
              A maximum of `128` tools can be provided.
              See [How to use function calling](https://www.scaleway.com/en/docs/generative-apis/how-to/use-function-calling/)
              for code snippets using `openai` Python client.
            items:
              $ref: '#/components/schemas/ChatCompletionTool'
        - in: query
          name: tool_choice
          schema:
            $ref: '#/components/schemas/ChatCompletionToolChoiceOption'
        - in: query
          name: top_logprobs
          description: |-
            Number of most likely tokens to return for each token generated, along with their
            generation log probability.
            Value must be between `0` and `20`.
            `logprobs` must be set to `true` to use this parameter.
          schema:
            type: integer
            minimum: 0
            maximum: 20
            nullable: true
      responses:
        '200':
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateChatCompletionResponse'
      x-codeSamples:
        - lang: cURL
          source: |
            curl https://api.scaleway.ai/v1/chat/completions \
              -H "Content-Type: application/json" \
              -H "Authorization: Bearer $SCW_SECRET_KEY" \
              -d '{
                "model": "llama-3.3-70b-instruct",
                "messages": [
                  {
                    "role": "system",
                    "content": "You are a helpful assistant."
                  },
                  {
                    "role": "user",
                    "content": "Hello!"
                  }
                ]
              }'
  /v1/{project_id}/embeddings:
    post:
      operationId: createEmbedding
      tags:
        - Embeddings
      summary: Create an embedding
      description: Generate an embedding.
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            $ref: '#/components/schemas/ProjectId'
        - in: query
          name: input
          required: true
          schema:
            type: string
            description: String to represent as embedding vector.
            default: ''
            example: This is a test.
            x-one-of: input
        - in: query
          name: input
          required: true
          schema:
            type: array
            description: Array of strings to represent as embedding vector.
            minItems: 1
            maxItems: 2048
            x-one-of: input
            items:
              type: string
              example: This is a test
        - in: query
          name: model
          required: true
          description: >
            Unique identifier of the model, such as `bge-multilingual-gemma2`.

            Refer to our [supported models](https://www.scaleway.com/en/docs/generative-apis/reference-content/supported-models/) list
            or [/models](#path-models-list-models) endpoint for available models.
          schema:
            type: string
            example: bge-multilingual-gemma2
        - in: query
          name: encoding_format
          description:
            Format of the embedding representation.
          schema:
            type: string
            enum:
              - float
              - base64
            example: float
            default: float
        - in: query
          name: dimensions
          description: >
            Number of `dimensions` to use for the embedding vector representation.
            Currently, the only supported value is that of the [maximum dimensions of a model](https://www.scaleway.com/en/docs/generative-apis/reference-content/supported-models/#embedding-models).
            Lower values are not supported and vectors should not be trimmed,
            since available models do not support [matryoshka embeddings](https://huggingface.co/blog/matryoshka).
          schema:
            type: integer
            example: 3584
      responses:
        '200':
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEmbeddingResponse'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl https://api.scaleway.ai/v1/embeddings \
              -H "Authorization: Bearer $SCW_SECRET_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "input": "Here is a text to embed as a vector",
                "model": "bge-multilingual-gemma2"
              }'
  /v1/models:
    get:
      operationId: listModels
      tags:
        - Models
      summary: List models
      description: List [models](https://www.scaleway.com/en/docs/generative-apis/reference-content/supported-models/) that are available via this API.
      responses:
        '200':
          description: ""
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListModelsResponse'
      x-codeSamples:
        - lang: cURL
          source: |
            curl https://api.scaleway.ai/v1/models \
              -H "Authorization: Bearer $SCW_SECRET_KEY"
