-->

DEVOPSZONES

  • Recent blogs

    How to ReGenerate Azure OpenAI api-key and List Models

     You can find the Keys in the Azure portal. The Endpoint and Keys can be found in the Resource Management section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either KEY1 or KEY2. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.

    Azure OpenAI
    Azure OpenAI

    Click on “Regenerate Key1“ or “Regenerate Key2“ on the top to generate the respective key.

    If you want to regenerate the Key for all the Azure OpenAI account in the subscription, You can use the script hosted here. Make sure you are authenticated to azure using az login.

     ## Prerequisites

    `pip install -r requirements.txt`
    1. Run the script.
      $ python3 regenerate_openai-key.py

    2. It’ll ask a question, Type Yes. Input Other than yes , will stop script execution.

    3. Provide the Azure subscription id where you want to regenerate key.

    4. First the Old Keys will be displayed, then the New Key will be provided. How to List All Azure Models In a Subscription  To See all the Azure OpenAI Subscription/Deployment and qutoa usage run the script “list_models.py“. The script is hosted here.

    5. ## Prerequisites
      `pip install -r requirements.txt`
    6. Please set the Azure Subscription id. You can use the script “setenv.sh“.

    7. Run the script. $ python3 list_models.py


    No comments