The Deska blog
Setting Up Your Own Keys With Every Major Provider
A technical guide on setting up your own keys for AI development, covering Anthropic, OpenAI, and Google, while exploring local-first tools like Deska.
10 min read
The shift toward local-first software has changed how developers interact with large language models. Instead of relying on monthly subscriptions with fixed limits, many professionals are now setting up your own keys to gain granular control over costs, privacy, and model selection. This approach, often called Bring Your Own Key (BYOK), allows you to pay exactly for what you use while keeping your data within your own environment. Understanding the nuances of each provider is essential for building a robust development workflow that remains flexible as new models emerge.
Why Developers Choose the BYOK Path
Using your own API keys offers several advantages over managed chat interfaces. Most managed services have rate limits or message caps that can interrupt a deep coding session. When you provide your own credentials, you are typically subject only to the tier limits of the provider, which are often much higher for pay-as-you-go accounts.
Privacy is the second major factor. In a local-first environment, the application acts as a client that communicates directly with the LLM provider. This prevents the software vendor from intermediate logging of your prompts or code snippets. For developers working on proprietary codebases, this architecture is a significant security improvement.
Finally, there is the matter of tool flexibility. Many specialized developer tools, such as the Deska desktop app, allow you to use different models for different tasks. You might use a high-reasoning model for complex architecture and a faster, cheaper model for writing unit tests.
Anthropic API Setup
Anthropic has become a favorite among developers due to the performance of the Claude 3.5 Sonnet model. Their API is known for its strict adherence to system prompts and high context windows.
To set up your keys with Anthropic, you must create an account on their Console. Unlike consumer accounts, the Console requires a separate billing setup. You will need to deposit a minimum balance into your account before the API keys become active. Once funded, you can generate keys in the settings dashboard.
Anthropic organizes access through Workspaces. This is useful for teams, but for an individual developer, the default workspace is sufficient. When you generate a key, it is only shown once. Ensure you store it in a secure password manager immediately.
OpenAI Platform Configuration
OpenAI remains a primary choice due to its wide range of models, including GPT-4o and the o1 series. Their platform is highly mature, offering detailed usage tracking and organization-level controls.
- Navigate to the OpenAI API platform and sign in.
- Go to the API Keys section under the dashboard.
- Verify your phone number if you have not done so already, as this is a requirement for key generation.
- Create a new secret key and give it a descriptive name like Deska Development.
- Set a monthly usage limit in the billing section to prevent unexpected costs if a script or agent runs in a loop.
OpenAI also offers a project-based system. You can create different keys for different projects to track costs individually. This is highly effective when you are testing multiple agents or different automation scripts.
Google Gemini and Vertex AI
Google provides two ways to access their models: Google AI Studio and Vertex AI. For most developers looking for a straightforward BYOK experience, Google AI Studio is the preferred path. It allows for quick key generation and offers a generous free tier for specific models like Gemini 1.5 Flash.
Vertex AI is part of the broader Google Cloud Platform (GCP). It is more complex to set up, requiring service accounts and IAM permissions. Use Vertex AI if your company already uses GCP for infrastructure. Use AI Studio for personal projects or rapid prototyping where you want to minimize configuration time.
Implementing Keys in Deska
Deska is a free desktop app for Mac, Windows, and Linux that thrives on the BYOK model. It provides an infinite canvas workspace where you can place different panels side by side. Instead of forcing a single model or a managed subscription, Deska allows you to input your own API keys for its lifetime tier users.
Within the settings panel, you can add credentials for Anthropic, OpenAI, and other providers. Once configured, you can run multiple AI coding agents like Claude Code or OpenCode as panels on your canvas. This allows you to compare how different models handle the same codebase simultaneously.
Because Deska is local-first, these keys stay on your machine. They are used by the app to facilitate direct communication between your computer and the AI provider. This architecture ensures that your code and sessions remain private while giving you the power of the latest models within a specialized developer environment.
Comparing Managed Services vs. BYOK
| Feature | Managed Subscription | BYOK (Own Keys) |
|---|---|---|
| Cost Structure | Fixed monthly fee | Pay per token |
| Privacy | Data may be logged by vendor | Direct provider connection |
| Model Choice | Usually limited to one family | Access to any provider |
| Rate Limits | Fixed per hour/day | Based on provider tier |
| Setup Effort | Low (Login only) | Medium (Key management) |
Managed services are excellent for casual use or when you want a predictable monthly bill. However, for professional developers who need terminals and code editors integrated with their AI, the BYOK approach offers superior long-term value.
Monitoring and Security Best Practices
When you are setting up your own keys, you take on the responsibility of a cloud administrator. Never hardcode your API keys into your source code. Most local tools will store these in your system keychain or an encrypted local database.
Regularly audit your usage dashboards on the provider websites. Look for spikes in activity that might indicate a leaked key or an inefficient loop in your code. Most providers allow you to rotate keys, which involves generating a new one and deleting the old one. It is a good practice to do this every few months.
If you use the Deska mobile app, your keys are not stored on a central server. The mobile app pairs directly with your desktop through a secure relay, allowing you to monitor your work or continue sessions without exposing your sensitive credentials to the public internet.
FAQ
How do I limit API costs when using my own keys?
Most providers allow you to set hard and soft usage limits within their billing dashboards. A hard limit will disable the key for the rest of the billing cycle once reached, while a soft limit sends an email notification. This is the most effective way to prevent surprise bills.
Is it safer to use API keys or a web chat?
Using API keys with a local-first tool is often safer for sensitive code. While web chats might use your data for training, API data is typically excluded from training by default by providers like OpenAI and Anthropic, provided you use their platform API.
Can I use the same API key on multiple devices?
Yes, you can use the same key across different machines, but it is better to generate a unique key for each tool or device. This makes it easier to revoke access for a single device if it is lost or compromised without affecting your entire workflow.
Getting Started with Deska
If you are ready to move beyond basic chat interfaces, Deska provides the professional environment you need to leverage your own API keys. By running coding agents and your code editor side by side on an infinite canvas, you can build a workflow that fits your specific needs.
Download the app for your platform at /download and begin configuring your workspace. Whether you are using Ask Deska for voice-driven commands or running complex terminal sessions, the BYOK model ensures you have the power and privacy required for modern software development.