Azure OpenAI
Use your own Azure OpenAI credits through Keywords AI
There are 2 ways to add your Azure OpenAI credentials to your requests:
Add it from the UI
- Go to Credentials page
- Add your Azure OpenAI credentials.
Add it in code
Map your deployment name
We understand that you may have a custom name for your Azure deployment. Keywords AI is using the model’s origin name which may not be able to match your deployment. You can use model_name_map
to map the default name to your custom name.
Here’s an example: if you want to use azure/gpt-4o
on Keywords AI with your own Azure credentials and custom deployment name, you should put your custom deployment name in the model_name_map
object, and we’ll use it to make requests to your deployment.
{
"model": "azure/gpt-4o",
"model_name_map": {
"original_model_name": "azure/your_custom_model_name"
// "azure/gpt-4o": "azure/your gpt-4o's deployment name"
}
}
Add your own credentials
Add customer_credentials
parameter in your request body to use your own Azure OpenAI credits.
model_name_map
only works when your credentials is Valid.{
// Rest of the request body
"customer_credentials": {
"azure_openai": {
"api_key": "your-api-key",
"api_base": "your-api-base-url",
"api_version": "your-api-version",
}
}
}
Override credentials for a particular model. (Optional)
One-off credential overrides. Instead of using what is uploaded for each provider, this targets credentials for individual models.
{
// Rest of the request body
"customer_credentials": {
"azure_openai": {
"api_key": "your-api-key",
"api_base": "your-api-base-url",
"api_version": "your-api-version",
}
},
"credential_override": {
"azure/gpt-4o":{ // override for a specific model.
"api_key": "your-api-key",
"api_base": "your-api-base-url",
"api_version": "your-api-version",
}
}
}
Requirements
- Ensure your deployment name matches those listed on our Models page.
- Confirm that your models are available in the region specified by your credentials.
Credentials validation is not supported. Failure to comply with these requirements will result in errors!
How to get your Azure OpenAI credentials
To find the parameters needed, you can follow these steps:
- Visit your Azure Portal.
- You will see your deployments via the above link, choose the deployment you want to use.
- Click on the “Endpoints” link to get the API base URL.
- Click on the “Manage Keys” link to get the API key.
- Pick the version from the available versions.