Loading...

Knowledge Base

How to Manage Your HostGator API Keys

API Keys enable your applications to connect to the HostGator AI Gateway using an authenticated API key and access AI models such as GPT, Claude, Gemini, Grok, and more. This guide walks you through generating a new API key, finding your Gateway endpoint, connecting your key to an application, and deleting unused keys.

How to Manage API Keys in Your HostGator Customer Portal

API keys provide authenticated access to AI models through the HostGator AI Gateway. Once credits have been added to your account, you can create, use, and delete API keys from the AI Tooling dashboard in your HostGator Customer Portal.

Create an API Key

Follow these steps to generate a new API key and obtain your Gateway endpoint for your applications.

  1. Log in to your Customer Portal.
  2. Click Hosting on the left-hand menu.

    Customer Portal - Hosting tab
     

  3. Click the Manage button on the hosting package where you want to create an API Key.

    Customer Portal - Hosting tab - Manage
     

  4. Click the AI Tooling button on your hosting details page.

    Customer Portal - Hosting tab - AI Tooling
     

  5. Select Manage API Keys.

    Customer Portal - Hosting tab - AI Tooling - API Keys
     

  6. Note your Gateway endpoint — you'll enter this in your application: https://gateway.ai.hostgator.com/. Click Copy to copy it to your clipboard.

    Customer Portal - Hosting tab - AI Tooling - API Keys - Gateway
     

  7. Click + Create API Key.

    Customer Portal - Hosting tab - AI Tooling - API Keys - Create API
     

  8. Enter a Key Name to identify where you'll use it, then click Create Key.

    Customer Portal - Hosting tab - AI Tooling - API Keys - Create API Key
     

  9. Click Copy on the "Save your API key" screen and store the key in a secure location.

    Customer Portal - Hosting tab - AI Tooling - API Keys - Save
     

  10. Click Done.
  11. Your new key now appears in your API Keys table showing its name, creation date, and last-used date.

    Customer Portal - Hosting tab - AI Tooling - API Keys Table
     

After completing these steps, you can connect your application to the AI Gateway and start using your AI credits.

Using Your API Key

Point your application's SDK base URL to your HostGator Gateway endpoint and use your API key to authenticate requests. Because this connection is OpenAI-compatible, many existing integrations only need the base URL and API key updated.

  1. Open the settings or configuration file for the application or SDK you want to connect.
  2. Set the base URL (sometimes called the API endpoint) to your Gateway endpoint: https://gateway.ai.hostgator.com/.
  3. Enter your API key in the API key field. Store the key in an environment variable or secrets manager rather than in your source code.
  4. Set the model to a supported model ID from HostGator: AI Models and Credit Pricing.
  5. Send a test request to confirm the connection works.

For example, with an OpenAI-compatible Python SDK:

from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.ai.hostgator.com/",
    api_key="YOUR_API_KEY",
)

response = client.chat.completions.create(
    model="MODEL_ID",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Deleting an API Key

Delete a compromised or unused key to stop it from being used with your account.

  1. Locate the key you want to remove and click the trash icon in its row.

    Customer Portal - Hosting tab - AI Tooling - Delete API Key
     

  2. Click Delete to confirm the removal.

    Customer Portal - Hosting tab - AI Tooling - Delete API Key - Confirmation
     

Frequently Asked Questions

Q: Do I need AI Credits before I can create an API key?

A: Yes. You must have an active AI Credit balance before creating an API key. See How to Purchase HostGator AI Credits for details. For current AI Credit pricing, visit HostGator: AI Models and Credit Pricing.

Q: Can I view my API key again after I create it?

A: No. For security, we show your full API key only once during creation. If you lose it, delete the old key and generate a new one.

Q: Which AI models can I access with my API key?

A: The HostGator AI Gateway provides access to models from providers like OpenAI (GPT), Anthropic (Claude), Google (Gemini), and xAI (Grok) through a single, OpenAI-compatible endpoint. Available models may change. See HostGator: AI Models and Credit Pricing for the current list.

Q: Does deleting an API key affect my AI Credit balance?

A: No. Deleting a key only revokes its access. Your credit balance and all other keys remain unchanged.

Q: Can I create more than one API key?

A: Yes. You can generate distinct keys for different applications or environments to track usage and manage access separately.

Loading...