Scaleway logo
OpenAI Compatible API

OpenAI Compatible API

Scaleway Generative APIs provides access to the latest AI models hosted on Scaleway infrastructure.

The Generative APIs specification targets OpenAI API compatibility.

For details about the Scaleway Generative APIs used for dedicated deployments, see our documentation Generative APIs - Dedicated Deployment APIOpen in new context.

Concepts

Refer to our dedicated concepts pageOpen in new context to find definitions of the different terms referring to Generative APIs.

Quickstart

  1. Configure your environment variables.

    Note

    This is an optional step that seeks to simplify your usage of the APIs.

    TerminalCode
    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.

    TerminalCode
    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 APIsOpen in new context for quickstart information and snippets using REST requests or libraries such as the openai python client.

Requirement

To perform the following steps, you must first ensure that:

Technical information

Regions

Scaleway's infrastructure is spread across different regions and Availability ZonesOpen in new context.

Generative APIs is available in the Paris region, which is represented by the following path parameter (optional while there is only one region):

  • fr-par

Supported endpoints and features

Supported endpoints are:

  • /v1/responses
  • /v1/chat/completions
  • /v1/audio/transcriptions
  • /v1/embeddings
  • /v1/rerank
  • /v1/batches
  • /v1/models

The /v1/chat/completions endpoint:

  • Supports many features such as:
    • Structured outputs (JSON response format)
    • Tool calling (i.e., compatibility with workflows using MCP servers)
    • Sending and analyzing images
    • Sending and analyzing audio files
  • Does not yet support the following parameters: audio, metadata, modalities, prediction, prompt_cache_key, user, safety_identifier, service_tier, stream_options.include_obfuscation, store, system_fingerprint, web_search_options.
  • Does not support custom tools (only function tools are supported). These tools require you to provide a custom grammar to verify their input format.

The /v1/audio/transcriptions endpoint:

  • Does not yet support the following parameters: chunking_strategy, include[] and timestamp_granularities[].

The /v1/responses endpoint:

  • Does not yet support storing conversation state server-side.
  • Does not support execution by Scaleway of "built-in" tools (such as web or file search) while the model generates a response. Currently, only function tools are supported. These tools must be fully defined in your query, and should be executed if the model requests them. The execution result is then sent to the model so that it can use this additional context to produce a suitable answer.
  • Does not support sending response output object directly as an input for the next message. Standard messages using role:assistant and content fields should be used instead. Specifically, custom_tool_call and custom_tool_call_output types are not yet supported. As a workaround, tool call results can be sent using role:user, although we recommend using /chat/completions for better results in this case.
  • Does not yet support the following parameters: background, conversation, include, instructions, max_tool_calls, metadata, previous_response_id, prompt_cache_key, safety_identifier, service_tier, stream_options, top_logprobs, user, prompt, verbosity.

The /v1/batches endpoint:

  • Supports processing files stored in Object Storage (using the Amazon S3 protocol).
  • Does not yet support the following parameters: metadata.

The /v1/rerank endpoint:

  • Aims for compatibility with the JinAI API and Cohere API formats (no OpenAI API exists for this endpoint).

Third-party tool integration

For full details of direct integration into third party tooling, see Integrating Scaleway Generative APIs with popular AI toolsOpen in new context. 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 API endpoints you want to use in our model catalogOpen in new context. 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:

Troubleshoooting

See Troubleshooting Generative APIsOpen in new context for descriptions regarding advanced API behavior and solutions to common issues.

Tags