diff --git a/ai-data/generative-apis/api-cli/using-chat-api.mdx b/ai-data/generative-apis/api-cli/using-chat-api.mdx index c539bdaaab..5241c2e8d3 100644 --- a/ai-data/generative-apis/api-cli/using-chat-api.mdx +++ b/ai-data/generative-apis/api-cli/using-chat-api.mdx @@ -23,7 +23,7 @@ Creates a model response for the given chat conversation. curl --request POST \ --url https://api.scaleway.ai/v1/chat/completions \ --header 'Authorization: Bearer ${SCW_SECRET_KEY}' \ - --header 'Content-Type: application/json' + --header 'Content-Type: application/json' \ --data '{ "model": "llama-3.1-8b-instruct", "messages": [ diff --git a/ai-data/generative-apis/api-cli/using-generative-apis.mdx b/ai-data/generative-apis/api-cli/using-generative-apis.mdx index f6c07fc544..fb765b69f0 100644 --- a/ai-data/generative-apis/api-cli/using-generative-apis.mdx +++ b/ai-data/generative-apis/api-cli/using-generative-apis.mdx @@ -20,7 +20,7 @@ dates: All requests to the Scaleway Generative APIs must include an `Authorization` HTTP header with your API key prefixed by `Bearer`. -We recommend exporting your secret key as an environment variable, which you can then pass directly in your curl request as follows. Remember to replace the example value with your own API secret key. +We recommend exporting your secret key as an environment variable, which you can then pass directly in your curl request as follows. Remember to replace the example value with *your own API secret key*. ``` export SCW_SECRET_KEY=720438f9-fcb9-4ebb-80a7-808ebf15314b diff --git a/ai-data/generative-apis/how-to/query-text-models.mdx b/ai-data/generative-apis/how-to/query-text-models.mdx index 96ab508cc9..7194ab4a7d 100644 --- a/ai-data/generative-apis/how-to/query-text-models.mdx +++ b/ai-data/generative-apis/how-to/query-text-models.mdx @@ -54,7 +54,7 @@ from openai import OpenAI # Initialize the client with your base URL and API key client = OpenAI( base_url="https://api.scaleway.ai/v1", # Scaleway's Generative APIs service URL - api_key="" # Your unique API key from Scaleway + api_key="" # Your unique API secret key from Scaleway ) ``` @@ -69,7 +69,7 @@ response = client.chat.completions.create( messages=[{"role": "user", "content": "Describe a futuristic city with advanced technology and green energy solutions."}], temperature=0.2, # Adjusts creativity max_tokens=100, # Limits the length of the output - top_p=0.7 # Controls diversity through nucleus sampling + top_p=0.7 # Controls diversity through nucleus sampling. You usually only need to use temperature. ) # Print the generated response diff --git a/ai-data/generative-apis/quickstart.mdx b/ai-data/generative-apis/quickstart.mdx index c3800bdbef..0eabad417b 100644 --- a/ai-data/generative-apis/quickstart.mdx +++ b/ai-data/generative-apis/quickstart.mdx @@ -55,12 +55,12 @@ pip install openai from openai import OpenAI client = OpenAI( - base_url="https://api.scaleway.ai/v1", - api_key="" + base_url="https://api.scaleway.ai/v1", # # Scaleway's Generative APIs service URL + api_key="" # Your unique API secret key from Scaleway ) ``` -Make sure that you replace `` with the API key obtained from your Scaleway account. +Make sure that you replace `` with the API key obtained from your Scaleway account. It is recommended to store your API keys securely using environment variables or [secret management tools](/identity-and-access-management/secret-manager/) to prevent unauthorized access.