You can use your own OpenAI, Anthropic, Gemini, or OpenRouter API key in Heptabase. You can also connect an OpenAI-compatible provider or Google Vertex AI and add models manually.
Requests made with your own API key do not use Heptabase AI credits. Billing, available models, usage limits, and rate limits are managed by the corresponding AI provider.
Please note:
AI Tutor and Voice Note always use your monthly Heptabase AI credits.
Audio/Video Transcription supports only an OpenAI API key.
A ChatGPT, Claude, or Google AI consumer subscription does not automatically provide API access or credits.
OpenRouter
OpenRouter lets you use models from multiple providers in Heptabase through one OpenRouter API key.
Step 1: Create an OpenRouter API key
Sign in to OpenRouter API Keys and create an API key. OpenRouter API keys normally begin with sk-or-.
Step 2: Configure provider integrations if needed
If you want OpenRouter to use a native provider key, add it under OpenRouter Integrations. The key you paste into Heptabase must still be the OpenRouter-issued key, not a native DeepSeek, Kimi, or other provider key.
Step 3: Add the key to Heptabase
In Heptabase, go to Settings → AI Features → API Keys and switch the setting to Enabled.
Click +, select OpenRouter, and paste your OpenRouter API key.
OpenRouter :free model variants are not currently supported.
Google Gemini
Step 1: Create a Gemini API key
Sign in to Google AI Studio and confirm that you are using the Google account you want to associate with the API key.
Click Create API key, select the Google Cloud project you want to use, and follow the instructions to create and save the key.
Step 2: Add the key to Heptabase
In Heptabase, go to Settings → AI Features → API Keys and switch the setting to Enabled.
Click +, select Gemini, and paste your API key.
Step 3: Check Gemini API billing and limits
Gemini App subscription usage limits are separate from Gemini API project limits. API access, billing and rate limits depend on the Google AI Studio project associated with your key.
Google AI Pro also offers a separate US$10 monthly Google Cloud credit benefit through Google Developer Program. Check your eligibility, link your Google Developer profile and apply the available benefit to the Cloud Billing account used by your project. Credit eligibility and conditions still apply. See Google AI Pro benefits and the Developer Program Benefits FAQ.
If your API billing account uses Prepay, you must first purchase prepaid credits and maintain an active prepaid balance to use eligible promotional Cloud credits. Credits and paid access do not remove API rate limits; check the project's Billing Tier, Usage and Rate limits before deciding whether additional payment is needed.
You can review the project's billing, usage, and rate limits in Google AI Studio. For details, see the Gemini API billing documentation and rate-limit documentation.
OpenAI
Step 1: Create an OpenAI API key
Sign in to the OpenAI Platform, then open API Keys.
Click Create new secret key and follow the instructions to create and save the key.
Step 2: Add the key to Heptabase
In Heptabase, go to Settings → AI Features → API Keys and switch the setting to Enabled.
Click +, select OpenAI, and paste your API key.
Step 3: Check API billing
A ChatGPT subscription and OpenAI API billing are separate. Check the Billing page to confirm that your API account has available credits.
You can also review your current usage limits on the Limits page.
Anthropic Claude
Step 1: Create an Anthropic API key
Sign in to the Anthropic Console, then open API Keys.
Click Create key and follow the instructions to create and save the key.
Step 2: Add the key to Heptabase
In Heptabase, go to Settings → AI Features → API Keys and switch the setting to Enabled.
Click +, select Anthropic, and paste your API key.
Step 3: Check API billing
A Claude subscription does not automatically provide credits for an Anthropic API account. Check the Anthropic Console Billing page to confirm that the account has available usage credits.
You can also review your current usage limits on the Limits page.
Custom Providers
To use an OpenAI-compatible provider or Google Vertex AI, open the Heptabase desktop or web app and go to Settings → AI Features → Custom Providers.
OpenAI-compatible provider
When creating the provider, select the API type it uses:
Chat Completions
Responses API
Enter the public HTTPS Base URL provided by the provider. Keep any required API version or base path, such as /v1, but do not include /chat/completions or /responses. Heptabase appends the correct path for the selected API type.
Authentication can use a Bearer API key or a named API-key header. You can also add any custom headers required by the provider.
Add the model IDs you want to use manually. Heptabase does not automatically discover models from the endpoint.
Google Vertex AI
Select Google Vertex AI when creating the provider. You can use a Vertex AI Express Mode API key, or provide a Google Cloud service account with Vertex AI access, together with its project ID and location.
Models added through Custom Providers are currently available in AI Chat. They do not apply to AI Tutor, Voice Note, or Audio/Video Transcription.
Compatibility varies by provider and model. The endpoint must support the streaming and tool use required by AI Chat. Heptabase cannot guarantee that every OpenAI-compatible endpoint will work.
If you encounter an error
If you have added an API key to Heptabase but requests still fail, see Troubleshoot errors with your own AI API keys.






