Skip to main content
GET
https://api.keywordsai.co
/
api
/
models
/
{model_name}
import requests

model_name = "my-custom-gpt-4"
url = f"https://api.keywordsai.co/api/models/{model_name}/"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())
{
  "id": "my-custom-gpt-4",
  "model_name": "my-custom-gpt-4",
  "display_name": "My Custom GPT-4",
  "base_model_name": "gpt-4",
  "affiliation_category": "custom",
  "is_called_by_custom_name": false,
  "input_cost": 0.025,
  "output_cost": 0.075,
  "cache_hit_input_cost": 0.0,
  "cache_creation_input_cost": 0.0,
  "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
  }
}
Retrieve a specific model by its model name. Returns detailed configuration including associated provider and supported parameters.
Permissions: Global models are accessible by anyone. Custom models are only accessible by the owning organization.

Path parameters

model_name
string
required
The model’s unique name. Can include slashes (e.g., openai/gpt-4).
my-custom-gpt-4

Response

Returns the model object with full configuration details.
{
  "id": "my-custom-gpt-4",
  "model_name": "my-custom-gpt-4",
  "display_name": "My Custom GPT-4",
  "base_model_name": "gpt-4",
  "affiliation_category": "custom",
  "is_called_by_custom_name": false,
  "input_cost": 0.025,
  "output_cost": 0.075,
  "cache_hit_input_cost": 0.0,
  "cache_creation_input_cost": 0.0,
  "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
  }
}
import requests

model_name = "my-custom-gpt-4"
url = f"https://api.keywordsai.co/api/models/{model_name}/"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())