import requests model_name = "my-custom-gpt-4" url = f"https://api.keywordsai.co/api/models/{model_name}/" headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } payload = { "display_name": "My Updated Custom GPT-4", "input_cost": 0.030 } response = requests.patch(url, headers=headers, json=payload) print(response.json())
{ "id": "my-custom-gpt-4", "model_name": "my-custom-gpt-4", "display_name": "My Updated Custom GPT-4", "base_model_name": "gpt-4", "affiliation_category": "custom", "input_cost": 0.030, "output_cost": 0.075, "max_context_window": 8192, "streaming_support": 1, "function_call": 1, "image_support": 0, "source": "db", "provider": { "id": "my-custom-provider", "provider_id": "my-custom-provider", "provider_name": "My Custom Provider", "organization_id": 123 } }
model_name
Example
my-custom-gpt-4
"display_name": "My Updated Custom GPT-4"
provider_id
"input_cost": 0.030
0
1
{ "supported_params_override": { "temperature": { "name": "temperature", "type": "number", "default": 0.7, "min": 0, "max": 1.5 } } }
Was this page helpful?