Skip to main content

Bring Your Own Keys (BYOK)

Go beyond default limits ...

Jeff avatar
Written by Jeff
Updated over a week ago

Every plan comes with a default amount of optimizations using *Grok model.
But .. sometimes you just want to use your own API models and get more done.

It's important to note that at the writing of this doc, we've rigorously tested these (4) main LLM providers and their corresponding faster-models:

- X.AI > Grok 4-Fast
- OpenAI > GPT 5-mini
- Anthropic > Claude Sonnet 4.5
- Google > Gemini 2.5-flash

And based on our rigorous testing ✅ X.AI > Grok 4-Fast* (as of today Dec 2025) -

Is the best-of-breed model in terms of quality, speed, and price.

*This of course is bound to change from month-to-month, and we may add more models into the mix as we see progress.

So we highly recommend Grok, but feel free to try the others.

> How to Generate a Custom API Key:

X.AI > Grok 4-Fast

To generate an API key for the xAI Grok models (including Grok 4 Fast), you must have an active X Premium subscription, access the xAI developer console, and follow these steps:

  1. Sign In: Go to the xAI Console and sign in using your X (formerly Twitter) account credentials.

  2. Navigate to API Keys: Once in the console, locate and click on the API Keys section in the navigation menu.

  3. Create a New Key: Click the Create New Key or Generate API Key button.

  4. Configure Settings:

    • Provide a descriptive name for your API key (e.g., "Grok 4 Fast App").

    • Select the appropriate permissions and model access (ensure grok-4-fast is enabled).

  5. Copy and Secure the Key:

    • Click the final create button. Your new API key will be displayed only once.

    • Immediately copy the key and store it securely. You will not be able to retrieve it later.

    • Set Up Billing (if needed): Ensure you have purchased API credits or have an active X Premium subscription that covers the usage limits to avoid interruptions.

      You are now ready to use your API key to make requests to the xAI API using the grok-4-fast model.


OpenAI > GPT 5-mini

To generate an API key for models like GPT-5-mini, you need to use the general OpenAI API platform, as there isn't a separate process for specific models. The key you create will work for all available models in your account. Step-by-Step Guide

  1. Create an OpenAI Account

    • If you don't have one, sign up for a free account on the OpenAI Platform.

    • Log in to your account.

  2. Set Up Billing (Required for API Usage)

    • API usage is a pay-per-use service, and you must have a payment method on file for the key to be active.

    • Navigate to the "Billing" section in your account settings and add your payment details.

    • It's a good practice to set a usage limit to manage your monthly spend.

  3. Generate the API Key

    • Go to the API keys page in your dashboard: platform.openai.com/account/api-keys.

    • Click on + Create new secret key.

    • Enter a name for your key (e.g., "GPT-5-mini-project-key") to help you remember its purpose, then click Create secret key.

  4. Securely Store Your Key

    • Crucially, copy the key immediately. For security reasons, you will not be able to view this secret key again once you close the window.

    • Store it in a safe and secure location. When using it in your code, it is best practice to store it as an environment variable (e.g., OPENAI_API_KEY) rather than hardcoding it.

Once you have your key, you can use it to make requests to the API, specifying the model name (like "gpt-5-mini") in your code.


Anthropic > Claude Sonnet 4.5

To generate an API key for Claude Sonnet 4.5, you need to use the Anthropic developer console, not the main chat interface on claude.ai. The process involves creating an account, setting up billing, and then generating the key within your account settings.

Step-by-Step Guide

  1. Create an Account: Go to the Anthropic Console website and sign up for a new account if you don't have one already.

  2. Log In: Once your account is created and verified (this may involve email verification and potential account approval), log in to your dashboard.

  3. Navigate to API Keys: In the console dashboard, find and click on the "API Keys" section in the left-hand navigation menu.

  4. Create a New Key: Click the "+ Create Key" button.

  5. Name Your Key: A pop-up will appear. Provide a descriptive name for your API key (e.g., "VisualSitemaps") to help you organize your keys later.

  6. Save Your Key Securely: After clicking "Add" or "Create Key", the API key will be displayed on the screen only once. You must copy this long string of characters immediately and store it in a secure location (e.g., in a password manager or as an environment variable in your project's code).

    • Important: If you lose this key, you cannot retrieve it again; you will have to create a new one.

  7. Configure Billing: Before you can use the API key to make calls to models like Claude Sonnet 4.5, you need to add a payment method in the "Billing" section of your console. The API uses a pay-as-you-go model.

Once you have your key and billing is set up, you can use it to authenticate your API requests to the claude-sonnet-4-5 model.


Google > Gemini Flash 2.5

Steps to Generate an API Key

  1. Go to Google AI Studio: Open the Google AI Studio API Keys page in a web browser.

  2. Sign In: Make sure to sign in to a Google account.

  3. Accept Terms: If this is the first time, read and accept the Google APIs and Gemini API terms of service.

  4. Create API Key:

    • Click the "Create API key in new project" button.

    • Alternatively, choose an existing Google Cloud project.

  5. Copy the Key: The new API key will appear immediately. Copy the key and keep it in a safe place, as it will not be shown again.

How to Use the API Key

It is recommended to set the API key as an environment variable (e.g., GEMINI_API_KEY) for secure access within projects. The key is automatically detected by client libraries for Python, Node.js, and others.

This key is used to access Gemini models, such as the gemini-2.5-flash model, in applications


Adding Your Custom API Key:

> Adding Your Key

  1. Go to > Account Details

  2. Select your Model

  3. Enter your key > Add

    *return to this screen to check usage as-needed.

Did this answer your question?