keepcalculator

06 Numbers and Powers

Bluehost AI Gateway: Credits, API Keys, and VPS Setup

Card No. 06·36313 · Updated · Standard formula, shown below

Bluehost’s AI Gateway is a way to connect an application to supported AI models through an API, while credits cover usage and an API key authenticates requests. A VPS can host the application that calls the gateway, but it is a separate service: you configure the server, install your app, and store the key securely rather than treating the gateway as a VPS feature.

What Bluehost AI Gateway Does

An AI gateway sits between your software and one or more AI model providers. Instead of building a separate integration for every provider, an application can send requests to the gateway’s API endpoint using the format and credentials documented for that service. The gateway then routes supported requests and returns the model response.

Bluehost’s product interface, available models, billing rules, and setup instructions can change. Check the current Bluehost dashboard and documentation for the exact endpoint, supported model names, credit terms, and API compatibility before implementing anything. Do not assume that every model provider or feature is available simply because it is commonly supported by other gateways.

The main distinction is between the gateway and the machine running your software. The gateway provides an API connection to AI services; a VPS provides computing resources, such as a Linux server, where you can deploy a website, backend, or automation that makes API calls.

How Credits and API Keys Work

Credits are a usage allowance or billing balance associated with the gateway, according to the terms shown in your account. When an application makes a model request, that use may draw down credits or otherwise be charged under the service’s pricing rules. The amount can depend on factors such as the selected model and the size of the input and response. Review the dashboard’s usage details and current pricing rather than assuming a fixed cost per request.

An API key is a secret credential that tells the gateway which account is making a request. A typical request includes the key in an authorization header, along with the required model and message data. The precise endpoint, header format, and request body must come from Bluehost’s current documentation.

  • Credits or billing: determine whether requests can be made and how usage is accounted for.
  • API key: authenticates the request and associates it with the relevant account or project.
  • Model and request: specify what the application asks the service to do.
  • Response: returns generated content or an error that the application should handle.

A key is not the same as credits, and buying or receiving credits does not make a key safe to publish. If the dashboard supports separate keys, use a dedicated key for each app or environment where practical, and revoke a key if it is exposed or no longer needed.

Getting an API Key and Making a First Request

Start in the Bluehost account area for the AI Gateway. The labels and workflow may differ as the product evolves, but the general process is to enable or open the gateway, review its available models and usage terms, then create or reveal a key. Copy it into a password manager or directly into a secure secret store; many dashboards show a key only once.

  1. Confirm that the gateway is available to your account and review the current credit balance, usage rules, and model list.
  2. Create an API key in the gateway’s credential or settings area. Give it a clear label if labels are offered.
  3. Read the current API documentation for the base URL, authentication header, request schema, and model identifiers.
  4. Make a small test request from a local development environment or backend, using a non-sensitive prompt.
  5. Check the returned response and the dashboard’s usage records. Add error handling and usage monitoring before allowing public traffic.

Do not copy an example URL or code snippet from an unrelated provider and assume it works. Gateways may offer a familiar API style while still requiring a specific endpoint, model name, or account configuration.

Using the Gateway from a VPS

A VPS is useful when an application needs to run continuously, serve a website, process scheduled jobs, or keep its API key away from visitors’ browsers. The VPS does not automatically include an AI Gateway key or credits. You obtain those through the gateway account, then configure your server-side application to use them.

A typical deployment looks like this:

  1. Provision a VPS with an operating system supported by your application, then connect using the provider’s documented access method.
  2. Apply system updates and install the runtime and web-server components your app requires.
  3. Deploy the application and configure its gateway endpoint and model according to the current API documentation.
  4. Set the API key as a server-side environment variable or use a dedicated secrets manager. Avoid putting it in source code, a public repository, or a file served by the website.
  5. Run a test request from the server, inspect logs for failures, and confirm that the key is not printed in logs or error pages.
  6. Set sensible request limits and monitor both server activity and gateway usage.

For example, a web form could send a visitor’s question to your backend; the backend calls the gateway and returns the result. This keeps the key on the server. If browser code calls the gateway directly with a private key embedded in JavaScript, visitors can inspect and copy it, potentially using your account’s credits.

Security, Costs, and Common Problems

Treat an API key like a password. Restrict access to the VPS and its deployment configuration, avoid sharing keys in support tickets or screenshots, and rotate or revoke exposed credentials. Use HTTPS for your application and do not send secrets in query strings. If the gateway offers key restrictions or usage controls, review and enable options appropriate to your setup.

Costs are not determined by the VPS alone. There may be separate charges or limits for server hosting and AI usage, and the gateway’s credit system may have its own expiration, top-up, or model-specific rules. Check the account’s current terms, usage page, and billing records; do not rely on old pricing examples or assume unused credits carry forward.

  • Authentication errors: verify that the key is active, copied completely, and sent in the documented header.
  • Model or endpoint errors: check the current model identifier and base URL; these are common causes of otherwise valid requests failing.
  • Insufficient balance or usage limits: inspect the gateway dashboard and account limits rather than repeatedly retrying.
  • Timeouts: check application and server logs, network access, and request duration; avoid unlimited retries that can multiply usage.
  • Leaked key: revoke it promptly, create a replacement, update the server configuration, and review usage for unexpected calls.

Choosing Between a VPS and Other Hosting

A VPS offers more control than many managed hosting plans, but it also puts more responsibility on you. You generally need to manage operating-system updates, application deployment, firewall settings, backups, and monitoring. For a small site that only needs occasional AI features, an existing server-side hosting environment or managed application platform may be easier if it supports the required runtime and outbound API requests.

Choose a VPS when you need persistent processes, custom software, or control over the server environment and can maintain it. Choose a simpler hosting option when the application is modest and you do not want to administer a machine. In either case, the key should remain on a trusted server-side component, not in a public page or downloadable app.

Frequently Asked Questions

Do Bluehost AI Gateway credits include a VPS?
No. Gateway credits relate to AI API usage under the gateway’s current terms. VPS hosting is a separate server service, with its own configuration and any applicable charges.

Can I use the AI Gateway without a VPS?
Usually, an application can call an API from any suitable server-side environment that can reach the endpoint. A VPS is one hosting choice, not a prerequisite unless the current product documentation says otherwise.

Can I put my API key in website JavaScript?
Do not put a private key in browser code. Visitors can inspect it and use it. Send requests through a backend that keeps the key in server-side configuration.

Why is my API key not working?
Check that it is active and correctly copied, that the authorization format and endpoint match the current documentation, and that the account has available usage and access to the requested model.

Do credits have a fixed cost per AI request?
Not necessarily. Usage can depend on the service’s current rules, model, and request size. Consult the dashboard and current pricing information for the account-specific details.

What should I do if a key is exposed?
Revoke or delete the exposed key in the gateway dashboard, create a replacement, update the server’s secret configuration, and check recent usage for activity you do not recognize.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →