code: def create_key():
      import streamlit as st
      import json, requests, uuid
  
      if (
          st.session_state.get("api_url", None) is None
          and st.session_state.get("proxy_key", None) is None
      ):
          st.warning(
              "Please configure the Proxy Endpoint and Proxy Key on the Proxy Setup page."
          )
  
      duration = st.text_input(
          "Duration - Can be in (h,m,s)", placeholder="1h"
      )
  
      models = st.text_input(
          "Models it can access (separated by comma)", value=""
      )
      models = models.split(",") if models else []
  
      additional_params = json.loads(
          st.text_area(
              "Additional Key Params (JSON dictionary). [See all possible inputs](https://litellm-api.up.railway.app/#/key%20management/generate_key_fn_key_generate_post)",
              value={},
          )
      )
  
      if st.button("Submit"):
          try:
              key_post_body = {
                  "duration": duration,
                  "models": models,
                  **additional_params,
              }
              # Make the POST request to the specified URL
              complete_url = ""
              if st.session_state["api_url"].endswith("/"):
                  complete_url = (
                      f"{st.session_state['api_url']}key/generate"
                  )
              else:
                  complete_url = (
                      f"{st.session_state['api_url']}/key/generate"
                  )
  
              headers = {
                  "Authorization": f"Bearer {st.session_state['proxy_key']}"
              }
              response = requests.post(
                  complete_url, json=key_post_body, headers=headers
              )
  
              if response.status_code == 200:
                  st.success(
                      f"Key added successfully! - {response.json()}"
                  )
              else:
                  st.error(
                      f"Failed to add Key. Status code: {response.status_code}"
                  )
  
              st.success("Form submitted successfully!")
          except Exception as e:
              raise e
  
file_path: litellm/ui/admin.py
imports: from dotenv import load_dotenv
  import streamlit
  import base64, os, json, uuid, requests
label_desc: Use image node_id 6 for calling a global function with example usage: create_key() without return types